authorization package

The authorization package provides various types of security authorization request types with which a CSI consumer could construct more complex authorization requests.

Members

All public members of the authorization package.

Remarks

In cases where the access control policy is not straight forward role based access control, these request objects may be combined to pose a more complex authorization request, and use the SecContext.checkAuthorization method. One benefit of this is to avoid false negative audit records.

For example, if the security policy says "grant access if the user is in any one of this set of roles {A, B, C}", the Policy Enforcement Point (PEP), without the support for complex authorization requests, could have checked each role separately and granted access if any of the checks succeeded, but we might have ended up with DENY audit records for failed checks without any indication that all the role checks are tied to one single access check.

Using this package, a composite request can be constructed as demonstrated int he following sample code:

           
              CompositeAuthzRequest request = 
         RoleAuthzRequest.getCompositeAuthzRequest(
     Arrays.asList(new String[]
          { "A", "B", "C" }), LogicalOrAuthzRequest.class);
      request.setPackage("Application A");
      AuthzResponse resp = _context.checkAuthorization(request);
      if (resp.getDecision() == Decision.PERMIT)
      {
          // access granted

The audit records generated for a composite authorization check are all tied with the same request ID to indicate that they are all part of one composite authorization check.

At the moment there are 4 types of AuthzRequest: RoleAuthzRequest uses checkRole to check a role. LogicalOrAuthzRequest returns PERMIT if any of the requests contained within the composite request returns PERMIT LogicalAndAuthzRequest returns PERMIT only if all of the requests contained within the composite return PERMIT FineGrainedAuthzRequest uses checkAccess to perform a fine grained access check

For each AuthzRequest there is a corresponding AuthorizationChecker. The AuthorizationCheckerFactory is used to correlate a AuthzRequest with its corresponding checker. At some future point we may allow extensions beyond these 4 request types, but for the moment this is closed.