Skip to content

Commit 33d4d4f

Browse files
authored
Merge branch 'main' into li_cli_offline
2 parents 9c7df3a + caff54b commit 33d4d4f

File tree

10 files changed

+904
-201
lines changed

10 files changed

+904
-201
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<br />
2525

26-
[![FINOS - Incubating](https://cdn.jsdelivr.net/gh/finos/contrib-toolbox@master/images/badge-incubating.svg)](https://community.finos.org/docs/governance/Software-Projects/stages/incubating)
26+
[![FINOS - Active](https://cdn.jsdelivr.net/gh/finos/contrib-toolbox@master/images/badge-active.svg)](https://community.finos.org/docs/governance/Software-Projects/stages/active)
2727
[![NPM](https://img.shields.io/npm/v/@finos/git-proxy?colorA=00C586&colorB=000000)](https://www.npmjs.com/package/@finos/git-proxy)
2828
[![Build](https://img.shields.io/github/actions/workflow/status/finos/git-proxy/ci.yml?branch=main&label=CI&logo=github&colorA=00C586&colorB=000000)](https://github.com/finos/git-proxy/actions/workflows/ci.yml)
2929
[![codecov](https://codecov.io/gh/finos/git-proxy/branch/main/graph/badge.svg)](https://codecov.io/gh/finos/git-proxy)

config.schema.json

Lines changed: 118 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,32 @@
1010
"sessionMaxAgeHours": { "type": "number" },
1111
"api": {
1212
"description": "Third party APIs",
13-
"type": "object"
13+
"type": "object",
14+
"properties": {
15+
"ls": {
16+
"type": "object",
17+
"description": "Configuration used in conjunction with ActiveDirectory auth, which relates to a REST API used to check user group membership, as opposed to direct querying via LDAP.<br />If this configuration is set direct querying of group membership via LDAP will be disabled.",
18+
"properties": {
19+
"userInADGroup": {
20+
"type": "string",
21+
"description": "URL template for a GET request that confirms a user's membership of a specific group. Should respond with a non-empty 200 status if the user is a member of the group, an empty response or non-200 status indicates that the user is not a group member. If set, this URL will be queried and direct queries via LDAP will be disabled. The template should contain the following string placeholders, which will be replaced to produce the final URL:<ul><li>\"&lt;domain&gt;\": AD domain,</li><li>\"&lt;name&gt;\": The group name to check membership of.</li><li>\"&lt;id&gt;\": The username to check group membership for.</li></ul>",
22+
"examples": [
23+
"https://somedomain.com/some/path/checkUserGroups?domain=<domain>&name=<name>&id=<id>"
24+
]
25+
}
26+
}
27+
},
28+
"github": {
29+
"type": "object",
30+
"properties": {
31+
"baseUrl": {
32+
"type": "string",
33+
"format": "uri",
34+
"examples": ["https://api.github.com"]
35+
}
36+
}
37+
}
38+
}
1439
},
1540
"commitConfig": {
1641
"description": "Enforce rules and patterns on commits including e-mail and message",
@@ -169,12 +194,98 @@
169194
},
170195
"authentication": {
171196
"type": "object",
172-
"properties": {
173-
"type": { "type": "string" },
174-
"enabled": { "type": "boolean" },
175-
"options": { "type": "object" }
176-
},
177-
"required": ["type", "enabled"]
197+
"description": "Configuration for an authentication source",
198+
"oneOf": [
199+
{
200+
"title": "Local Auth Config",
201+
"description": "Configuration for the use of the local database as the authentication source.",
202+
"properties": {
203+
"type": { "type": "string", "const": "local" },
204+
"enabled": { "type": "boolean" }
205+
},
206+
"required": ["type", "enabled"]
207+
},
208+
{
209+
"title": "Active Directory Auth Config",
210+
"description": "Configuration for Active Directory authentication.",
211+
"properties": {
212+
"type": { "type": "string", "const": "ActiveDirectory" },
213+
"enabled": { "type": "boolean" },
214+
"adminGroup": {
215+
"type": "string",
216+
"description": "Group that indicates that a user is an admin"
217+
},
218+
"userGroup": {
219+
"type": "string",
220+
"description": "Group that indicates that a user should be able to login to the Git Proxy UI and can work as a reviewer"
221+
},
222+
"domain": { "type": "string", "description": "Active Directory domain" },
223+
"adConfig": {
224+
"type": "object",
225+
"description": "Additional Active Directory configuration supporting LDAP connection which can be used to confirm group membership. For the full set of available options see the activedirectory 2 NPM module docs at https://www.npmjs.com/package/activedirectory2#activedirectoryoptions <br /><br />Please note that if the Third Party APIs config `api.ls.userInADGroup` is set then the REST API it represents is used in preference to direct querying of group memebership via LDAP.",
226+
"properties": {
227+
"url": {
228+
"type": "string",
229+
"description": "Active Directory server to connect to, e.g. `ldap://ad.example.com`."
230+
},
231+
"baseDN": {
232+
"type": "string",
233+
"description": "The root DN from which all searches will be performed, e.g. `dc=example,dc=com`."
234+
},
235+
"username": {
236+
"type": "string",
237+
"description": "An account name capable of performing the operations desired."
238+
},
239+
"password": {
240+
"type": "string",
241+
"description": "Password for the given `username`."
242+
}
243+
},
244+
"required": ["url", "baseDN", "username", "password"]
245+
}
246+
},
247+
"required": ["type", "enabled", "adminGroup", "userGroup", "domain"]
248+
},
249+
{
250+
"title": "Open ID Connect Auth Config",
251+
"description": "Configuration for Open ID Connect authentication.",
252+
"properties": {
253+
"type": { "type": "string", "const": "openidconnect" },
254+
"enabled": { "type": "boolean" },
255+
"oidcConfig": {
256+
"type": "object",
257+
"description": "Additional OIDC configuration.",
258+
"properties": {
259+
"issuer": { "type": "string" },
260+
"clientID": { "type": "string" },
261+
"clientSecret": { "type": "string" },
262+
"callbackURL": { "type": "string" },
263+
"scope": { "type": "string" }
264+
},
265+
"required": ["issuer", "clientID", "clientSecret", "callbackURL", "scope"]
266+
}
267+
},
268+
"required": ["type", "enabled", "oidcConfig"]
269+
},
270+
{
271+
"title": "JWT Auth Config",
272+
"description": "Configuration for JWT authentication.",
273+
"properties": {
274+
"type": { "type": "string", "const": "jwt" },
275+
"enabled": { "type": "boolean" },
276+
"jwtConfig": {
277+
"type": "object",
278+
"description": "Additional JWT configuration.",
279+
"properties": {
280+
"clientID": { "type": "string" },
281+
"authorityURL": { "type": "string" }
282+
},
283+
"required": ["clientID", "authorityURL"]
284+
}
285+
},
286+
"required": ["type", "enabled", "jwtConfig"]
287+
}
288+
]
178289
},
179290
"routeAuthRule": {
180291
"type": "object",

0 commit comments

Comments
 (0)