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

PostgreSQL: Stop using public schema #1987

Closed
toonsevrin opened this issue Jul 2, 2020 · 3 comments
Closed

PostgreSQL: Stop using public schema #1987

toonsevrin opened this issue Jul 2, 2020 · 3 comments
Labels
kind/enhancement An improvement to existing functionality

Comments

@toonsevrin
Copy link

toonsevrin commented Jul 2, 2020

This may not be relevant for a lot of people, but by default k3s/kine creates it's tables under the public schema. As you may or may not know, any user in the database can thus access this data by default.

As k3s is mainly for small clusters, I doubt users care about this level of isolation, but in my case I definitely do 😆.

Is it possible to specify another schema then public with the postgresql endpoint?

Thanks a lot!!!

@toonsevrin
Copy link
Author

I'd like to clarify that running the following sequency during database bootstrapping does solve this problem. But it would be nice to be able to enforce this from the consumer side (if this sql is not ran for any reason, the public schema is used again).

CREATE SCHEMA k3s;
ALTER DATABASE db SET search_path to k3s;

@fapatel1
Copy link

Looks like this was resolved from the PR above (k3s-io/kine#40)

@brandond
Copy link
Member

brandond commented Sep 3, 2024

That's an issue, not a PR. Nothing has been changed to allow this. If you'd like to see this fixed, it will require changes to kine. A PR would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement An improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants