Skip to content

[BUG] CLI: Azure Auth provider options are not correctly sorted, the options should be reverse order #46128

@dasarinaidu

Description

@dasarinaidu

Rancher Server Setup

Rancher version: v2.9-d2fa8a7d6116c48a814ee7983af522d614461e49-head
Installation option (Docker install/Helm Chart): HA / Docker

Describe the bug
On CLI the options are not sorted properly, AzureADProvider displaying first and then the localProvider. The options should be reverse

CLI: Azure Auth provider options are not correctly sorted, the options should be reverse.

I connected to OpenLDAP and i run the CLI the Auth providers list coming in the order as below
Auth providers:
0 - localProvider
1 - openLdapProvider
Select auth provider:
Ex:
kubectl get pods -A

INFO[0000] Saving config to /Users/XXXXXXX
https://xxxxxx/v3-public/authProviders
Auth providers:
0 - localProvider
1 - openLdapProvider
Select auth provider:

When I connected to AzureAd and i run the CLI the Auth providers list coming in the order as below(Constancy is missing)
https://xxxxx/v3-public/authProviders
Auth providers:
0 - azureADProvider
1 - localProvider
Select auth provider:
Expected: The sorting order should be the same like openLdap auth

Steps to reproduce:

  1. Provision rancher v2.9-head
  2. Enable AzureAD
  3. Download CLI version v2.9.0-rc4 from https://github.com/rancher/cli/releases/tag/v2.9.0-rc4
  4. Setup the path and run rancher from the terminal : rancher
  5. Export kubeconfig for the local cluster
  6. Run : kubectl get pods -A
  7. Check for the Options to select from CLI

Result
a. The options coming as below

https://xxxxx/v3-public/authProviders
Auth providers:
  0 - azureADProvider
  1 - localProvider
   Select auth provider: 
Expected: The sorting order should be the same like openLdap auth

b. Missing consistency with other auth providers

Expected Result

a. The options should be reversed and should display as  below
Auth providers:
  0 - localProvider
  1 - azureADProvider
  Select auth provider: 

Additional context

  1. The options functionality is working as expected, i.e when i select 0 the AzureADProvider flow is initiated

Metadata

Metadata

Labels

area/authenticationarea/azurearea/clikind/bugIssues that are defects reported by users or that we know have reached a real releasepriority/2release-noteNote this issue in the milestone's release notesteam/colliethe team that is responsible for auth and rbac within rancher

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions