Go script for syncing LDAP user group membership to Gitea
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Alex 7aa15f58a2
Merge pull request #20 from selukov/master
3 years ago
.github Create docker-publish.yml 3 years ago
images add Image9 Ldap setting 5 years ago
Dockerfile update to goland 1.14 4 years ago
LICENSE Added LICENSE 4 years ago
README.md Update README.md 3 years ago
config.yaml Add comment in config file 4 years ago
docker-compose.yml Update docker-compose.yml 3 years ago
gitea-group-sync.go Gitea api has been changed since 1.16, Owner team is no longer present in the list 3 years ago
go.mod Bump gopkg.in/yaml.v2 from 2.3.0 to 2.4.0 3 years ago
go.sum Bump gopkg.in/yaml.v2 from 2.3.0 to 2.4.0 3 years ago
requests.go have a good time 5 years ago
run.sh added variables LDAP_USER_IDENTITY_ATTRIBUTE and LDAP_USER_FULL_NAME 5 years ago
types.go Config Check, cleanup 4 years ago

README.md

Gitea Group Sync

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

Docker image available at ghcr.io/gitea-group-sync/gitea-group-sync.

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