Skip to content

Commit

Permalink
feat: Add authentication provider configuration
Browse files Browse the repository at this point in the history
Allow users to configure OAuth and OIDC authentication provider in the helm chart. Add validation in the schema.json.

Signed-off-by: Ronny Trommer <ronny@no42.org>
  • Loading branch information
indigo423 committed Oct 24, 2024
1 parent 8e2d5fa commit 71cf599
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 2 deletions.
5 changes: 4 additions & 1 deletion charts/perses/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
143 changes: 142 additions & 1 deletion charts/perses/values.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json-schema.org/schema#",
"$schema": "https://json-schema.org/schema#",
"type": "object",
"title": "Values",
"additionalProperties": false,
Expand Down Expand Up @@ -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"
}
}
}
}
}
}
}
}
Expand Down

0 comments on commit 71cf599

Please sign in to comment.