Replies: 6 comments
-
I don't think you need to define |
Beta Was this translation helpful? Give feedback.
-
These are my raw notes from Netbox and SAML. https://gist.github.com/aussielunix/46f6e53bf7c6d231ef0a296215abbf07 |
Beta Was this translation helpful? Give feedback.
-
Hello, We got this working, however because someone else in my team had configured LDAP authentication successfully before, all we had to do was leverage quite a bit of that code. We did the following: Essentially added a python-social-auth pipeline with our method to get the jwt from SSO and decode jwt, and populated groups into netbox user.groups, and set 2 flags user.is_staff and user.is_superuser.
from extras.plugins import PluginConfig class TestAPIConfig(PluginConfig): config = TestAPIConfig
import jwt ALLOWED_USER_GROUPS_LIST = [] def my_test_func(strategy, backend, request, *args, **kwargs):
add to bottom SOCIAL_AUTH_PIPELINE = (
)
FROM /docker.io/netboxcommunity/netbox:v3.3.4-2.2.0 ADD ./custom-initializers /opt/netbox/initializers COPY startup-hooks.sh startup-hooks.sh CMD ["/opt/netbox/docker-entrypoint.sh", "/opt/netbox/netbox/startup-hooks.sh" ] LABEL com.mycompany.image.ContactGroup="me.lastname@somewhere.com" All the file locations are relative to your netbox root Good Luck |
Beta Was this translation helpful? Give feedback.
-
I have a question: Right now the local login and the Azure login shows up, The issue is that the Username/Password will no longer accept Ldap, it only accepts local user. It will be nice if both worked at the same time, meaning if user prefers Ldap and enters Ldap username and password use that, OR if he clicks SSO use that. That is now not possible once I have SSO working. Is there any way Netbox can allow both to work simulataneously. Prakash |
Beta Was this translation helpful? Give feedback.
-
how are we declaring/calling the py file we created? |
Beta Was this translation helpful? Give feedback.
-
There seems to still be problems with SSO in version 4.2.4 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all
as anyone had any luck in getting SSO working with Azure AD please with Netbox 3.1 (Single Sign-On (SSO) Authentication (#7649)
I've not been able to any guides on how to set up and came across the thread below.
#7649
I've set up a new Enterprise App in Azure AD configured for SAML, and have the Application ID etc.
added entries to configuration.py (I've masked entries like the Application ID etc for the purposes of this)
LOGIN_REQUIRED = True
REMOTE_AUTH_ENABLED = True
REMOTE_AUTH_BACKEND = 'social_core.backends.azuread_tenant.AzureADTenantOAuth2'
REMOTE_AUTH_AUTO_CREATE_USER = True
SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_RESOURCE = '(Application ID)'
SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_KEY = '(Application ID)'
SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_SECRET = '(Secret Token)'
SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_TENANT_ID = '(Tenant ID)'
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'
When I launch Netbox in the browser I successfully get prompted to use SSO provider which directs me to a Microsoft sign-in page.
Or use an SSO provider:
[azuread-tenant-oauth2]
Upon successful authentication the following is displayed:
ADSTS650057: Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client's application registration. Client app ID: (Application ID) (Netbox Test). Resource value from request: (Application ID). Resource app ID: (Application ID). List of valid resources from app registration: .
any ideas please what the issue could be?
TIA
Beta Was this translation helpful? Give feedback.
All reactions