Class RuleBasedAuthorizationPluginBase

    • Constructor Detail

      • RuleBasedAuthorizationPluginBase

        public RuleBasedAuthorizationPluginBase()
    • Method Detail

      • getPermissionNamesForRoles

        public Set<String> getPermissionNamesForRoles​(Collection<String> roles)
        Retrieves permission names for a given set of roles.

        There are two special role names that can be used in the roles list:

        • null meaning permission granted for all requests, even without a role
        • "*" meaning any role will grant the permission
        In order to obtain all permissions a user has based on the user's roles, you also need to include these two special roles to get the full list.
        Parameters:
        roles - a collection of role names.
      • getUserRoles

        public Set<String> getUserRoles​(AuthorizationContext context)
        Finds user roles
        Parameters:
        context - the authorization context to load roles from
        Returns:
        set of roles as strings or empty set if no roles are found
      • getUserRoles

        public abstract Set<String> getUserRoles​(Principal principal)
        Finds users roles
        Parameters:
        principal - the user Principal to fetch roles for
        Returns:
        set of roles as strings or empty set if no roles found
      • edit

        public Map<String,​Object> edit​(Map<String,​Object> latestConf,
                                             List<org.apache.solr.common.util.CommandOperation> commands)
        Description copied from interface: ConfigEditablePlugin
        Operate the commands on the latest conf and return a new conf object If there are errors in the commands , throw a SolrException. return a null if no changes are to be made as a result of this edit. It is the responsibility of the implementation to ensure that the returned config is valid . The framework does no validation of the data
        Specified by:
        edit in interface ConfigEditablePlugin
      • getSpec

        public org.apache.solr.common.util.ValidatingJsonMap getSpec()
        Specified by:
        getSpec in interface org.apache.solr.common.SpecProvider