Skip to content

Commit 0ecd308

Browse files
authored
feat: update secret docs and labs (#135)
1 parent 3ad601a commit 0ecd308

18 files changed

+112
-140
lines changed

docs/for-devs/console/code-repositories.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ All registered code repositories of the Team are listed here.
4444

4545
2. Optionally: Select `Private` If the repository in GitHub is private.
4646

47-
3. Optionally: Select a secret that contains the authentication credentials. Only Sealed Secrets of type `basic-auth` and `ssh-auth` will be shown. If no secret is available, then first [create a Sealed Secret](sealed-secrets.md).
47+
3. Optionally: Select a secret that contains the authentication credentials. Only secrets of type `basic-auth` and `ssh-auth` will be shown. If no secret is available, then first [create a secret](secrets.md).
4848

4949
4. Optionally: Test the connection to see if the authentication credentials are valid and App Platform can use the credentials to access the private repository.
5050

@@ -57,7 +57,7 @@ All registered code repositories of the Team are listed here.
5757

5858
2. Optionally: Select `Private` If the repository in GitLab is private.
5959

60-
3. Optionally: Select a secret that contains the authentication credentials. Only Sealed Secrets of type `basic-auth` and `ssh-auth` will be shown. If no secret is available, then first [create a Sealed Secret](sealed-secrets.md).
60+
3. Optionally: Select a secret that contains the authentication credentials. Only secrets of type `basic-auth` and `ssh-auth` will be shown. If no secret is available, then first [create a secret](secrets.md).
6161

6262
4. Optionally: Test the connection to see if the authentication credentials are valid and App Platform can use the credentials to access the private repository.
6363

docs/for-devs/console/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Self-service section:
1919
- [Catalog](catalog.md): The Helm charts available for the Team in the Catalog.
2020
- [Code Repositories](code-repositories.md): A self-service form to register code repositories to App Platform and use them to create Container Images.
2121
- [Container Images](container-images.md): A self-service form to create container images from registered Code Repositories.
22-
- [Sealed Secrets](sealed-secrets.md): A self-service form to create Sealed Secrets.
22+
- [Secrets](secrets.md): A self-service form to create a secret using Sealed Secrets.
2323
- [Workloads](workloads.md): A self-service form to create Workloads.
2424
- [Network Policies](netpols.md): A self-service form to create Network Policies.
2525
- [Services](services.md): A self-service form to create Services to publicly expose deployed Workloads.
Lines changed: 11 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,46 @@
11
---
22
slug: secrets
33
title: Team Secrets
4-
sidebar_label: Sealed Secrets
4+
sidebar_label: Secrets
55
---
66

7-
Sealed Secrets are encrypted Kubernetes Secrets. The encrypted secrets are stored in the Values Git repository. When a Sealed Secrets secret is created in the Console, the Kubernetes Secret will appear in the Team's namespace and can be used as you would use any secret that you would have created directly.
7+
Secrets in the Console are securely encrypted and stored in your Values Git repository using Sealed Secrets. When you create a secret in the Console, it generates a standard Kubernetes Secret in your Team's namespace that can be used like any other Kubernetes secret.
88

9-
7 types of secrets are supported:
9+
6 types of secrets are supported:
1010

1111
- Opaque
12-
- Service Account Token
1312
- Docker Config
1413
- Docker Config Json
1514
- Basic Auth
1615
- SSH Auth
1716
- TLS
1817

19-
## Create a Sealed Secret
18+
## Create a Secret
2019

21-
1. Provide a name for the Sealed Secret. The Kubernetes secret will have the same name.
20+
1. Provide a name for the Secret. The Kubernetes secret will have the same name.
2221

23-
2. Select `Immutable` if the data of the Sealed Secret (and the Kubernetes secret) can not be updated after the Sealed Secret has been created. When the Sealed Secret is Immutable, only the metadata can be modified after creation.
22+
2. Select `Immutable` if the data of the secret (and the Kubernetes secret) can not be updated after the secret has been created. When the secret is Immutable, only the metadata can be modified after creation.
2423

2524
3. Select the Type:
2625

2726
### Opaque secret
2827

2928
Opaque is the default secret type in Kubernetes. Read more about Opaque secrets [here](https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets).
3029

31-
4. Add the `Encrypted data`:
30+
4. Add the `Secret data`:
3231

3332
| Key | Value |
3433
| ------- | ----------------------------------------- |
3534
| Name of the Key | The value of the data item |
3635

3736
5. Add more data items if needed.
3837

39-
:::note
40-
The secret value will only be visible at the time of creation or once it has been successfully synchronized with the cluster.
41-
:::
42-
43-
### Service Account Token secret
44-
45-
| Key | Value |
46-
| ------- | ----------------------------------------- |
47-
| extra | The token |
48-
49-
See [here](https://kubernetes.io/docs/concepts/configuration/secret/#serviceaccount-token-secrets") for more information about service account token secrets.
50-
51-
You need to ensure that the `kubernetes.io/service-account.name` annotation is set to an existing ServiceAccount name. See the [metadata](#metadata) section for adding annotations.
52-
53-
:::note
54-
The secret value will only be visible at the time of creation or once it has been successfully synchronized with the cluster.
55-
:::
56-
5738
### Docker Config secret
5839

5940
| Key | Value |
6041
| ------------ | ----------------------------------------- |
6142
| .dockercfg | a .dockerconfigjson key for which the value is the content of a base64 encoded `~/.docker/config.json` file |
6243

63-
:::note
64-
The secret value will only be visible at the time of creation or once it has been successfully synchronized with the cluster.
65-
:::
66-
6744
### Docker Config Json secret
6845

6946
| Key | Value |
@@ -95,31 +72,19 @@ password="" # your password, can be token
9572
kubectl create secret docker-registry --dry-run=client regcred --docker-email=$email --docker-server=$server --docker-username=$username --docker-password=$password -o jsonpath='{.data.\.dockerconfigjson}' | base64 --decode
9673
```
9774

98-
:::note
99-
The secret value will only be visible at the time of creation or once it has been successfully synchronized with the cluster.
100-
:::
101-
10275
### Basic Auth secret
10376

10477
| Key | Value |
10578
| ------------ | ----------------------------------------- |
10679
| username | a username |
10780
| password | a password |
10881

109-
:::note
110-
The secret value will only be visible at the time of creation or once it has been successfully synchronized with the cluster.
111-
:::
112-
11382
### SSH Auth secret
11483

11584
| Key | Value |
11685
| ------------ | ----------------------------------------- |
11786
| ssh-privatekey | a `ssh-privatekey` key-value pair in the data field as the SSH credential to use |
11887

119-
:::note
120-
The secret value will only be visible at the time of creation or once it has been successfully synchronized with the cluster.
121-
:::
122-
12388
### TLS secret
12489

12590

@@ -129,18 +94,18 @@ The secret value will only be visible at the time of creation or once it has bee
12994
| tls.key | The private key certificate content |
13095

13196
:::note
132-
The secret value will only be visible at the time of creation or once it has been successfully synchronized with the cluster.
97+
The secret value will only be visible at the time of creation. After creation, the value field will display asterisks `****` to indicate the data is encrypted and cannot be revealed through the interface, though it can be overwritten. To overwrite the secret, click on the lock `🔒` icon next to the value field, enter the new secret value, and click on `Save Changes`.
13398
:::
13499

135100

136101
## Metadata
137102

138103
Adding metadata is optional.
139104

140-
Add the following standard metadata to the sealed-secret:
105+
Add the following standard metadata to the secret:
141106

107+
- `Labels`. See [here](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) for more information about labels
142108
- `Annotations`. See [here](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) for more information about annotations
143109
- `Finalizers`. See [here](https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/) for more information about finalizers
144-
- `Labels`. See [here](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) for more information about labels
145110

146-
Click on `+ Add Item` and add a key-value pair.
111+
Click the corresponding add button (`+Add Labels`, `+Add Annotations` or `+Add Finalizers`) to add key-value pairs.

docs/for-devs/security-best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_label: Security Best Practices
66

77
In addition to the out-of-the-box security capabilities provides by App Platform, it is a responsibility of Teams to keep their applications safe from bad actors. Here is a list of security best-practices Teams should implement:
88

9-
1. Use [secrets](../for-devs/console/sealed-secrets.md) to secure sensitive data and use a `secretKeyRef` to map an environment variable to the secret data.
9+
1. Use [secrets](../for-devs/console/secrets.md) to secure sensitive data and use a `secretKeyRef` to map an environment variable to the secret data.
1010

1111
2. Drop `ALL` or specific capabilities in the Pod or container `SecurityContext` to ensure all (unused) capabilities are disabled.
1212

docs/for-ops/console/team-admin-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Self-service section:
1313
- [Catalog](team-admin-catalog.md): The Helm charts available for platform administrators to install in any namespace
1414
- [Code Repositories](team-admin-code-repositories.md): A self-service form for platform administrators to register code repositories.
1515
- [Container Images](team-admin-container-images.md): A self-service form for platform administrators to create container images from registered code repositories.
16-
- [Sealed Secrets](team-admin-sealed-secrets.md): A self-service form for platform administrators to create Sealed Secrets.
16+
- [Secrets](team-admin-secrets.md): A self-service form for platform administrators to create a secret using Sealed Secrets.
1717
- [Workloads](team-admin-workloads.md): A self-service form to create for platform administrators Workloads in any namespace.
1818
- [Network Policies](team-admin-netpols.md): A self-service form for platform administrators to create Network Policies (in the `team-admin` namespace only).
1919
- [Services](team-admin-services.md): A self-service form for platform administrators to create Services to expose endpoints (`ClusterIP` services) from any namespace.

docs/for-ops/console/team-admin-sealed-secrets.md

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
slug: team-admin-secrets
3+
title: Team Admin Secrets
4+
sidebar_label: Secrets
5+
---
6+
7+
The Secrets self-service feature for the Team Admin is the same as for regular teams. Secrets can only be created in the `team-admin` namespace using Sealed Secrets. See [here](../../for-devs/console/secrets.md) for more information about Secrets.
8+
9+

docs/get-started/labs/create-sealed-secrets.md

Lines changed: 0 additions & 76 deletions
This file was deleted.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
slug: create-secrets
3+
title: Create Secrets
4+
sidebar_label: Create Secrets
5+
---
6+
7+
In this lab we will create a secret using Sealed Secrets and see how to securely store sensitive information in a git repository.
8+
9+
## Creating a Secret
10+
11+
1. Click on the `Secrets` in the sidebar.
12+
13+
2. Click on `Create Secret`. This will take you to the page where you can create a secret.
14+
15+
3. Fill in a name for your secret. In this lab we will use the name `secret-credentials`
16+
17+
4. Select the secret type. In this lab we will create a secret of type `kubernetes.io/opaque`.
18+
19+
5. Click on `+Add another` so you can fill in two key-value pairs
20+
21+
6. In the `Secret data` section. Add the following key-value pairs:
22+
23+
- `key=password value=helloworld`
24+
- `key=username value=labs-user`
25+
26+
![Create secret](../../img/create-secret.png)
27+
28+
7. Click on `Create Secret`.
29+
30+
:::note
31+
The secret value will only be visible at the time of creation. After creation, the value field will display asterisks `****` to indicate the data is encrypted and cannot be revealed through the interface, though it can be overwritten. To overwrite the secret, click on the lock `🔒` icon next to the value field, enter the new secret value, and click on `Save Changes`.
32+
:::
33+
34+
![Created secret](../../img/created-secret.png)
35+
![Edit secret](../../img/created-secret-edit.png)
36+
37+
## Checking the GIT repository
38+
39+
Now go to Gitea and check the `otomi/values` repository. You will see that under `values/env/teams/<team-name>/sealedsecrets/secret-credentials.yaml` the secret is stored in yaml, but the values are encrypted.
40+
41+
![Repository secret](../../img/repository-secret.png)
42+
43+
## Checking the Kubernetes secret
44+
45+
The only way to see the values of the secret is to decrypt the secret. The secret values are stored as base64 encoded values. In the left menu click on Shell and run the following command:
46+
47+
```bash
48+
kubectl get secret secret-credentials -o yaml -n team-labs
49+
```
50+
51+
This wil return the secret in yaml format. The values are stored as base64 encoded values.
52+
53+
```yaml
54+
apiVersion: v1
55+
data:
56+
password: aGVsbG93b3JsZA==
57+
username: bGFicy11c2Vy
58+
kind: Secret
59+
metadata:
60+
creationTimestamp: '2025-11-11T13:44:16Z'
61+
name: secret-credentials
62+
namespace: team-labs
63+
ownerReferences:
64+
- apiVersion: bitnami.com/v1alpha1
65+
controller: true
66+
kind: SealedSecret
67+
name: secret-credentials
68+
uid: fc1014f6-0212-49f7-a95d-c4169e053b60
69+
resourceVersion: '240057431'
70+
uid: b76d6944-fa91-4392-ba4c-80e3e07c7e82
71+
type: kubernetes.io/opaque
72+
```
73+
74+
If you want to decode the secret you can use `base64 --decode`. Run the following command:
75+
76+
```bash
77+
kubectl get secret secret-credentials -n team-labs -o jsonpath="{.data.password}" | base64 --decode
78+
```
79+
80+
Expected output:
81+
```
82+
helloworld
83+
```

docs/get-started/labs/labs-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Welcome to the Akamai App Platform labs! We recommend reviewing these labs to le
3232

3333
**Create workloads**
3434

35-
### [Create Sealed secrets](create-sealed-secrets.md)
35+
### [Create secrets](create-secrets.md)
3636

3737
### [Create Kubernetes resources with Argo CD](using-argo-cd.md)
3838

0 commit comments

Comments
 (0)