WIP: OCPBUGS-63228: groupmapper: make direct API calls to retrieve groups instead of using a cache#205
WIP: OCPBUGS-63228: groupmapper: make direct API calls to retrieve groups instead of using a cache#205liouk wants to merge 1 commit intoopenshift:masterfrom
Conversation
|
@liouk: This pull request references Jira Issue OCPBUGS-63228, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: liouk The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@liouk: This pull request references Jira Issue OCPBUGS-63228, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/retest-required |
|
@liouk: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Per the Synchronizing User Groups on Login enhancement, OIDC groups are synchronized to Openshift groups upon user login. During synchronization, the oauth-server checks current user groups and compares with the ones obtained from the provider via the token; it then calculates which groups need to be added/removed to/from the user, and performs the changes accordingly.
There is currently an issue with this implementation, as the server uses a groups cache to determine user group membership; this cache can be stale, which can lead to problems such as OCPBUGS-63228.
During authorization, correctness is non-negotiable, so we must never rely on a cache to determine user group membership. This PR removes the group cache and replaces it with direct API calls; correctness comes at the cost of increased performance, especially in large clusters with large numbers of groups.