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

The rename of SSO from Microsoft Azure AD to Entra ID doesn't work as expected #17774

Closed
lucafabbri365 opened this issue Oct 16, 2024 · 8 comments · Fixed by #17809
Closed

The rename of SSO from Microsoft Azure AD to Entra ID doesn't work as expected #17774

lucafabbri365 opened this issue Oct 16, 2024 · 8 comments · Fixed by #17809
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@lucafabbri365
Copy link

lucafabbri365 commented Oct 16, 2024

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

v4.1.4

Python Version

3.10

Steps to Reproduce

Update from NetBox v4.1.1 to v4.1.4 (SSO with Entra ID enabled)

Expected Behavior

According to the #15829, the new label Microsoft Entra ID was expected when SSO with Entra ID is enabled on NetBox.

Observed Behavior

The login screen doesn't show the Microsoft Entra ID label

image

The link associated to SSO button is .../oauth/login/azuread-oauth2/?next=%2F. With reference to doc Microsoft Entra ID, if I change the Redirect URI (Azure App Registrations) from /oauth/complete/azuread-oauth2/ to /oauth/complete/entraid-oauth2/. login doesn't work anymore.

@lucafabbri365 lucafabbri365 added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Oct 16, 2024
@lucafabbri365 lucafabbri365 changed the title SSO renaming from Microsoft Azure AD to Entra ID doesn't work as expected The rename of SSO from Microsoft Azure AD to Entra ID doesn't work as expected Oct 16, 2024
@arthanson arthanson added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: low Does not significantly disrupt application functionality, or a workaround is available and removed status: needs triage This issue is awaiting triage by a maintainer labels Oct 16, 2024
@arthanson
Copy link
Collaborator

@alehaa can you please check this if this is occurring on your setup as you worked on the change for this? I don't have Azure setup to see if this is correct.

@florianschendel
Copy link

Hi,
same issue. Netbox is running on-prem in our Kubernetes Cluster.
I did only the upgrade from 4.1.3 to 4.1.4 with activate Entrad-ID SSO.
Now it shows "azuread-oauth2" on the button as in the sreesnhot or @lucafabbri365.

I changed nothing on our configuration, login is still possible with the old Redirect URI "azuread-oauth2".

@rock7632
Copy link

I'm getting the same issue after updating to 4.1.4

@alehaa
Copy link
Contributor

alehaa commented Oct 17, 2024

@arthanson I‘m not a customer of Azure as well. I just did the renaming as suggested in #15829.

@jeremystretch maybe we can revert the changes to get the users back online?

@alehaa
Copy link
Contributor

alehaa commented Oct 17, 2024

After having a look into the original PR, the one thing that was not cosmetic in #17616 was the rename of keys in netbox/netbox/authentication/init.py. However, python social didn't seem to have their code changed to Entra ID yet.

@lucafabbri365, @florianschendel, @rock7632 can you please check in your deployment, if it helps to rename the dictionary keys back as follows? This should change the deployment back to a working state and just tweak the UI label.

diff --git a/netbox/netbox/authentication/__init__.py b/netbox/netbox/authentication/__init__.py
index 7394f6ded4..f80454f999 100644
--- a/netbox/netbox/authentication/__init__.py
+++ b/netbox/netbox/authentication/__init__.py
@@ -20,10 +20,10 @@
     'amazon': ('Amazon AWS', 'aws'),
     'apple': ('Apple', 'apple'),
     'auth0': ('Auth0', None),
-    'entraid-oauth2': ('Microsoft Entra ID', 'microsoft'),
-    'entraid-b2c-oauth2': ('Microsoft Entra ID', 'microsoft'),
-    'entraid-tenant-oauth2': ('Microsoft Entra ID', 'microsoft'),
-    'entraid-v2-tenant-oauth2': ('Microsoft Entra ID', 'microsoft'),
+    'azuread-oauth2': ('Microsoft Entra ID', 'microsoft'),
+    'azuread-b2c-oauth2': ('Microsoft Entra ID', 'microsoft'),
+    'azuread-tenant-oauth2': ('Microsoft Entra ID', 'microsoft'),
+    'azuread-v2-tenant-oauth2': ('Microsoft Entra ID', 'microsoft'),
     'bitbucket': ('BitBucket', 'bitbucket'),
     'bitbucket-oauth2': ('BitBucket', 'bitbucket'),
     'digitalocean': ('DigitalOcean', 'digital-ocean'),

@lucafabbri365
Copy link
Author

Hello @alehaa,
yep: renaming dictionary keys restored label (with new name).

image

Thank you.

@alehaa
Copy link
Contributor

alehaa commented Oct 17, 2024

@lucafabbri365 Thanks for the quick response!

@arthanson can you please assign this to me, so I can push a new PR?

@arthanson arthanson added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Oct 17, 2024
@arthanson
Copy link
Collaborator

@alehaa assigned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants