Skip to content

Commit 0d83223

Browse files
authored
Merge pull request #967 from jescalada/add-oidc-auth-to-api-through-jwt
feat(auth): Add JWT auth for API routes
2 parents 98f6db8 + 6912ba1 commit 0d83223

File tree

15 files changed

+342
-50
lines changed

15 files changed

+342
-50
lines changed

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ jobs:
2121
with:
2222
comment-summary-in-pr: always
2323
fail-on-severity: high
24-
allow-licenses: MIT, MIT-0, Apache-2.0, BSD-3-Clause, BSD-3-Clause-Clear, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0, Zlib
24+
allow-licenses: MIT, MIT-0, Apache-2.0, BSD-3-Clause, BSD-3-Clause-Clear, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0, OFL-1.1, Zlib
2525
fail-on-scopes: development, runtime
2626
allow-dependencies-licenses: 'pkg:npm/caniuse-lite'

config.schema.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@
103103
}
104104
}
105105
},
106+
"apiAuthentication": {
107+
"description": "List of authentication sources for API endpoints. May be empty, in which case all endpoints are public.",
108+
"type": "array",
109+
"items": {
110+
"$ref": "#/definitions/authentication"
111+
}
112+
},
106113
"tls": {
107114
"description": "TLS configuration for secure connections",
108115
"type": "object",

package-lock.json

Lines changed: 175 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@
5858
"history": "5.3.0",
5959
"isomorphic-git": "^1.27.1",
6060
"jsonschema": "^1.4.1",
61+
"jsonwebtoken": "^9.0.2",
62+
"jwk-to-pem": "^2.0.7",
6163
"load-plugin": "^6.0.0",
6264
"lodash": "^4.17.21",
6365
"lusca": "^1.7.0",
6466
"moment": "^2.29.4",
6567
"mongodb": "^5.0.0",
6668
"nodemailer": "^6.6.1",
67-
"openid-client": "^6.2.0",
69+
"openid-client": "^6.3.1",
6870
"parse-diff": "^0.11.1",
6971
"passport": "^0.7.0",
7072
"passport-activedirectory": "^1.0.4",

proxy.config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,16 @@
146146
"contactEmail": "",
147147
"csrfProtection": true,
148148
"plugins": [],
149+
"apiAuthentication": [
150+
{
151+
"type": "jwt",
152+
"enabled": false,
153+
"jwtConfig": {
154+
"clientID": "",
155+
"authorityURL": ""
156+
}
157+
}
158+
],
149159
"tls": {
150160
"enabled": false,
151161
"key": "certs/key.pem",

0 commit comments

Comments
 (0)