Skip to content

Social auth for new users is not working #10770

@dostalradim

Description

@dostalradim

NetBox version

v3.3.6

Python version

3.10

Steps to Reproduce

I tested authentication against Keycloak with social auth. With following configuration.

LOGIN_REQUIRED: "True"
REMOTE_AUTH_BACKEND: "social_core.backends.keycloak.KeycloakOAuth2"
SOCIAL_AUTH_KEYCLOAK_PUBLIC_KEY: "MIIBIjANBgkqhkiG9w0BA..."
SOCIAL_AUTH_KEYCLOAK_KEY: "netbox"
SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URL: "https://keycloak.../auth/realms/DEV/protocol/openid-connect/auth"
SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL: "https://keycloak.../auth/realms/DEV/protocol/openid-connect/token"
SOCIAL_AUTH_KEYCLOAK_SECRET: "xxx"

Expected Behavior

Successfully authenticated user.

Observed Behavior

The version 3.3.5 is working fine but version 3.3.6 is ending with following error. It is broken only for new users when the user already exists in the local database there is no error and everything is working.

image

netbox log

Internal Server Error: /oauth/complete/keycloak/

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions