Go script for syncing LDAP user group membership to Gitea
 
 
 
Go to file
Alex e281e7e876
Update docker-compose.yml
2021-06-21 17:53:23 -07:00
.github Adding Dependabot 2021-06-15 08:41:08 +02:00
images add Image9 Ldap setting 2019-11-30 11:23:07 +07:00
Dockerfile update to goland 1.14 2020-06-27 21:37:16 +07:00
LICENSE Added LICENSE 2020-10-22 13:59:39 -07:00
README.md Update README.md 2021-06-21 16:00:34 -07:00
config.yaml Add comment in config file 2021-06-12 15:13:18 +02:00
docker-compose.yml Update docker-compose.yml 2021-06-21 17:53:23 -07:00
gitea-group-sync.go Fix code indentation 2021-06-13 14:05:04 +02:00
go.mod Yaml Config File, Config File Flag and documentation of the feature 2020-09-28 16:40:27 +02:00
go.sum Added Go.sum to project 2021-06-14 11:00:07 +02:00
requests.go have a good time 2019-11-28 23:40:43 +07:00
run.sh added variables LDAP_USER_IDENTITY_ATTRIBUTE and LDAP_USER_FULL_NAME 2020-04-19 19:39:50 +07:00
types.go Config Check, cleanup 2020-09-30 19:38:33 +02:00

README.md

Gitea Group Sync

This application adds users to appropriate teams in Gitea based on group membership information in LDAP.

Installation instructions

You must have configured your LDAP with gitea

Here I will give the settings for a simple LDAP, you can configure by changing the code as you like

If you configured the Gitea <=> LDAP connection correctly, you should have users

You need to create Manage Access Tokens and add key to run.sh or docker-compose.yml the configuration file

Configuration:

There are two ways to configure the application. Via YAML Configuration File or Enviroment Variables.

  • See run.sh for an example using the enviroment Variables.
  • Use ./gitea-group-sync --config="config.yaml" with the example Config File for the YAML Variant.
Gitea Tokens

The application supports several keys, since to add people to the group you must be the owner of the organization.

create organizations in gitea

add the appropriate groups in our case: ship_crew, admin_staff

Usage

REP_TIME: '@every 1m' -- you can change the synchronization time of groups

docker-compose up

or

./run.sh

Realise