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

OIDC Authentication using Okta Authorization Server URL #892

Open
rboucher-me opened this issue Mar 7, 2024 · 0 comments
Open

OIDC Authentication using Okta Authorization Server URL #892

rboucher-me opened this issue Mar 7, 2024 · 0 comments

Comments

@rboucher-me
Copy link

Expected behaviour

Successful OIDC authentication when using an Okta Authorization Server API URL (https://{{okta-domain}}/oauth2/{{authorization-server-id}}) instead of the default API URL (https://{{okta-domain}}/oauth2). This behaviour is consistent with current documentation. This issue is to request support for Okta Authorization Servers.

Actual behaviour

When trying to authenticate using OIDC, a Signature verification failed exception is thrown in social_core/backends/open_id_connect.py. Okta logs show successful app.oauth2.as.token.grant.access_token and successful app.oauth2.as.token.grant.id_token for the same authentication event.

What are the steps to reproduce this issue?

  1. Configure an Okta Authorization Server (Security > API)
  2. Use the generated Authorization Server URI as the authentication endpoint
  3. Attempt to authenticate (exception thrown)
  4. Use the default URI as the authentication endpoint
  5. Attempt to authenticate (successful)

Any logs, error output, etc?

Exception traceback:

/opt/netbox/venv/lib/python3.11/site-packages/social_core/actions.py, line 49, in do_complete
        user = backend.complete(user=user, redirect_name=redirect_name, *args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

/opt/netbox/venv/lib/python3.11/site-packages/social_core/backends/base.py, line 39, in complete
        return self.auth_complete(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

/opt/netbox/venv/lib/python3.11/site-packages/social_core/utils.py, line 253, in wrapper
            return func(*args, **kwargs)
                        ^^^^^^^^^^^^^^^^^^^^^ 

/opt/netbox/venv/lib/python3.11/site-packages/social_core/backends/oauth.py, line 418, in auth_complete
        response = self.request_access_token(
                        
/opt/netbox/venv/lib/python3.11/site-packages/social_core/backends/open_id_connect.py, line 254, in request_access_token
        self.id_token = self.validate_and_return_id_token(
                             
/opt/netbox/venv/lib/python3.11/site-packages/social_core/backends/open_id_connect.py, line 214, in validate_and_return_id_token
            raise AuthTokenError(self, "Signature verification failed")
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Any other comments?

This appears to be related/similar to issues 662 and 663

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant