Closed PVM-NL closed 1 year ago
# Attribute that contains groups. Optional.
'GROUP_ATTR': 'groups',
Try setting this to the full claim name (the URL-looking string in your image). I see I have used these successfully at some point:
"CUSTOM_ATTR_BACKEND": {
"USERNAME_ATTR": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name",
"MAIL_ATTR": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
"FIRST_NAME_ATTR": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname",
"LAST_NAME_ATTR": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",
"ALWAYS_UPDATE_USER": True,
"GROUP_ATTR": "http://schemas.microsoft.com/ws/2008/06/identity/claims/groups",
Update: maybe this is better source: https://github.com/jeremyschulman/django3-auth-saml2/issues/12#issuecomment-985310213
# Attribute that contains groups. Optional. 'GROUP_ATTR': 'groups',
Try setting this to the full claim name (the URL-looking string in your image). I see I have used these successfully at some point:
"CUSTOM_ATTR_BACKEND": { "USERNAME_ATTR": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "MAIL_ATTR": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", "FIRST_NAME_ATTR": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname", "LAST_NAME_ATTR": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname", "ALWAYS_UPDATE_USER": True, "GROUP_ATTR": "http://schemas.microsoft.com/ws/2008/06/identity/claims/groups",
Update: maybe this is better source: jeremyschulman/django3-auth-saml2#12 (comment)
Changed but getting the following:
Sorry about the mess, I should have deleted the whole comment (but I won't now).
See the comment that I linked.
I changed it and also the Update to false and write permissions are gone as soon as i set it to true it fails.
# Attribute containing the username. Optional.
'USERNAME_ATTR': "name",
# Attribute containing the user's email. Optional.
'MAIL_ATTR': "emailAddress",
# Attribute containing the user's first name. Optional.
'FIRST_NAME_ATTR': "givenName",
# Attribute containing the user's last name. Optional.
'LAST_NAME_ATTR': "surname",
# Set to True to always update the user on logon
# from SAML attributes on logon. Defaults to False.
'ALWAYS_UPDATE_USER': False,
# Attribute that contains groups. Optional.
'GROUP_ATTR': "http://schemas.microsoft.com/ws/2008/06/identity/claims/groups",
# Attribute that contains roles. Optional.
But still the groups wont come with.
Hi,
I manage to get the plugin running but im facing another issue not sure if it is configuration issue or anything. Problem is that the app isnt getting the group linked to netbox as the user should be in the mentioned group on Azure AD.
See netbox screenshots:
![image](https://github.com/jeremyschulman/netbox-plugin-auth-saml2/assets/120473446/93cd63c3-a52a-492d-a3da-07035cf14c37)
See Azure AD screenshots:
![image](https://github.com/jeremyschulman/netbox-plugin-auth-saml2/assets/120473446/d6005b89-0c46-4414-8841-009058e90288)
Will post the entire configuration, so other can take advantage of it aswell btw. linux dependencies: (workaround as with pip you get error)
apt install xmlsec1
local_requirements:
configuration.py
nginx: