From 62f45e339bac34c2cbe428eb42fcbd26ed6707d0 Mon Sep 17 00:00:00 2001 From: Ronny Trommer Date: Thu, 3 Oct 2024 23:05:26 +0200 Subject: [PATCH 1/2] feat: Add authentication provider configuration Allow users to configure OAuth and OIDC authentication provider in the helm chart. Add validation in the schema.json. Signed-off-by: Ronny Trommer --- charts/perses/templates/config.yaml | 5 +- charts/perses/values.schema.json | 143 +++++++++++++++++++++++++++- 2 files changed, 146 insertions(+), 2 deletions(-) diff --git a/charts/perses/templates/config.yaml b/charts/perses/templates/config.yaml index f0ca29c..3865742 100644 --- a/charts/perses/templates/config.yaml +++ b/charts/perses/templates/config.yaml @@ -18,7 +18,10 @@ data: cookie: {{- toYaml . | nindent 8 }} {{- end }} - + {{- with .Values.config.security.authentication }} + authentication: + {{- toYaml . | nindent 8 }} + {{- end }} database: {{- with .Values.config.database.file }} file: diff --git a/charts/perses/values.schema.json b/charts/perses/values.schema.json index 2ecc660..a04da87 100644 --- a/charts/perses/values.schema.json +++ b/charts/perses/values.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/schema#", + "$schema": "https://json-schema.org/schema#", "type": "object", "title": "Values", "additionalProperties": false, @@ -195,6 +195,147 @@ "disable_sign_up": { "type": "boolean", "default": false + }, + "providers": { + "type": "object", + "properties": { + "oidc": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "slug_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id":{ + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "device_code": { + "type": "object", + "additionalProperties": false, + "properties": { + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + } + } + }, + "redirect_uri": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "issuer": { + "type": "string" + }, + "discovery_url": { + "type": "string" + }, + "disable_pkce": { + "type":"boolean", + "default": false + }, + "url_params": { + "type": "string" + } + } + } + }, + "oauth": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "slug_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "device_code": { + "type": "object", + "additionalProperties": false, + "properties": { + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "client_credentials": { + "type": "object", + "additionalProperties": false, + "properties": { + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "redirect_url": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "auth_url": { + "type": "string" + }, + "token_url": { + "type": "string" + }, + "user_infos_url": { + "type": "string" + }, + "device_auth_url": { + "type": "string" + }, + "custom_login_property": { + "type": "string" + } + } + } + } + } } } } From 6410839560ff865b2027c5292b6e043d2b88d5d7 Mon Sep 17 00:00:00 2001 From: Ronny Trommer Date: Mon, 28 Oct 2024 14:55:46 +0100 Subject: [PATCH 2/2] chore: Bump version to 0.6.0 Signed-off-by: Ronny Trommer --- charts/perses/Chart.yaml | 2 +- charts/perses/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/perses/Chart.yaml b/charts/perses/Chart.yaml index 7fe21fb..05cd89c 100644 --- a/charts/perses/Chart.yaml +++ b/charts/perses/Chart.yaml @@ -3,7 +3,7 @@ name: perses description: Perses helm chart icon: https://avatars.githubusercontent.com/u/77209215?s=200&v=4 type: application -version: 0.5.0 +version: 0.6.0 appVersion: "v0.48.0" sources: - https://github.com/perses/perses diff --git a/charts/perses/README.md b/charts/perses/README.md index 46cd05c..7343759 100644 --- a/charts/perses/README.md +++ b/charts/perses/README.md @@ -4,7 +4,7 @@ Perses helm chart -![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.48.0](https://img.shields.io/badge/AppVersion-v0.48.0-informational?style=flat-square) +![Version: 0.6.0](https://img.shields.io/badge/Version-0.6.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.48.0](https://img.shields.io/badge/AppVersion-v0.48.0-informational?style=flat-square) ## Installing the Chart