Comments (6)
Ok, so it seems that namespace is somehow used in the encryption? And I cannot reuse same encrypted file in multiple namespaces?
from sealed-secrets.
@gytisgreitai see #61 - PR forthcoming to support this in kubeseal
from sealed-secrets.
@gytisgreitai this is a feature :)
Imagine you had two users using the same cluster, but who should not be able to read each other's secrets. Without this feature, the SealedSecret from Alice could be uploaded to the cluster by Bob (in Bob's namespace), and the controller would happily decrypt Alice's SealedSecret for Bob.
To prevent this attack, the SealedSecret is created in a way that is cryptographically tied to the namespace+name of the original input Secret. The controller will refuse to decrypt a SealedSecret that has been "moved" to a different namespace+name.
#61 is a way to disable this feature, effectively making the SealedSecret "cluster wide". With #61, You can add the "sealedsecrets.bitnami.com/cluster-wide": "true"
annotation to the input Secret, and kubeseal
and the controller will disable/ignore the namespace+name check.
@gytisgreitai Does that make more sense? I attempted to explain the above in the README (https://github.com/bitnami/sealed-secrets/blame/master/README.md#L183), but it could certainly be clearer / more prominent. Patches to the docs gratefully accepted.
from sealed-secrets.
Uh I'm so sorry, I searched for issues, but should have thoroughly read the README.md
Yes, that makes perfect sense, though we're a small shop so does not apply to us :) I'll wait for #61 to be merged and release.
Thank you for great work, kubeseal looks awesome :)
from sealed-secrets.
@gytisgreitai this is a feature :)
Imagine you had two users using the same cluster, but who should not be able to read each other's secrets. Without this feature, the SealedSecret from Alice could be uploaded to the cluster by Bob (in Bob's namespace), and the controller would happily decrypt Alice's SealedSecret for Bob.
To prevent this attack, the SealedSecret is created in a way that is cryptographically tied to the namespace+name of the original input Secret. The controller will refuse to decrypt a SealedSecret that has been "moved" to a different namespace+name.#61 is a way to disable this feature, effectively making the SealedSecret "cluster wide". With #61, You can add the
"sealedsecrets.bitnami.com/cluster-wide": "true"
annotation to the input Secret, andkubeseal
and the controller will disable/ignore the namespace+name check.@gytisgreitai Does that make more sense? I attempted to explain the above in the README (https://github.com/bitnami/sealed-secrets/blame/master/README.md#L183), but it could certainly be clearer / more prominent. Patches to the docs gratefully accepted.
@anguslees . Could you provide me the sample how to add the annotation?. i am doing this for the adm namespace
kubectl -n adm create secret docker-registry docker-registry-secret --docker-server=xxxxx --docker-username=xxxx --docker-password=xxxx --docker-email="xxxx" --dry-run -o json > docker-registry-secret-clusterwide.json
Edited the docker-registry-secret-clusterwide.json and added the following
"metadata": {
"name": "docker-reg-secret-clusterwide",
"namespace": "adm",
"creationTimestamp": null,
"sealedsecrets.bitnami.com/cluster-wide": "true"
},
Then ran the following
./kubeseal --format=yaml --cert=pub-cert.pem < docker-reg-secret-clusterwide.json \
> docker-reg-secret-clusterwide.yaml
However i have to re add the "sealedsecrets.bitnami.com/cluster-wide": "true" in the yaml file. Is that correct? I would like to use this secret in other namespaces.
from sealed-secrets.
@linuxbsdfreak: annotations are nested one level further, like:
"metadata": {
"name": "docker-reg-secret-clusterwide",
"namespace": "adm",
"creationTimestamp": null,
"annotations": {
"sealedsecrets.bitnami.com/cluster-wide": "true"
}
},
...
If it's all working correctly, kubeseal
will automatically add the same annotation to the produced SealedSecret (and encrypt slightly differently).
from sealed-secrets.
Related Issues (20)
- Recreation of secret object after sync in ArgoCD HOT 7
- Consolidation of Sealed Secrets images in DockerHub HOT 3
- Incomplete and broken move of metrics to isolated port
- kubeseal with Secret input from -f fails silently HOT 4
- Sealed Secrets plugin for Helm HOT 1
- Helm chart 2.14.0 error if dashboard enabled after commonLabels added
- Sealed secret is not working when you have the kubernetes secret parse the data using the stringData using the yml file HOT 3
- Incorrect selector matchLabels on Helm chart ServiceMonitor HOT 1
- Correct way to validate the kubeseal tarball with Ansible HOT 4
- (question) sealed-secrets ingress, what use is it? HOT 2
- Immutable secrets are still not supported HOT 2
- Using sealed-secrets without controller/operator HOT 3
- About 0.25.0 release HOT 2
- Offline validation using signatures HOT 6
- Template `data` field treated as `stringData`, `stringData` ignored HOT 4
- Kubeseal not working on EKS IPv6 CLuster HOT 8
- kubeseal does not respond HOT 7
- Document system:authenticated group usage in GKE HOT 3
- Kubeseal is not able to fetch certificate HOT 1
- Kubeseal --re-encrypt with local certificates HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sealed-secrets.