Skip to content

Commit

Permalink
Support anonymous mode
Browse files Browse the repository at this point in the history
  • Loading branch information
flenny authored Sep 9, 2024
2 parents 51a2b3d + 8ca387c commit 5a59682
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 18 deletions.
4 changes: 2 additions & 2 deletions charts/swissgeol-boreholes/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: v2
name: swissgeol-boreholes
description: Borehole Data Management System
type: application
version: 0.2.4
version: 0.3.0
icon: https://raw.githubusercontent.com/swisstopo/swissgeol-boreholes-suite/main/src/client/public/favicon.ico
appVersion: "v2.0.687"
appVersion: "v2.1.839"
home: https://www.swissgeol.ch/en
maintainers:
- name: GeoWerkstatt GmbH
Expand Down
31 changes: 16 additions & 15 deletions charts/swissgeol-boreholes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,22 @@ helm install swissgeol-boreholes swissgeol-boreholes/swissgeol-boreholes

The following table lists the configurable parameters of the swissgeol-boreholes chart and their default values.

| Parameter | Description | Default |
| --- | --- | --- |
| `replicaCount` | Number of replicas | `1` |
| `app.domain` | Base domain name | `boreholes.swissgeol.ch` |
| `app.version` | Docker image tag | `latest` |
| `auth.authority` | Issuer URL | `""` |
| `auth.audience` | Client id | `""` |
| `database.host` | Database host | `""` |
| `database.name` | Database name | `""` |
| `database.username` | Database username | `""` |
| `database.password` | Database password | `""` |
| `s3.endpoint` | S3 endpoint | `""` |
| `s3.bucket` | S3 bucket name | `""` |
| `s3.accessKey` | S3 access key | `""` |
| `s3.secretKey` | S3 secret key | `""` |
| Parameter | Description | Default |
| --------------------------- | --------------------- | ------------------------ |
| `replicaCount` | Number of replicas | `1` |
| `app.domain` | Base domain name | `boreholes.swissgeol.ch` |
| `app.version` | Docker image tag | `latest` |
| `auth.authority` | Issuer URL | `""` |
| `auth.audience` | Client id | `""` |
| `auth.anonymousModeEnabled` | Enable anonymous mode | `false` |
| `database.host` | Database host | `""` |
| `database.name` | Database name | `""` |
| `database.username` | Database username | `""` |
| `database.password` | Database password | `""` |
| `s3.endpoint` | S3 endpoint | `""` |
| `s3.bucket` | S3 bucket name | `""` |
| `s3.accessKey` | S3 access key | `""` |
| `s3.secretKey` | S3 secret key | `""` |

Specify each parameter using the `--set key=value` argument to `helm install`. For example,

Expand Down
5 changes: 5 additions & 0 deletions charts/swissgeol-boreholes/templates/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ spec:
configMapKeyRef:
name: {{ .Release.Name }}-config
key: authAuthorizedGroupName
- name: Auth__AnonymousModeEnabled
valueFrom:
configMapKeyRef:
name: {{ .Release.Name }}-config
key: authAnonymousModeEnabled
---
apiVersion: v1
kind: Service
Expand Down
1 change: 1 addition & 0 deletions charts/swissgeol-boreholes/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ data:
authScopes: {{ .Values.auth.scopes | default "openid profile" | quote }}
authGroupClaimType: {{ .Values.auth.groupClaimType | default "cognito:groups" | quote }}
authAuthorizedGroupName: {{ .Values.auth.authorizedGroupName | default "boreholes.swissgeol" | quote }}
authAnonymousModeEnabled: {{ .Values.auth.anonymousModeEnabled | default "false" | quote }}
legacyApiAddress: "http://{{ .Release.Name }}-api-legacy.{{ .Release.Namespace }}.svc.cluster.local"
6 changes: 5 additions & 1 deletion charts/swissgeol-boreholes/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ app:
# -- The timezone which will be used in the application
# -- defaults to "Europe/Zurich"
timezone:
# -- The tag name of the Docker image tags to be deployed
# -- The tag name of the Docker image tag to be deployed
# -- e.g. v2.0.506, latest or edge
# -- defaults to "latest"
version:
Expand All @@ -32,6 +32,10 @@ auth:
# -- The name of the group the user must be a member of
# -- defaults to "boreholes.swissgeol"
authorizedGroupName:
# -- Enables anonymous mode for the application.
# -- In this mode, the application does not require authentication.
# -- defaults to false
anonymousModeEnabled:

# Database configuration
database:
Expand Down

0 comments on commit 5a59682

Please sign in to comment.