You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _docs/security/secrets.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,25 +9,25 @@ toc: true
9
9
10
10
Codefresh provides out-of-the-box management for secrets, generally to store secrets for third-party integrations.
11
11
12
-
For secure secret storage, every Codefreshruntime uses the[Bitnami Sealed Secrets controller](https://github.com/bitnami-labs/sealed-secrets){:target="_blank"} behind the scenes.
13
-
This controller is installed as part of theruntime and automatically managed by Codefresh.
12
+
For secure secret storage, every CodefreshGitOps Runtime uses the[Bitnami Sealed Secrets controller](https://github.com/bitnami-labs/sealed-secrets){:target="_blank"} behind the scenes.
13
+
This controller is installed as part of theRuntime and automatically managed by Codefresh.
14
14
15
15
##How Sealed Secrets work
16
16
17
17
Sealed Secrets are based on[public/private key encryption](https://en.wikipedia.org/wiki/Public-key_cryptography){:target="_blank"}. When the controller is installed, it gets a public and private key. The private key stays within the cluster. The public key can be given anywhere to encrypt secrets.
18
18
19
19
Any kind of secret can be encrypted with the public key (also via the`kubeseal` executable), and then passed to the cluster for decryption when needed.
20
20
21
-
For GitOps applications, encryption for secrets is critical, as it means that youcan commit any kind of secret in Git as long as it isencrypted.
21
+
Codefresh handles Sealed Secrets at the level of the account, meaning that youneed to create a Sealed Secret for an integration once, and it isthen available to all clusters managed in the account. To ensure maximum security, only the ConfigMap with the public key of the SealedSecret is commited to Git.
22
22
23
-
Here's the event flow for Sealed Secrets:
24
23
25
-
1. A secret is encrypted by an operator and/or developer with the`kubeseal` executable.
26
-
1. A custom Kubernetes resource called SealedSecret is created.
27
-
1. The secret is committed in Git.
28
-
1. During application deployment, the Codefresh runtime applies this secret to the cluster.
29
-
1. The Sealed Secret controller identifies the Sealed Secret object and decrypts it using the private key of the cluster.
30
-
1. The Sealed Secret is converted to a[standard Kubernetes secret](https://kubernetes.io/docs/concepts/configuration/secret/){:target="_blank"} inside the cluster.
24
+
Here's the event flow for Sealed Secrets in GitOps:
25
+
1. The operator or developer creates an encrypted secret with the`kubeseal` executable.
1. Codefresh also creates another Kubernetes resource, the`ConfigMap` containing the public key of the`SealedSecret`.
28
+
1. The`ConfigMap` resource is committed to Git.
29
+
1. When required for an application or a resource, the Sealed Secret controller identifies the Sealed Secret object and decrypts it using the private key of the cluster.
30
+
1. The Sealed Secret is converted to a[standard Kubernetes secret](https://kubernetes.io/docs/concepts/configuration/secret/){:target="_blank"} within the cluster.
31
31
1. It is then passed to the application like any other secret, as a mounted file or environment variable.
32
32
1. The application uses the secret in its decrypted form.