From 9612aa118ffd34e3a465c62f087bd6ddcc6cc2f8 Mon Sep 17 00:00:00 2001 From: Basil Bruhn Date: Mon, 14 Apr 2025 10:20:29 +0200 Subject: [PATCH] linux.psi link and AD groups --- engineering-guide/gitea-dmz.md | 15 +++++++++++++++ services/gitea/gitea-pages.md | 2 +- services/gitea/index.md | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/engineering-guide/gitea-dmz.md b/engineering-guide/gitea-dmz.md index 240ec25c..5e1d0be1 100644 --- a/engineering-guide/gitea-dmz.md +++ b/engineering-guide/gitea-dmz.md @@ -132,3 +132,18 @@ gitea admin user create --username {org-gitea} --random-password --random-passwo gitea admin user generate-access-token --username {org-gitea} --token-name {username-scope} --scopes {read|write:scope} ``` +## Mapping AD Groups to Teams +To realize access controll with Active Directory groups in Gitea organizations a JSON file needs to edited in the admin pannel. Navigate to: 'Site Administration -> Identity&Access -> Authentication Sources -> PSI LDAP -> "Map LDAP Groups.." +There is a JSON string that has following structure: +- LDAP Group DN as Primary Key +- Organization +- Team +If you get an error message updateing, you made an error in formating the JSON (Commas or indentation) +``` +{ + "CN=kst-1337,OU=Official,OU=Groups,OU=psi,DC=d,DC=psi,DC=ch": { + "ORGANIZATION": ["TEAM"] + }, +} +``` + diff --git a/services/gitea/gitea-pages.md b/services/gitea/gitea-pages.md index 5a97a311..4153fe1f 100644 --- a/services/gitea/gitea-pages.md +++ b/services/gitea/gitea-pages.md @@ -18,5 +18,5 @@ If you just put a branch `gitea-pages` in a repository in your organization, the You may have multiple Repos with a "Pages Branch". ## Automated Pages -If you want to look at an example you can have a look at https://gitea.psi.ch/linux/gitea-pages. +If you want to look at an example you can have a look at https://gitea.psi.ch/linux/documentation. We use the master branch to edit Markdown files and use `gitea-actions` to publish its content as HTML to the `gitea-pages` branch. diff --git a/services/gitea/index.md b/services/gitea/index.md index e762a2ac..382ee1a3 100644 --- a/services/gitea/index.md +++ b/services/gitea/index.md @@ -18,6 +18,8 @@ Following settings allow/restrict access to projects: More can be found here: https://docs.gitea.com/usage/permissions If you want to have an AD (Active Directory) Group attached to a team you may contact [Gitea Project](mailto:gitea@psi.ch). +In case you want to manage your teams with AD groups, please send a mail to [Gitea Project](mailto:gitea@psi.ch) with the AD groups, Organizations and Teams. + ### User Accounts There is two types of user accounts in Gitea with different default access permissions: - Normal User