Created
February 5, 2022 10:56
-
-
Save tobiasge/8a34ef948715404c03b673334f8ca017 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.4' | |
services: | |
ldap: | |
image: bitnami/openldap:2.6 | |
environment: | |
- LDAP_ROOT=dc=netbox,dc=demo | |
- LDAP_ADMIN_USERNAME=admin | |
- LDAP_ADMIN_PASSWORD=Voo5xooghohyahv9oef9 | |
volumes: | |
- ldap-data-files:/bitnami/openldap | |
- ./ldifs:/ldifs:z,ro | |
netbox: | |
image: netboxcommunity/netbox:latest-ldap | |
ports: | |
- "8000:8080" | |
environment: | |
AUTH_LDAP_SERVER_URI: "ldap://ldap:1389" | |
AUTH_LDAP_BIND_DN: "cn=netbox-service,ou=Users,dc=netbox,dc=demo" | |
AUTH_LDAP_BIND_PASSWORD: "cheibooX5uWiengiBeoy" | |
AUTH_LDAP_USER_SEARCH_BASEDN: "ou=Users,dc=netbox,dc=demo" | |
AUTH_LDAP_GROUP_SEARCH_BASEDN: "ou=Groups,dc=netbox,dc=demo" | |
AUTH_LDAP_REQUIRE_GROUP_DN: "cn=NetboxUsers,ou=groups,dc=netbox,dc=demo" | |
AUTH_LDAP_IS_ADMIN_DN: "cn=NetboxAdmins,ou=groups,dc=netbox,dc=demo" | |
AUTH_LDAP_IS_SUPERUSER_DN: "cn=NetboxSuperUsers,ou=groups,dc=netbox,dc=demo" | |
AUTH_LDAP_USER_SEARCH_ATTR: "uid" | |
AUTH_LDAP_ATTR_LASTNAME: "sn" | |
AUTH_LDAP_ATTR_FIRSTNAME: "givenName" | |
AUTH_LDAP_GROUP_TYPE: "NestedGroupOfNamesType" | |
AUTH_LDAP_GROUP_SEARCH_CLASS: "groupOfNames" | |
netbox-worker: | |
image: netboxcommunity/netbox:latest-ldap | |
netbox-housekeeping: | |
image: netboxcommunity/netbox:latest-ldap | |
volumes: | |
ldap-data-files: | |
driver: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REMOTE_AUTH_ENABLED = True | |
REMOTE_AUTH_BACKEND = 'netbox.authentication.LDAPBackend' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Root creation | |
dn: dc=netbox,dc=demo | |
objectClass: dcObject | |
objectClass: organization | |
dc: netbox | |
o: Netbox Demo Org | |
# ----------------------------------------------------------------------------- | |
# Organisational Units | |
dn: ou=Users,dc=netbox,dc=demo | |
objectClass: organizationalUnit | |
ou: Users | |
dn: ou=ServiceUsers,dc=netbox,dc=demo | |
objectClass: organizationalUnit | |
ou: ServiceUsers | |
dn: ou=Groups,dc=netbox,dc=demo | |
objectClass: organizationalUnit | |
ou: Groups | |
# ----------------------------------------------------------------------------- | |
# Users | |
dn: cn=netbox-service,ou=Users,dc=netbox,dc=demo | |
uid: netbox-service | |
cn: Netbox ServiceUser | |
sn: ServiceUser | |
givenName: Netbox | |
objectClass: inetOrgPerson | |
userPassword: cheibooX5uWiengiBeoy | |
dn: cn=Netbox Admin,ou=Users,dc=netbox,dc=demo | |
uid: netbox-admin | |
cn: Netbox Admin | |
sn: Admin | |
givenName: Netbox | |
objectClass: inetOrgPerson | |
userPassword: kor4Mod0AeFahGh1quo2 | |
# ----------------------------------------------------------------------------- | |
# Groups | |
dn: cn=NetboxSuperUsers,ou=groups,dc=netbox,dc=demo | |
cn: NetboxSuperUsers | |
objectClass: groupOfNames | |
member: cn=Netbox Admin,ou=Users,dc=netbox,dc=demo | |
dn: cn=NetboxAdmins,ou=groups,dc=netbox,dc=demo | |
cn: NetboxAdmins | |
objectClass: groupOfNames | |
member: cn=Netbox Admin,ou=Users,dc=netbox,dc=demo | |
dn: cn=NetboxUsers,ou=groups,dc=netbox,dc=demo | |
cn: NetboxUsers | |
objectClass: groupOfNames | |
member: cn=NetboxAdmins,ou=groups,dc=netbox,dc=demo | |
member: cn=NetboxSuperUsers,ou=groups,dc=netbox,dc=demo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment