mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Redesigned LDAP (DRAFT)
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
#######################################################################
|
||||
# This file contains the CyMaIS default roles (converted to posix groups)
|
||||
# Roles define which kind of rights users have.
|
||||
#######################################################################
|
||||
|
||||
#######################################################################
|
||||
# Generic container for IT roles
|
||||
#######################################################################
|
||||
dn: {{dn_roles}}
|
||||
objectClass: organizationalUnit
|
||||
ou: roles
|
||||
description: Container for IT access profiles (for rights management)
|
||||
|
||||
#######################################################################
|
||||
# Role: Super Administrator
|
||||
#######################################################################
|
||||
dn: cn=superadministrator,{{dn_roles}}
|
||||
objectClass: posixGroup
|
||||
cn: superadministrator
|
||||
gidNumber: 1000
|
||||
description: Role: Super Administrator – has full control over all systems and settings.
|
||||
|
||||
#######################################################################
|
||||
# Role: Administrator
|
||||
#######################################################################
|
||||
dn: cn=administrator,{{dn_roles}}
|
||||
objectClass: posixGroup
|
||||
cn: administrator
|
||||
gidNumber: 1001
|
||||
description: Role: Administrator – responsible for overall system management and configuration.
|
||||
|
||||
#######################################################################
|
||||
# Role: Manager
|
||||
#######################################################################
|
||||
dn: cn=manager,{{dn_roles}}
|
||||
objectClass: posixGroup
|
||||
cn: manager
|
||||
gidNumber: 1002
|
||||
description: Role: Manager – oversees operations, approves changes, and coordinates teams.
|
||||
|
||||
#######################################################################
|
||||
# Role: Moderator
|
||||
#######################################################################
|
||||
dn: cn=moderator,{{dn_roles}}
|
||||
objectClass: posixGroup
|
||||
cn: moderator
|
||||
gidNumber: 1003
|
||||
description: Role: Moderator – monitors activity and handles conflict resolution.
|
||||
|
||||
#######################################################################
|
||||
# Role: User
|
||||
#######################################################################
|
||||
dn: cn=user,{{dn_roles}}
|
||||
objectClass: posixGroup
|
||||
cn: user
|
||||
gidNumber: 1004
|
||||
description: Role: User - Uses the software
|
1
roles/docker-ldap/templates/ldif/configuration/README.md
Normal file
1
roles/docker-ldap/templates/ldif/configuration/README.md
Normal file
@@ -0,0 +1 @@
|
||||
This folder contains configuration files where a specific logic needs to be applied.
|
@@ -0,0 +1,29 @@
|
||||
|
||||
#######################################################################
|
||||
# Generic container for Application roles
|
||||
#######################################################################
|
||||
dn: {{ldap.dn.application_roles}}
|
||||
objectClass: organizationalUnit
|
||||
ou: roles
|
||||
description: Container for application access profiles
|
||||
|
||||
{#
|
||||
This template generates two LDIF entries for each application in defaults_applications:
|
||||
one for the administrator role and one for the standard user role.
|
||||
Please adjust the base DN (dc=example,dc=com) and other attributes as necessary.
|
||||
#}
|
||||
|
||||
{% for app, config in defaults_applications.items() %}
|
||||
dn: cn={{ app }}-administrator,{{ldap.dn.application_roles}}
|
||||
objectClass: top
|
||||
objectClass: organizationalRole
|
||||
cn: {{ app }}-administrator
|
||||
description: Administrator role for {{ app }} (automatically generated)
|
||||
|
||||
dn: cn={{ app }}-user,{{ldap.dn.application_roles}}
|
||||
objectClass: top
|
||||
objectClass: organizationalRole
|
||||
cn: {{ app }}-user
|
||||
description: Standard user role for {{ app }} (automatically generated)
|
||||
|
||||
{% endfor %}
|
39
roles/docker-ldap/templates/ldif/import/02_users.ldif.j2
Normal file
39
roles/docker-ldap/templates/ldif/import/02_users.ldif.j2
Normal file
@@ -0,0 +1,39 @@
|
||||
#######################################################################
|
||||
# Container for Application Roles (if not already created)
|
||||
#######################################################################
|
||||
dn: {{ ldap.dn.application_roles }}
|
||||
objectClass: organizationalUnit
|
||||
ou: roles
|
||||
description: Container for application access profiles
|
||||
|
||||
#######################################################################
|
||||
# Create Admin User
|
||||
#######################################################################
|
||||
dn: uid={{administrator_username}},{{ldap.dn.users}}
|
||||
objectClass: top
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
uid: {{administrator_username}}
|
||||
sn: Administrator
|
||||
cn: Administrator
|
||||
userPassword: {SSHA}CHANGE_THIS_PASSWORD
|
||||
loginShell: /bin/bash
|
||||
homeDirectory: /home/admin
|
||||
|
||||
#######################################################################
|
||||
# Add Admin User to All Application Role Groups
|
||||
#######################################################################
|
||||
{# Loop over each application defined in defaults_applications #}
|
||||
{% for app, config in defaults_applications.items() %}
|
||||
|
||||
dn: cn={{ app }}-administrator,{{ ldap.dn.application_roles }}
|
||||
changetype: modify
|
||||
add: roleOccupant
|
||||
roleOccupant: uid={{administrator_username}},{{ldap.dn.users}}
|
||||
|
||||
dn: cn={{ app }}-user,{{ ldap.dn.application_roles }}
|
||||
changetype: modify
|
||||
add: roleOccupant
|
||||
roleOccupant: uid={{administrator_username}},{{ldap.dn.users}}
|
||||
|
||||
{% endfor %}
|
1
roles/docker-ldap/templates/ldif/import/README.md
Normal file
1
roles/docker-ldap/templates/ldif/import/README.md
Normal file
@@ -0,0 +1 @@
|
||||
This folder contains files which are importet via ldapadd without any specific logic
|
Reference in New Issue
Block a user