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

[Bug]: Azure AD authentication fails with a working configuration from v0.21.2 -> v0.22.0+ #2836

Closed
1 task done
ericj-msft opened this issue Mar 1, 2024 · 3 comments
Closed
1 task done
Assignees
Labels
bug Something isn't working

Comments

@ericj-msft
Copy link

Contact Details

eric@loopr.ai

What happened?

Using the same working configuration since prior to v0.21.2 and docker containers, changing the SERVER_IMAGE_TAG in netmaker.env to v0.22.0 or later will no longer allow SSO logins, claiming that "Your Netmaker server does not have OAuth configured.", despite the same configuration working with v0.21.2 and earlier if SERVER_IMAGE_TAG is set to these versions.

Version

v0.23.0

What OS are you using?

Linux

Relevant log output

[netmaker] 2024-03-01 06:35:31 processed request error: unauthorized
[netmaker] 2024-03-01 06:35:52 error retrieving oauth state: no result found
[netmaker] 2024-03-01 06:35:52 error when getting user info from azure: invalid oauth state

Contributing guidelines

  • Yes, I did.
@ericj-msft ericj-msft added the bug Something isn't working label Mar 1, 2024
@ericj-msft
Copy link
Author

OAuth section from netmaker.env:

###
#
# OAuth section
#
###
# "<azure-ad|github|google|oidc>"
AUTH_PROVIDER=azure-ad
# "<client id of your oauth provider>"
CLIENT_ID=_<REDACTED>_
# "<client secret of your oauth provider>"
CLIENT_SECRET=_<REDACTED>_
SERVER_HTTP_HOST=api._<REDACTED>_
# "https://dashboard.<netmaker base domain>"
FRONTEND_URL=https://dashboard._<REDACTED>_
# "<only for azure, you may optionally specify the tenant for the OAuth>"
AZURE_TENANT=_<REDACTED>_
# https://oidc.yourprovider.com - URL of oidc provider
OIDC_ISSUER=https://login.microsoftonline.com/_<SAME AS AZURE_TENANT>_/v2.0/
EXPORTER_API_PORT=8085
JWT_VALIDITY_DURATION=43200
RAC_AUTO_DISABLE=true

@abhishek9686
Copy link
Member

abhishek9686 commented Mar 13, 2024

there were no changes to Oauth in recent releases, will check this on our side to determine if there is any possible issue and any configuration needs to be updated

@abhishek9686
Copy link
Member

@ericj-msft patched the v0.23.0 with a fix for the azure-ad, can you try again by pulling latest image of v0.23.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants