forked from gitea-group-sync/gitea-group-sync
-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.yaml.sample
107 lines (89 loc) · 3.31 KB
/
config.yaml.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Example Configuration for gitea-ldap-sync
debug: false
# Gitea Configuration
gitea:
base_url: "https://gitea.example.com"
token:
- "exampleToken123456789"
# LDAP Configuration
ldap:
url: "ldap.example.com"
port: 636
use_tls: true
allow_insecure_tls: false
# BindDN is optional, if unset we will do an anonymous bind
bind_dn: "cn=admin,DC=ldap,DC=example,DC=com"
bind_password: "SecretPassword12345"
user_search_base: 'ou=users,DC=ldap,DC=example,DC=com'
user_filter: '(&(objectClass=user)(memberOf=*))'
user_username_attribute: "sAMAccountName"
user_fullname_attribute: "cn" # can be changed to "sn" if needed
user_first_name_attribute: ""
user_surname_attribute: ""
user_email_attribute: "mail"
user_public_ssh_key_attribute: "sshPublicKey"
user_avatar_attribute: "avatar"
exclude_users: []
exclude_users_regex: ""
admin_filter: ""
restricted_filter: ""
# These groups will be mapped as Organizations in Gitea
group_search_base: 'ou=groups,DC=ldap,DC=example,DC=com'
group_filter: '(&(objectClass=group))'
group_name_attribute: 'cn'
group_fullname_attribute: 'cn'
group_description_attribute: 'cn'
# These groups will be mapped as Teams in Gitea
# In this example all groups, which has a memberOf attribute will be determined as subgroups, because they are member
# of some other groups.
subgroup_search_base: 'ou=groups,DC=ldap,DC=example,DC=com'
subgroup_filter: '(&(objectClass=group)(memberOf=*))'
subgroup_name_attribute: 'cn'
subgroup_description_attribute: 'cn'
# List of groups which will be excluded from the sync. (Gitea Organizations)
exclude_groups:
- "Admins"
# Exclude groups from the sync based on Regular Expression. (Gitea Organizations)
exclude_groups_regex: ""
# List of subgroups which will be excluded from the sync. (Gitea Teams)
exclude_subgroups: []
# Exclude subgroups from the sync based on Regular Expression. (Gitea Teams)
exclude_subgroups_regex: ""
# Set to true if the subgroup contains the parent group's name. Eg.: org1/team1
# If set to true the part before the separator will be removed. Eg.: org1/team1 team will be synced to
# `org1` organization using name `team1`.
trim_parent_name: false
subgroup_separator: "/"
cron_timer: '@every 1m'
sync_config:
# If CreateUsers is set to true, the process will create Users in Gitea.
create_users: true
# If CreateGroups is set to true, the process will create Organizations and Teams in Gitea.
create_groups: true
# Set FullSync to false, if you only want to create new groups. If you set this to true, the process is going to
# delete the missing organizations/teams. Use with caution.
full_sync: true
# Default settings for creating Organizations and Teams in Gitea.
defaults:
user:
allow_create_organization: false
max_repo_creation: 0
visibility: "private" # Valid options: private, limited, public
organization:
repo_admin_change_team_access: false
visibility: "private"
team:
can_create_org_repo: false
includes_all_repositories: false
permission: "read"
units: |
[
"repo.code",
"repo.issues",
"repo.ext_issues",
"repo.wiki",
"repo.pulls",
"repo.releases",
"repo.projects",
"repo.ext_wiki"
]