-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.md.gotmpl
61 lines (39 loc) · 2.07 KB
/
README.md.gotmpl
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
{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}
{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}
{{ template "chart.description" . }}
Requires MAGDA version 0.0.58 or above.
To deploy the authentication plugin with your MAGDA instance, please check [MAGDA Gateway Helm Chart Document](https://github.com/magda-io/magda/blob/master/deploy/helm/internal-charts/gateway/README.md).
### How to Use
1. Add the auth plugin as a [Helm Chart Dependency](https://helm.sh/docs/helm/helm_dependency/)
```yaml
- name: magda-auth-google
version: "2.0.0" # or put the latest version number here
repository: "oci://ghcr.io/magda-io/charts"
```
> Since v2.0.0, we use [Github Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry) as our official Helm Chart & Docker Image release registry.
2. Config the auth plugin with googleClientId:
```yaml
magda-auth-google:
googleClientId: xxxxxx
```
3. Config Gatway to add the auth plugin to Gateway's plugin list (More details see [here](https://github.com/magda-io/magda/blob/master/deploy/helm/internal-charts/gateway/README.md))
```yaml
gateway:
authPlugins:
- key: "google"
baseUrl: http://magda-auth-google
```
4. Create a secret `oauth-secrets` in your deployment Magda namespace with the correct value for `google-client-secret` key
#### Google API Setup
1. Open Google Cloud Console
2. Go to `Credentials (APIs and Services)`
3. Create an OAuth 2.0 Client IDs
The `Authorised redirect URIs` should be: https://my-magda.com/auth/login/plugin/google/return
Here `my-magda.com` is the domain you serve magda from. It should match [helm chart config `global.externalUrl`](https://github.com/magda-io/magda/tree/master/deploy/helm/magda-core).
{{ template "chart.homepageLine" . }}
{{ template "chart.maintainersSection" . }}
{{ template "chart.sourcesSection" . }}
{{ template "chart.requirementsSection" . }}
{{ template "chart.valuesHeader" . }}
{{ template "chart.valuesTable" . }}