Interface AuthorizationPreprocessor

  • All Known Implementing Classes:
    JobAuthorizationAttributeProcessor, NucleusAuthorizationPreprocessor

    @Contract
    public interface AuthorizationPreprocessor
    Defines the API for services which provide additional information to be used during authorization.

    The implementations of this interface provide name/value pairs as Maps which will become AzAttribute objects attached to the subject, the resource, or the action before command security invokes the authorization service. We use Maps here rather than collections of AzAttributes to minimize dependencies on Az classes.

    Author:
    tjquinn
    • Method Detail

      • describeAuthorization

        void describeAuthorization​(Subject subject,
                                   String resourceName,
                                   String action,
                                   AdminCommand command,
                                   Map<String,​Object> context,
                                   Map<String,​String> subjectAttributes,
                                   Map<String,​String> resourceAttributes,
                                   Map<String,​String> actionAttributes)
        Optionally adds to the attributes that will be attached to the Subject, the resource, and the action used for an upcoming authorization check.
        Parameters:
        context - map describing the authorization context (such as command parameter names and values)
        subjectAttributes - name/value pairs for attributes to be attached to the subject
        resourceAttributes - name/value pairs for attributes to be attached to the resource
        actionAttributes - name/value pairs for attributes to be attached to the action