Skip to content

Commit 9bc9599

Browse files
authored
feat(directus): add oidc (#641)
* feat: onboard directus * fix: fix pr review * feat: add postgres as backend using postgres-operator * feat(directus): add oidc
1 parent 62dbac1 commit 9bc9599

File tree

10 files changed

+62
-3
lines changed

10 files changed

+62
-3
lines changed

directus/helm/directus/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: directus
33
description: helm chart for directus
44
type: application
55
version: 0.1.0
6-
appVersion: 9.25.0
6+
appVersion: 9.25.1
77
dependencies:
88
- name: postgres
99
version: 0.1.16

directus/helm/directus/templates/deployment.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,23 @@ spec:
5353
secretKeyRef:
5454
name: {{ include "directus-plural.secretName" . }}
5555
key: secret
56+
{{- if .Values.directus.oidc.enabled }}
57+
- name: AUTH_PLURAL_ISSUER_URL
58+
valueFrom:
59+
secretKeyRef:
60+
name: {{ include "directus-plural.secretName" . }}
61+
key: oidc-issuer
62+
- name: AUTH_PLURAL_CLIENT_ID
63+
valueFrom:
64+
secretKeyRef:
65+
name: {{ include "directus-plural.secretName" . }}
66+
key: oidc-client-id
67+
- name: AUTH_PLURAL_CLIENT_SECRET
68+
valueFrom:
69+
secretKeyRef:
70+
name: {{ include "directus-plural.secretName" . }}
71+
key: oidc-client-secret
72+
{{- end }}
5673
ports:
5774
- name: http
5875
containerPort: 8055

directus/helm/directus/templates/secret.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ metadata:
77
stringData:
88
key: {{ .Values.directus.key }}
99
secret: {{ .Values.directus.secret }}
10+
{{- if .Values.directus.oidc.enabled }}}
11+
oidc-issuer: {{ .Values.directus.oidc.issuer }}
12+
oidc-client-id: {{ .Values.directus.oidc.clientId }}
13+
oidc-client-secret: {{ .Values.directus.oidc.clientSecret }}
14+
{{- end }}

directus/helm/directus/values.yaml.tpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,23 @@ postgres:
1818

1919
env:
2020
PUBLIC_URL: https://{{ $hostname }}
21+
{{ if .OIDC }}
22+
AUTH_PROVIDERS: plural
23+
AUTH_PLURAL_DRIVER: openid
24+
AUTH_PLURAL_SCOPE: openid profile
25+
AUTH_PLURAL_ALLOW_PUBLIC_REGISTRATION: true
26+
{{ end }}
2127

2228
directus:
2329
key: {{ $key }}
2430
secret: {{ $secret }}
31+
{{ if .OIDC }}
32+
oidc:
33+
enabled: true
34+
clientId: {{ .OIDC.ClientId }}
35+
clientSecret: {{ .OIDC.ClientSecret }}
36+
issuer: {{ .OIDC.Configuration.Issuer }}
37+
{{ end }}
2538

2639
ingress:
2740
enabled: true

directus/plural/notes.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
Your directus installation is available at https://{{ .Values.hostname }}
2+
3+
{{ if .OIDC }}
4+
Your directus has been configured with OAuth against your plural account!
5+
{{ else }}
6+
You are using standard username/password authentication, so user management will be manual via the ADMIN_EMAIL and ADMIN_PASSWORD environment variables.
7+
We strongly recommend that you consider installing with OIDC enabled.
8+
{{ end }}

directus/plural/recipes/directus-aws.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ dependencies:
66
name: aws-k8s
77
- repo: ingress-nginx
88
name: ingress-nginx-aws
9+
oidcSettings:
10+
authMethod: POST
11+
uriFormat: https://{domain}/auth/login/plural/callback
12+
domainKey: hostname
913
sections:
1014
- name: directus
1115
configuration:

directus/plural/recipes/directus-azure.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ dependencies:
66
name: azure-k8s
77
- repo: ingress-nginx
88
name: ingress-nginx-azure
9+
oidcSettings:
10+
authMethod: POST
11+
uriFormat: https://{domain}/auth/login/plural/callback
12+
domainKey: hostname
913
sections:
1014
- name: directus
1115
configuration:

directus/plural/recipes/directus-gcp.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ dependencies:
66
name: gcp-k8s
77
- repo: ingress-nginx
88
name: ingress-nginx-gcp
9+
oidcSettings:
10+
authMethod: POST
11+
uriFormat: https://{domain}/auth/login/plural/callback
12+
domainKey: hostname
913
sections:
1014
- name: directus
1115
configuration:

directus/repository.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
name: directus
2-
description: directus deployed on plural
2+
description: The Modern Data Stack 🐰 — Directus is an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database.
33
category: DATA
44
private: true
55
releaseStatus: ALPHA
66
icon: plural/icons/directus-logo-stacked.png
77
notes: plural/notes.tpl
8+
homepage: https://directus.io/engine
9+
gitUrl: https://github.com/directus/directus
10+
oauthSettings:
11+
uriFormat: https://{domain}/auth/login/plural/callback
12+
authMethod: POST
813
contributors:
914

directus/vendor_images.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
docker.io:
22
images:
33
directus/directus:
4-
- "9.25.0"
4+
- "9.25.1"

0 commit comments

Comments
 (0)