8000 Patroni REST API Authentication · Issue #1075 · zalando/spilo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Patroni REST API Authentication #1075

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

Open
epandurski opened this issue Jan 24, 2025 · 1 comment
Open

Patroni REST API Authentication #1075

epandurski opened this issue Jan 24, 2025 · 1 comment

Comments

@epandurski
Copy link

Hi,

I understand that the Patroni REST API is exposed on each spilo pod, at port 8008. Doesn't this pose a major security risk? It seem to me that every program running on the Kubernetes cluster could issue a PATCH /conifg request to this API, and mess up each database cluster. Is it possible to configure basic HTTP authentication for the Patroni REST API endpoints (as described here) ? If yes, how can I do this; and if not, isn't this a big security problem?

@TonyNoble
Copy link

@epandurski - yes, this is a security risk, as it allows any third party to perform operations that can change cluster state.

I'm working on raising a PR to use environment variables, but there is an intermediate workaround - set the SPILO_CONFIGURATION environment variable to restapi: { authentication: { username: PATRONI_USER, password: PATRONI_PASSWORD } }

This configuration will be merged with the spilo-generated patroni config on startup. It will not apply to read-only (safe) endpoints, but should protect unsafe POST requests.

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
0