Skip to content

Add SSO variables to configuration file, so they can be added to the environment files #1139

Open
@SaschaSchwarzK

Description

@SaschaSchwarzK

Desired Behavior

We are using the docker version of netbox and SSO with a Okta backend.

We have to change configuration.py to get the authentication settings from the environment variables.

I think it would be much more convenient for all users if they can simply add the settings for SSO(at least for the integrations outlined in the netbox documentation) in the environment variables, instead of editing the configuration.py. Just like this is done for most other settings as well.

Contrast to Current Behavior

Currently only the basic REMOTE_AUTH settings can be set in the environment variables.

Required Changes

I suggest to change the file configurations.py and add the lines below to support at least the SSO integrations outlined in the documentation.

SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY = environ.get('SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY')
SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET = environ.get('SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET')
SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL = environ.get('SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL')
SOCIAL_AUTH_AZUREAD_OAUTH2_KEY = environ.get('SOCIAL_AUTH_AZUREAD_OAUTH2_KEY')
SOCIAL_AUTH_AZUREAD_OAUTH2_SECRET = environ.get('SOCIAL_AUTH_AZUREAD_OAUTH2_SECRET')

Discussion: Benefits and Drawbacks

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions