Interface IPermissionManager


public interface IPermissionManager
Provides the protection level of revisions in the context of a specific user.
Since:
4.1
Author:
Eike Stepper
No Implement
This interface is not intended to be implemented by clients.
No Extend
This interface is not intended to be extended by clients.
  • Method Details

    • getPermission

      @Deprecated CDOPermission getPermission(CDORevision revision, CDOBranchPoint securityContext, String userID)
    • getPermission

      CDOPermission getPermission(CDORevision revision, CDOBranchPoint securityContext, ISession session)
      Since:
      4.2
    • hasAnyRule

      boolean hasAnyRule(ISession session, Set<? extends Object> rules)
      Since:
      4.3
    • validateUserID

      default void validateUserID(String userID)
      Validates a user ID that has already been authenticated by the caller. This check is independent of any retained permission state and may be invoked for every authenticated request.

      The default implementation does nothing so existing permission managers remain compatible. Implementations may reject unknown, locked, or otherwise unacceptable users by throwing a SecurityException.

      Parameters:
      userID - the opaque user ID to validate
      Throws:
      SecurityException - if the user ID is not currently acceptable
      Since:
      4.27
    • authorizeCommitDelegation

      default void authorizeCommitDelegation(ISession session, String userID)
      Authorizes a CDO session to execute a delegated commit under a user ID.

      The default implementation accepts delegation only to the authenticated session identity. A user ID is not considered authenticated merely because it is present on a session; the repository must have a session authenticator configured. The built-in security manager allows its administrators to delegate to another validated user. Other permission managers can override this method when they have an equivalent trusted service-identity policy.

      Parameters:
      session - the session that sent the delegated commit
      userID - the user ID under which the commit is requested
      Throws:
      SecurityException - if the session is not authenticated or is not authorized to delegate as the user ID
      Since:
      4.27
    • retainUserID

      default void retainUserID(String userID)
      Retains resource-associated security state for a user ID used by a session without a corresponding authenticated CDO protocol session. Implementations that associate permission state with session lifecycle should acquire the same state here that they acquire when a normal CDO session is opened. Identity acceptance is handled separately by validateUserID(String).

      The default implementation does nothing so existing permission managers that derive all state directly from the supplied session remain compatible.

      Parameters:
      userID - the opaque user ID to retain
      Since:
      4.27
    • releaseUserID

      default void releaseUserID(String userID)
      Releases security state previously acquired through retainUserID(String). Each successful retain call is paired with exactly one release call when the user is no longer active.

      The default implementation does nothing so existing permission managers remain compatible.

      Parameters:
      userID - the opaque user ID to release
      Since:
      4.27