Skip to content

Commit 7960b8b

Browse files
authored
Explain the usage of k8s secrets for credentials (#51)
1 parent 8f53b62 commit 7960b8b

3 files changed

Lines changed: 48 additions & 37 deletions

File tree

charts/frankframework/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: frankframework
33
description: A Helm chart for running the Frank!Framework on Kubernetes
4-
version: 0.7.3
4+
version: 0.7.4
55
appVersion: "10.0.0-SNAPSHOT"
66
type: application
77
home: https://frankframework.org

charts/frankframework/README.md

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,37 @@ Take a look at the Frank2Example chart for a simple example.
1212
## Table of Contents
1313
<!-- TOC -->
1414
* [Frank!Framework Chart](#frankframework-chart)
15+
* [Table of Contents](#table-of-contents)
1516
* [Usage](#usage)
1617
* [Configuration and installation details](#configuration-and-installation-details)
18+
* [DTAP Stage](#dtap-stage)
19+
* [Version tag](#version-tag)
20+
* [Authentication](#authentication)
21+
* [Credentials and AuthAlias](#credentials-and-authalias)
22+
* [Ladybug Database](#ladybug-database)
1723
* [Parameters](#parameters)
24+
* [Common parameters](#common-parameters)
25+
* [Frank!Framework image parameters](#frankframework-image-parameters)
26+
* [Frank!Framework application parameters](#frankframework-application-parameters)
27+
* [Container](#container)
28+
* [Environment variables](#environment-variables)
29+
* [Generate ConfigMaps and Secrets](#generate-configmaps-and-secrets)
30+
* [Volumes](#volumes)
31+
* [Sidecars](#sidecars)
32+
* [Frank!Framework console parameters](#frankframework-console-parameters)
33+
* [Ladybug Database](#ladybug-database-1)
34+
* [Frank!Framework deployment parameters](#frankframework-deployment-parameters)
35+
* [Traffic Exposure Parameters](#traffic-exposure-parameters)
36+
* [Other Parameters](#other-parameters)
1837
* [Notable changes](#notable-changes)
38+
* [0.7.0](#070)
39+
* [0.6.0](#060)
40+
* [0.5.0](#050)
41+
* [0.4.0](#040)
42+
* [0.3.0](#030)
43+
* [0.2.10](#0210)
44+
* [0.2.8](#028)
45+
* [0.2.7](#027)
1946
<!-- TOC -->
2047

2148
## Usage
@@ -73,6 +100,14 @@ And always needs to be configured.
73100

74101
Read more about configuring the authentication in the [Frank!Framework Manual](https://frank-manual.readthedocs.io/en/latest/deploying/security.html).
75102

103+
### Credentials and AuthAlias
104+
105+
To configure credentials or "AuthAliases" for the Frank!Framework, it is recommended to use Kubernetes Secrets.
106+
The Frank!Framework will automatically pick up the secrets and make them available as AuthAliases.
107+
108+
Read more about the Kubernetes Credential Provider [in the FF! Doc](https://frankdoc.frankframework.org/#/credential-providers/KubernetesCredentialFactory).
109+
For more information about credentials, see the [documentation](https://frank-manual.readthedocs.io/en/latest/deploying/credentials.html).
110+
76111
### Ladybug Database
77112

78113
A database is added for the Ladybug to make it somewhat persistent and to make the data accessible for all replicas.
@@ -168,13 +203,10 @@ This is an important differance because it means that some variables to configur
168203

169204
It is possible to add environment variables with the `.Values.environmentVariables` parameter and to add environment variables from a configmap or secret with the `.Values.envFrom` parameter.
170205

171-
To configure credentials you need to add a volume (see section Volumes) and set these environment variables.
172-
173-
```yaml
174-
credentialFactory.class: "nl.nn.credentialprovider.PropertyFileCredentialFactory"
175-
credentialFactory.map.properties: "path to credentials.properties"
176-
```
206+
To configure credentials or "AuthAliases" for the Frank!Framework, it is recommended to use Kubernetes Secrets.
207+
The Frank!Framework will automatically pick up the secrets and make them available as AuthAliases.
177208

209+
Read more about it [in the FF! Doc](https://frankdoc.frankframework.org/#/credential-providers/KubernetesCredentialFactory).
178210
For more information about credentials, see the [documentation](https://frank-manual.readthedocs.io/en/latest/deploying/credentials.html).
179211

180212
To disable or configure authentication for the console, please read the [Frank!Framework Manual](https://frank-manual.readthedocs.io/en/latest/advancedDevelopment/authorization/consoleAndLadybug.html).
@@ -198,6 +230,9 @@ To deploy the Frank!Framework, it can be needed to add some files to the contain
198230
The Frank!Framework chart allows you to generate configmaps and secrets from values.
199231
This is useful if you want to add local users or resources to the Frank!Framework.
200232

233+
⚠️ **While it can be useful to generate secrets from the `values.yaml`, this is not considered safe and only intended for testing purposes. Production environments should use the `extraVolumes` to mount secrets.**
234+
ℹ️ **Credentials and AuthAliases that are needed by the Frank!Framework are picked up automatically from Kubernetes Secrets. Read more about it [in the FF! Doc](https://frankdoc.frankframework.org/#/credential-providers/KubernetesCredentialFactory)**
235+
201236
Be sure to set a subPath and a mountPath if you want to avoid conflicts and use multiple secrets.
202237
With one secret, the subPath and mountPath are not needed. And it would be possible to implement items, like this:
203238
```yaml
@@ -215,18 +250,6 @@ generateSecret:
215250
url: jdbc:h2:mem:frank2example;NON_KEYWORDS=VALUE;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1;TRACE_LEVEL_FILE=0;
216251
```
217252
218-
The following example will generate a credentials.properties file in the /opt/frank/secrets/ folder.
219-
220-
```yaml
221-
generateSecret:
222-
- name: frankframework-credentials
223-
mountPath: /opt/frank/secrets/
224-
stringData:
225-
credentials.properties: |-
226-
alias/uasername=C3PO
227-
alias/password=R2D2
228-
```
229-
230253
There are some more examples in the `values.yaml` file.
231254

232255
| Name | Description | Value |

charts/frankframework/values.yaml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,10 @@ ports: []
115115
##
116116
## It is possible to add environment variables with the `.Values.environmentVariables` parameter and to add environment variables from a configmap or secret with the `.Values.envFrom` parameter.
117117
##
118-
## To configure credentials you need to add a volume (see section Volumes) and set these environment variables.
119-
##
120-
## ```yaml
121-
## credentialFactory.class: "nl.nn.credentialprovider.PropertyFileCredentialFactory"
122-
## credentialFactory.map.properties: "path to credentials.properties"
123-
## ```
118+
## To configure credentials or "AuthAliases" for the Frank!Framework, it is recommended to use Kubernetes Secrets.
119+
## The Frank!Framework will automatically pick up the secrets and make them available as AuthAliases.
124120
##
121+
## Read more about it [in the FF! Doc](https://frankdoc.frankframework.org/#/credential-providers/KubernetesCredentialFactory).
125122
## For more information about credentials, see the [documentation](https://frank-manual.readthedocs.io/en/latest/deploying/credentials.html).
126123
##
127124
## To disable or configure authentication for the console, please read the [Frank!Framework Manual](https://frank-manual.readthedocs.io/en/latest/advancedDevelopment/authorization/consoleAndLadybug.html).
@@ -158,6 +155,9 @@ envFrom: [ ]
158155
## The Frank!Framework chart allows you to generate configmaps and secrets from values.
159156
## This is useful if you want to add local users or resources to the Frank!Framework.
160157
##
158+
## ⚠️ **While it can be useful to generate secrets from the `values.yaml`, this is not considered safe and only intended for testing purposes. Production environments should use the `extraVolumes` to mount secrets.**
159+
## ℹ️ **Credentials and AuthAliases that are needed by the Frank!Framework are picked up automatically from Kubernetes Secrets. Read more about it [in the FF! Doc](https://frankdoc.frankframework.org/#/credential-providers/KubernetesCredentialFactory)**
160+
##
161161
## Be sure to set a subPath and a mountPath if you want to avoid conflicts and use multiple secrets.
162162
## With one secret, the subPath and mountPath are not needed. And it would be possible to implement items, like this:
163163
## ```yaml
@@ -175,18 +175,6 @@ envFrom: [ ]
175175
## url: jdbc:h2:mem:frank2example;NON_KEYWORDS=VALUE;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1;TRACE_LEVEL_FILE=0;
176176
## ```
177177
##
178-
## The following example will generate a credentials.properties file in the /opt/frank/secrets/ folder.
179-
##
180-
## ```yaml
181-
## generateSecret:
182-
## - name: frankframework-credentials
183-
## mountPath: /opt/frank/secrets/
184-
## stringData:
185-
## credentials.properties: |-
186-
## alias/uasername=C3PO
187-
## alias/password=R2D2
188-
## ```
189-
##
190178
## There are some more examples in the `values.yaml` file.
191179
## @descriptionEnd
192180
##

0 commit comments

Comments
 (0)