AzureAd opened connect question (No module named 'netbox.custom_pipeline') #13919
-
Hi team, I'm struggling to understand how to configure opened connected. AUTHENTICATION_BACKENDS = ['social_core.backends.azuread.AzureADOAuth2']
SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_KEY = 'keyID'
SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_SECRET = 'SECRET'
SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_TENANT_ID = 'TENTID'
REMOTE_AUTH_BACKEND = 'social_core.backends.azuread_tenant.AzureADTenantOAuth2'
LOGIN_URL = '/oauth/login/azuread-tenant-oauth2/'
ROOT_URLCONF = 'netbox.mydomaine.com'
SOCIAL_AUTH_POSTGRES_JSONFIELD = True
LOGIN_REQUIRED = True
SOCIAL_AUTH_PIPELINE = (
'social_core.pipeline.social_auth.social_details',
'social_core.pipeline.social_auth.social_uid',
'social_core.pipeline.social_auth.auth_allowed',
'social_core.pipeline.social_auth.social_user',
'social_core.pipeline.user.get_username',
'netbox.custom_pipeline.set_username',
'social_core.pipeline.user.create_user',
'social_core.pipeline.social_auth.associate_user',
'social_core.pipeline.social_auth.load_extra_data',
'social_core.pipeline.user.user_details',
'netbox.custom_pipeline.set_role'
) I did work I thinks but now I got a problem with netbox.custom_pipeline <class 'ModuleNotFoundError'> No module named 'netbox.custom_pipeline' Python version: 3.10.12 Do you have any idea how can I fixe that. Is my parameter wrong ? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It looks like you are trying to use it for Microsoft Azure? If so, you can follow the docs here: https://docs.netbox.dev/en/stable/administration/authentication/microsoft-azure-ad/ You mostly just need to following in your configuration.py:
Don't touch the settings.py and you should be able to remove the extra lines you have shown above if those are in your configuration.py |
Beta Was this translation helpful? Give feedback.
-
Amazing ! Thanks ! It works. How could miss that.
|
Beta Was this translation helpful? Give feedback.
-
The python library being used is python-social-auth, their documentation has other providers and settings, see: https://python-social-auth.readthedocs.io/en/latest/backends/google.html though these haven't been specifically tested with NetBox (there are over 100 of them). |
Beta Was this translation helpful? Give feedback.
It looks like you are trying to use it for Microsoft Azure? If so, you can follow the docs here: https://docs.netbox.dev/en/stable/administration/authentication/microsoft-azure-ad/ You mostly just need to following in your configuration.py:
Don't touch the settings.py and you should be able to remove the extra lines you have shown above if those are in your configuration.py