Tamás Hanicz created KNOX-3570:
----------------------------------

             Summary:  Make the roles lookup in the auth service optional per 
principal with a configurable pattern
                 Key: KNOX-3570
                 URL: https://issues.apache.org/jira/browse/KNOX-3570
             Project: Apache Knox
          Issue Type: Improvement
          Components: Server
    Affects Versions: 3.1.0
            Reporter: Tamás Hanicz
            Assignee: Tamás Hanicz


When the identity assertion provider hasn't already done the roles lookup 
(ROLES_LOOKUP_EXECUTED isn't set), AbstractAuthResource.lookupRoles() calls 
LDAPRolesLookupService for every principal on every pre-auth/ext-authz check. 
That's the case whenever the HadoopGroupProvider doesn't use Knox's in-process 
LDAP service. With the REST-backed RestApiLdapRolesLookup, every request makes 
an uncached cross-cluster REST call, LDAP users included.

This adds a new service parameter, preauth.roles.lookup.principal.pattern. When 
it's set, the roles lookup runs only for principals that fully match the regex, 
for example system:serviceaccount:.*. Other principals skip the lookup and get 
their groups only. When it's not set, every principal is looked up as before.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to