-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfiguration.py
55 lines (51 loc) · 2.22 KB
/
configuration.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Remote authentication support
REMOTE_AUTH_ENABLED = True
REMOTE_AUTH_BACKEND = 'social_core.backends.saml.SAMLAuth'
SOCIAL_AUTH_SAML_SP_ENTITY_ID = 'https://netbox.example.local'
SOCIAL_AUTH_SAML_SP_PUBLIC_CERT = 'binary-certificate-netbox-see.crt-file'
SOCIAL_AUTH_SAML_SP_PRIVATE_KEY = 'binary-key-certificate-netbox-see-.key-file'
SOCIAL_AUTH_SAML_ORG_INFO = {
"en-US": {
"name": "Netbox",
"displayname": "Netbox",
"url": "https://netbox.example.local"
}
}
SOCIAL_AUTH_SAML_TECHNICAL_CONTACT = {
"emailAddress": "email@emailaddress.com",
"givenName": "Technical"
}
SOCIAL_AUTH_SAML_SUPPORT_CONTACT = {
"emailAddress": "email@emailaddress.com",
"givenName": "Support"
}
SOCIAL_AUTH_SAML_ENABLED_IDPS = {
"SAML": {
"entity_id": "https://sts.windows.net/id-app-on-azure/",
"url": "https://login.microsoftonline.com/id-app-on-azure/saml2",
"attr_user_permanent_id": "name_id",
"attr_username": "name_id",
"attr_first_name": "attr_first_name",
"attr_last_name": "attr_last_name",
"attr_email": "attr_email",
"attr_full_name": "attr_full_name",
"x509cert": "app-certificate-on-azure-"
}
}
REMOTE_AUTH_AUTO_CREATE_USER = True
SOCIAL_AUTH_SAML_EXTRA_DATA = [("http://schemas.microsoft.com/ws/2008/06/identity/claims/groups", "groups")]
SOCIAL_AUTH_SAML_SECURITY_CONFIG = {"requestedAuthnContext": False}
SOCIAL_AUTH_REDIRECT_IS_HTTPS = True
SOCIAL_AUTH_PIPELINE = (
'social_core.pipeline.social_auth.social_details',
'social_core.pipeline.social_auth.social_uid',
'social_core.pipeline.social_auth.social_user',
'social_core.pipeline.user.get_username',
'social_core.pipeline.social_auth.associate_by_email',
'social_core.pipeline.user.create_user',
'social_core.pipeline.social_auth.associate_user',
'netbox.authentication.user_default_groups_handler',
'social_core.pipeline.social_auth.load_extra_data',
'social_core.pipeline.user.user_details',
'netbox.samlgetgroups.set_role',
)