Return-Path: Delivered-To: apmail-incubator-shiro-dev-archive@www.apache.org Received: (qmail 76954 invoked from network); 25 Jun 2010 20:25:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Jun 2010 20:25:05 -0000 Received: (qmail 99593 invoked by uid 500); 25 Jun 2010 20:25:05 -0000 Delivered-To: apmail-incubator-shiro-dev-archive@incubator.apache.org Received: (qmail 99539 invoked by uid 500); 25 Jun 2010 20:25:04 -0000 Mailing-List: contact shiro-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: shiro-dev@incubator.apache.org Delivered-To: mailing list shiro-dev@incubator.apache.org Received: (qmail 99531 invoked by uid 99); 25 Jun 2010 20:25:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jun 2010 20:25:04 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kalle.o.korhonen@gmail.com designates 209.85.212.47 as permitted sender) Received: from [209.85.212.47] (HELO mail-vw0-f47.google.com) (209.85.212.47) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jun 2010 20:24:56 +0000 Received: by vws19 with SMTP id 19so3260604vws.6 for ; Fri, 25 Jun 2010 13:24:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=MTAw61OErFk3plHMNo9oVQsXBp9sfLxqwFqsipLHpyw=; b=b8OruAvrphss/8idyS7OdE9ovk3kPkofeUrNLlgID5khzEApSaeULUQuO9pICI2fWg n5CzYogWJhSa1RA7JVm/L4wWEf/xIq9+gJQUhfhOSDJbmTNJwKKaTmSDqxto53Nn3Fnx qdKPtwdvsfeKhxRYrOhKJHLsi3xm0K31ONrVE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=VjGjyXNVNi6oqyvKRRkKpNHLJnA6KCULXQFC6sIMcQxyWrGirLKaqaFL780ZwVqq8P v07L1+92Z63OKfivn3Zc/DuF6RuJVqS6jxzq/BA/wxdfIi5ZPoVi2Hvh2GPLVYSIWjnq 5B3kN1FLP2LNoNeWFgzDQhe7eB8g+WXA0VUZU= MIME-Version: 1.0 Received: by 10.220.63.209 with SMTP id c17mr735721vci.152.1277497474851; Fri, 25 Jun 2010 13:24:34 -0700 (PDT) Received: by 10.220.102.195 with HTTP; Fri, 25 Jun 2010 13:24:34 -0700 (PDT) Date: Fri, 25 Jun 2010 13:24:34 -0700 Message-ID: Subject: Proposed changes to Shiro annotations From: Kalle Korhonen To: shiro-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Related to https://issues.apache.org/jira/browse/SHIRO-175 and some of the Shiro extensions we (Tynamo.org) have made, I'd like to change @Target(ElementType.METHOD) of all annotations to @Target({ElementType.TYPE, ElementType.METHOD}). The obvious semantics of attaching a security annotation to a class is that the same permission would apply to all method invocations in that class. SHIRO-175 suggests that we'd deprecate the existing annotations in favor of RequiresAnyXXX and RequiresAllXXX annotations, forcing to target 1.1 release for the issue resolution. We could also keep the existing annotations and pick either ANY or ALL semantics in order to avoid deprecating anything - not sure which one is better. The current semantics are unclear, the Javadoc implies ANY for RequiresRoles but ALL for RequiresPermissions. Here's what I'd suggest: - 1.0.1 change @Target to apply to TYPEs as well, fix ambiguity of current annotations (especially if we decide to keep them) - 1.1.0 resolve SHIRO-175 and add RequiresAnyXXX and RequiresAllXXX annotations (and deprecate existing annotations if we choose to do so) I can handle implementing the changes. Any comments? Kalle