Return-Path: Delivered-To: apmail-shiro-user-archive@www.apache.org Received: (qmail 34079 invoked from network); 21 Feb 2011 20:10:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Feb 2011 20:10:26 -0000 Received: (qmail 11123 invoked by uid 500); 21 Feb 2011 20:10:26 -0000 Delivered-To: apmail-shiro-user-archive@shiro.apache.org Received: (qmail 11114 invoked by uid 500); 21 Feb 2011 20:10:25 -0000 Mailing-List: contact user-help@shiro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@shiro.apache.org Delivered-To: mailing list user@shiro.apache.org Received: (qmail 11106 invoked by uid 99); 21 Feb 2011 20:10:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Feb 2011 20:10:25 +0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.214.50] (HELO mail-bw0-f50.google.com) (209.85.214.50) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Feb 2011 20:10:20 +0000 Received: by bwz2 with SMTP id 2so1453993bwz.9 for ; Mon, 21 Feb 2011 12:09:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.60.17 with SMTP id n17mr1696153bkh.190.1298318997994; Mon, 21 Feb 2011 12:09:57 -0800 (PST) Sender: les.hazlewood@anjinllc.com Received: by 10.204.4.72 with HTTP; Mon, 21 Feb 2011 12:09:57 -0800 (PST) In-Reply-To: <1298296334188-6048755.post@n2.nabble.com> References: <1298296334188-6048755.post@n2.nabble.com> Date: Mon, 21 Feb 2011 12:09:57 -0800 X-Google-Sender-Auth: 7IhHXCI5gkhLvga-mAWi1CCiisg Message-ID: Subject: Re: Integrating Shiro, Am i writing too much code? From: Les Hazlewood To: user@shiro.apache.org Cc: Snehesh Content-Type: text/plain; charset=UTF-8 On Mon, Feb 21, 2011 at 5:52 AM, Snehesh wrote: > > Hi > > Apologies if the following has already been answered, but i tried my best to > look for it and finally thought of posting the same. > > I have been reading and looking into Shiro for sometime now. The idea was to > use this for our services layer. This layer is accessed by n number of front > ends and hence we decided to have security at this layer. > > Also as this is a SAAS based multi tenant application, i am not able to use > any out of the box Realms, AuthenticationInfo, Token etc. The more i try to > integrate the more i end up overriding. I am not sure if this is the right > way to do it as by the end of the integration i would have probably > overridden a huge amount of code. > > My question here is that do we have a standard guideline as to what all > should be extended/overridden if one needs a custom realm. > > Also to give an idea on our application: > - I use Hibernate for database access > - Authentication is based on username, tenant name/tenant id and password > > It looks like a very slight deviation from the out of the box > functionalities but its forcing me to write everything again. > > Any suggestions will be appreciated. > > Thanks > Snehesh > -- > View this message in context: http://shiro-user.582556.n2.nabble.com/Integrating-Shiro-Am-i-writing-too-much-code-tp6048755p6048755.html > Sent from the Shiro User mailing list archive at Nabble.com. > Hi Snehesh, Besides creating a new AuthenticationToken (probably a subclass of UsernamePasswordToken that also has the tenant id) and a custom Realm to understand/process that token, what else are you overriding? -- Les Hazlewood Founder, Katasoft, Inc. Application Security Products & Professional Apache Shiro Support and Training: http://www.katasoft.com