Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-126

Include SecurityParameterBinding support for SecurityBindingType feature

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.2-incubating
    • Component/s: Security-Module
    • Labels:
      None

      Description

      Allows access to the business method invocation arguments in the bound security interceptor method.

          @SecurityBindingType
          public @interface ProjectAdmin
          {
              // empty
          }
      
          @SecurityParameterBinding
          public @interface ProjectBinding
          {
              // empty
          }
      
          @ProjectAdmin
          public void updateName(@ProjectBinding Project p, String name)
          {
             // save project name
          }
      
          @Secures
          @ProjectAdmin
          public boolean isProjectAdmin(@ProjectBinding Project p, Identity identity)
          {
             if(identity.hasRole("project" + p.getId() + "_admin")
             {
                 ...
             }
          }
      

      Note that the @Project annotation is not a CDI bean Qualifier / Stereotype annotation, it is a method parameter security binding annotation that tells Security to use the value of the Project passed to the method call in the security binding check itself.

        Issue Links

          Activity

          Hide
          struberg Mark Struberg added a comment -

          shipped in deltaspike-0.2-incubating

          Show
          struberg Mark Struberg added a comment - shipped in deltaspike-0.2-incubating
          Hide
          lincolnthree Lincoln Baxter III added a comment -

          All done. Integrated into security module + many tests.

          Show
          lincolnthree Lincoln Baxter III added a comment - All done. Integrated into security module + many tests.
          Hide
          gpetracek Gerhard Petracek added a comment -

          you are in the committers group -> you basically have the permission to do it.

          regards,
          gerhard

          Show
          gpetracek Gerhard Petracek added a comment - you are in the committers group -> you basically have the permission to do it. regards, gerhard
          Hide
          lincolnthree Lincoln Baxter III added a comment -

          Please assign this issue to me, thanks! (Should I be able to assign it to myself?)

          ~Lincoln

          Show
          lincolnthree Lincoln Baxter III added a comment - Please assign this issue to me, thanks! (Should I be able to assign it to myself?) ~Lincoln

            People

            • Assignee:
              lincolnthree Lincoln Baxter III
              Reporter:
              lincolnthree Lincoln Baxter III
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development