Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group list not sorted alphabetically when attempting to add role grant for SAML group #4685

Closed
gaktive opened this issue Dec 2, 2021 · 2 comments

Comments

@gaktive
Copy link
Member

gaktive commented Dec 2, 2021

Issue description:
Per the known caveat with SAML auth providers, a user must select a group from the dropdown list of their own groups, when attempting to grant a role to a group via Rancher RBAC. In Rancher v2.5.9 this list was sorted alphabetically, in v2.6.0 it is not.

Business impact:
Some users have a very large number of groups 100+, and this makes it very difficult to find and select the right group when granting a group a role.

Troubleshooting steps:
N/A

Repro steps:

  • Provision a Rancher v2.5.9 instance (I used github.com/superseb/tf-do-rancher2)
  • Configure the keycloak authentication with the QA keycloak instance (https://github.com/rancherlabs/the-ranch/wiki/Authentication-Test-Setup-configuration#saml-with-keycloak)
  • Reset password of alex.seymour@suse.com user in keycloak and log in to Rancher as the user (user is a member of 100 aseymourgroupX groups)
  • Attempt to add a group grant at global/cluster/project level and observe the group list in the dropdown is sorted.
  • Upgrade to Rancher v2.6.0 and attempt to add a group grant at global/cluster/project level and observe the group list in the dropdown is not sorted.

Workaround:
Is workaround available and implemented? No

Actual behavior:
Group list is not sorted

Expected behavior:
Group list is sorted

Reference: 3460

@richard-cox
Copy link
Member

The associated PR fixes the initial sort of principals but not sort those returned from search, those should be sorted given the proximity to the search term

@brudnak
Copy link
Member

brudnak commented Mar 17, 2022

✅ PASSED

Reproduction Environment

Component Version / Type
Rancher version 2.6.3
Installation option Helm high availability
If Helm Chart k8s cluster RKE1 v1.22.6
Cert Details Self signed
Docker version 20.10.7, build f0df350
Helm version v2.16.8-rancher1
Downstream cluster type not applicable
Downstream K8s version not applicable
Logged in user role Global Admin
Browser type Google Chrome
Browser version 99.0.4844.51 (Official Build) (x86_64)

Reproduction steps

  1. Unable Keycloak SAML Authentication
  2. Navigate to -> hamburger menu -> Groups -> Add Global Roles
  3. Click Select Member
  4. View dropdown list order

Additional Info

001-a1

RESULTS

✅ Expected

Expected the drop down list to be sorted alphabetically

❌ Actual

The drop down list was not sorted alphabetically


Validation Environment

Component Version / Type
Rancher version v2.6-d604b7e02ec8dfcb6c439ca8ed5500e1d1735717-head / d604b7e
Installation option Helm high availability
If Helm Chart k8s cluster RKE1 v1.22.6
Cert Details Self signed
Docker version 20.10.7, build f0df350
Helm version v2.16.8-rancher1
Downstream cluster type not applicable
Downstream K8s version not applicable
Logged in user role Global Admin
Browser type Google Chrome
Browser version 99.0.4844.51 (Official Build) (x86_64)

Validation steps

  1. Unable Keycloak SAML Authentication
  2. Navigate to -> hamburger menu -> Groups -> Add Global Roles
  3. Click Select Member
  4. View dropdown list order

Additional Info

002-a2

RESULTS

✅ Expected

Expected the drop down list to be sorted alphabetically

✅Actual

The drop down list was now sorted alphabetically

@brudnak brudnak closed this as completed Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants