Abhishek Kumar created RANGER-5899:
--------------------------------------

             Summary: Apply header-based roles to every request in a Ranger 
Admin session
                 Key: RANGER-5899
                 URL: https://issues.apache.org/jira/browse/RANGER-5899
             Project: Ranger
          Issue Type: Bug
          Components: ranger-authn
            Reporter: Abhishek Kumar
            Assignee: Abhishek Kumar


With header-based authentication including roles (RANGER-5767), the role in the 
roles header only takes effect when the user is first auto-provisioned. After 
that it's fixed in the DB, and changes in the header are ignored until the 
session expires.

This change:
 * Re-checks the username and roles header on every request. The highest role 
wins (admin > auditor > user), and KMS roles are ignored.
 * Keeps that role in the session only, never in the DB, and refreshes the 
session's role and module permissions when the header changes. Without a roles 
header, the user's DB roles apply.
 * Shows the session role in the user's own profile and in Users. Other users 
still see their DB roles.
 * Accepts the role namesĀ {{{}authz-role-*{}}}, scoped names likeĀ 
{{{}<namespace>:authz-role-admin{}}}, and Ranger's internal role names.
 * Always auto-provisions users as ROLE_USER.

Password, Kerberos, SSO, and logins with header auth disabled are unchanged. 
There's no schema change.



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

Reply via email to