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

Some REMOTE_AUTH_ settings missing #992

Closed
heapdavid opened this issue Apr 20, 2023 · 4 comments
Closed

Some REMOTE_AUTH_ settings missing #992

heapdavid opened this issue Apr 20, 2023 · 4 comments
Labels
enhancement The issue describes an enhancement that we would like to implement in the future.

Comments

@heapdavid
Copy link

Desired Behavior

I'd like to be able to provide all the Remote Auth settings as environment variables.

Contrast to Current Behavior

Currently only

REMOTE_AUTH_ENABLED
REMOTE_AUTH_BACKEND
REMOTE_AUTH_HEADER
REMOTE_AUTH_AUTO_CREATE_USER
REMOTE_AUTH_DEFAULT_GROUPS

are able to be pulled in from environment variables

Required Changes

Adding the ability to declare the other environment variables.

Discussion: Benefits and Drawbacks

I'm aware that I can do it currently by adding an extra file to the configuration folder but it would be good to not have to mount an extra file into the container.

Also aware that REMOTE_AUTH_DEFAULT_PERMISSIONS isn't recommended due to the complexity of the value - ref #890 - but that shouldn't preclude the other variables from being made available.

@tobiasge tobiasge added the enhancement The issue describes an enhancement that we would like to implement in the future. label Apr 20, 2023
@locomoco28
Copy link

locomoco28 commented May 9, 2023

We cannot set up Azure AD (Tenants), the user ends up getting redirected to the Azure auth server with client_id=None set in the query parameters

This seems to be caused by this issue. The SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_KEY (AzureAD App ID) variable is set but seemingly not being forwarded to Netbox


could be related to #653

@emilyastranova
Copy link

We are having this issue as well

@emilyastranova
Copy link

Was able to fix by adding the following to configuration.py:

SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_KEY = environ.get('SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_KEY', '')
SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_SECRET = environ.get('SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_SECRET', '')
SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_TENANT_ID = environ.get('SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_TENANT_ID', '')

Of course, you'll need to add whichever one you're using, I am using tenant.

@hendrikbl
Copy link
Contributor

I just opened a PR that adds the missing config options #1144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue describes an enhancement that we would like to implement in the future.
Projects
None yet
Development

No branches or pull requests

5 participants