Skip to content

Commit

Permalink
Add auth issuer uri
Browse files Browse the repository at this point in the history
  • Loading branch information
benfu-verses committed Jun 21, 2024
1 parent e092092 commit ee74393
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/build-push-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ jobs:
HELM_INTERNAL_REGISTRY_USERNAME: ${{ secrets.HELM_INTERNAL_REGISTRY_USERNAME }}
HELM_INTERNAL_REGISTRY_PASSWORD: ${{ secrets.HELM_INTERNAL_REGISTRY_PASSWORD }}

- name: Push chart
- name: Push chart to verses
run: |-
helm push dist/${{ matrix.chart }}-${{ matrix.version }}.tgz oci://registry.develop.verses.io/helm-internal
- name: Login to ghcr
run: |-
echo "${HELM_GHCR_REGISTRY_PASSWORD}" | helm registry login ghcr.io/versestech/helm-charts --username "${HELM_GHCR_REGISTRY_USERNAME}" --password-stdin
env:
HELM_GHCR_REGISTRY_USERNAME: ${{ github.actor }}
HELM_GHCR_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

- name: Push chart to ghcr
run: |-
helm push dist/${{ matrix.chart }}-${{ matrix.version }}.tgz oci://ghcr.io/versestech/helm-charts
5 changes: 4 additions & 1 deletion charts/genius-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ license:
### Authentication
Authentication to Genius Core can be configured by setting variables to point to an existing OIDC provider.
The following parameters in the values file:
- `auth.jwksUri`: JWKS URI for your auth provider
- `auth.issuerUri`: Auth issuer URI for your auth provider (usually `<ISSUER_DOMAIN>/.well-known/openid-configuration`)
- (alternatively) `auth.jwksUri`: JWKS URI for your auth provider
- `auth.defaultProvider`: Name of your auth provider
- `auth.initialAdminUserId`: The `sub` claim from the initial admin user's auth token/id token.

Expand Down Expand Up @@ -155,10 +156,12 @@ ingress:

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| additionalEnv | list | `[]` | |
| affinity | object | `{}` | |
| allowedOrigins | string | `"*"` | |
| auth.defaultProvider | string | `"auth0"` | |
| auth.initialAdminUserId | string | `""` | |
| auth.issuerUri | string | `"https://kosm-dev-verses.us.auth0.com/.well-known/openid-configuration"` | |
| auth.jwksUri | string | `"https://kosm-dev-verses.us.auth0.com/.well-known/jwks.json"` | |
| auth.skipValidateJwtExpiry | bool | `false` | |
| extraObjects | list | `[]` | Extra K8s manifests to deploy # Note: Supports use of custom Helm templates |
Expand Down
3 changes: 2 additions & 1 deletion charts/genius-core/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ license:
### Authentication
Authentication to Genius Core can be configured by setting variables to point to an existing OIDC provider.
The following parameters in the values file:
- `auth.jwksUri`: JWKS URI for your auth provider
- `auth.issuerUri`: Auth issuer URI for your auth provider (usually `<ISSUER_DOMAIN>/.well-known/openid-configuration`)
- (alternatively) `auth.jwksUri`: JWKS URI for your auth provider
- `auth.defaultProvider`: Name of your auth provider
- `auth.initialAdminUserId`: The `sub` claim from the initial admin user's auth token/id token.

Expand Down
5 changes: 5 additions & 0 deletions charts/genius-core/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@ spec:
value: "0.0.0.0:8080"
- name: MODELS_DIR
value: /app/models
{{- if .Values.auth.issuerUri }}
- name: AUTH_OIDC_URI
value: {{ .Values.auth.issuerUri | quote }}
{{- else if .Values.auth.jwksUri }}
- name: JWKS_URI
value: {{ .Values.auth.jwksUri | quote }}
{{- end }}
- name: DEFAULT_ADMIN_ID
value: {{ .Values.auth.initialAdminUserId | quote }}
- name: DEFAULT_ADMIN_PROVIDER
Expand Down
3 changes: 2 additions & 1 deletion charts/genius-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ serviceHostname: genius-core
loglevel: info

auth:
issuerUri: https://kosm-dev-verses.us.auth0.com/.well-known/openid-configuration
jwksUri: https://kosm-dev-verses.us.auth0.com/.well-known/jwks.json
initialAdminUserId: ""
defaultProvider: auth0
Expand Down Expand Up @@ -256,4 +257,4 @@ pdb:
extraObjects: []

additionalEnv: []
# key: value
# key: value

0 comments on commit ee74393

Please sign in to comment.