[Server Error] Can't log in after upgrading to 3.3.8 #11073
-
I just updated Netbox from 2.11.11 to 3.1.0, then 3.3.8 (had contacts that need to be migrated), when I got this error message when I try to log in: Server ErrorA file permission error was detected while processing this request. Common causes include the following: Insufficient write permission to the media root - The configured media root is . Ensure that the user NetBox runs as has access to write files to all locations within this path. The complete exception is provided below:
I haven't any issues after upgrading to 3.1.0, but it looks like something got broken with 'django3_saml2_nbplugin' the problem is that I'm continuing the job of someone else and I'm not completely sure about this This should be the interested section in # Remote authentication support
REMOTE_AUTH_ENABLED = True
#REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend'
REMOTE_AUTH_BACKEND = 'django3_saml2_nbplugin.backends.SAML2CustomAttrUserBackend'
REMOTE_AUTH_HEADER = 'HTTP_REMOTE_USER'
REMOTE_AUTH_AUTO_CREATE_USER = True
REMOTE_AUTH_DEFAULT_GROUPS = []
REMOTE_AUTH_DEFAULT_PERMISSIONS = {}
# Enable installed plugins. Add the name of each plugin to the list.
PLUGINS = ['django3_saml2_nbplugin'] Doe someone know how can I resolve? UPDATE: This is the PLUGINS_CONFIG = {
'django3_saml2_nbplugin': {
'AUTHENTICATION_BACKEND': REMOTE_AUTH_BACKEND,
'ASSERTION_URL': 'https://dcimtest.netbox.cloud/api/plugins',
'ENTITY_ID': 'https://dcimtest.netbox.cloud/',
# Metadata is required, choose either remote url
'METADATA_AUTO_CONF_URL': "https://login.microsoftonline.com/6d3fc077-0dff-43a1-b212-44341fb2f4d1/federationmet$ # or local file path
# 'METADATA_LOCAL_FILE_PATH': '/opt/netbox/DCIM.xml',
# Settings for SAML2CustomAttrUserBackend. Optional.
'CUSTOM_ATTR_BACKEND': {
# Attribute containing the username. Optional.
'USERNAME_ATTR': 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress',
# Attribute containing the user's email. Optional.
'MAIL_ATTR': 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress',
# Attribute containing the user's first name. Optional.
'FIRST_NAME_ATTR': 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname',
# Attribute containing the user's last name. Optional.
'LAST_NAME_ATTR': 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname',
# Set to True to always update the user on logon
# from SAML attributes on logon. Defaults to False.
'ALWAYS_UPDATE_USER': True,
# Attribute that contains groups. Optional.
#'GROUP_ATTR': 'http://schemas.microsoft.com/ws/2008/06/identity/claims/groups',
# Dict of user flags to groups.
# If the user is in the group then the flag will be set to True. Optional.
'FLAGS_BY_GROUP': {
'is_staff': 'c273533e-60a5-4dc7-98d3-09841d1eb591',
'is_superuser': 'c273533e-60a5-4dc7-98d3-09841d1eb591'
},
# Dict of SAML groups to NetBox groups. Optional.
# Groups must be created beforehand in NetBox.
'GROUP_MAPPINGS': {
'd51a17ec-ebba-4647-ac49-c9696a30efbf': 'DCIM-readonly',
'dff13f8f-2167-4ede-bd7e-6a17574cce00': 'DCIM-operator',
'0a310d41-3c26-44a0-91c9-d0c3a656ed5c': 'DCIM-tenant-admins',
'5fafd340-f646-4e38-83e4-2d2a9655141a': 'DCIM-SOC'
}
}
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You didn't show your Does it resolve your problem? |
Beta Was this translation helpful? Give feedback.
You didn't show your
PLUGINS_CONFIG
, but see this: jeremyschulman/django3-auth-saml2#12 (comment)Does it resolve your problem?