Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

harden secrets permissions [BTPCOREAPIGW-3770] #501

Open
fizzious1 opened this issue Jan 28, 2025 · 1 comment
Open

harden secrets permissions [BTPCOREAPIGW-3770] #501

fizzious1 opened this issue Jan 28, 2025 · 1 comment

Comments

@fizzious1
Copy link

fizzious1 commented Jan 28, 2025

This change is aimed at adding an extra layer of protection for secrets in Kubernetes pods.
Currently, the Secrets permissions is set to 420 (decimal) => 644 (octal) => rwx -r- ----, which is considered over-permissive.
The goal is to set the permissions to 256 (decimal) => 400 (octal) => r-- --- ---.

The Secret's permissions we wish to change:

- name: cert
secret:
defaultMode: 420
secretName: webhook-server-cert

@I065450
Copy link
Collaborator

I065450 commented Jan 30, 2025

Hi @fizzious1

I have tried to change permission to 400 and the operator fail to start.
Regards,
Naama

│ manager 2025-01-30T12:29:03Z ERROR setup problem running manager {"error": "open /tmp/k8s-webhook-server/serving-certs/tls.crt: permission denied"} │
│ manager main.main │
│ manager /workspace/main.go:210 │
│ manager runtime.main │
│ manager /usr/local/go/src/runtime/proc.go:271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants