Skip to content

fix: reduce database privileges for kine user#860

Merged
prometherion merged 2 commits intoclastix:masterfrom
mateuszkwiatkowski:reduce-mysql-permissions
Dec 5, 2025
Merged

fix: reduce database privileges for kine user#860
prometherion merged 2 commits intoclastix:masterfrom
mateuszkwiatkowski:reduce-mysql-permissions

Conversation

@mateuszkwiatkowski
Copy link
Contributor

This PR limits SQL databases permisssions.

Fixes #820

@netlify
Copy link

netlify bot commented Jun 30, 2025

Deploy Preview for kamaji-documentation canceled.

Name Link
🔨 Latest commit be397a8
🔍 Latest deploy log https://app.netlify.com/projects/kamaji-documentation/deploys/6932df3634eefc0008e986e3

@mateuszkwiatkowski mateuszkwiatkowski changed the title Reduce database privileges for kine user fix: reduce database privileges for kine user Jun 30, 2025
@prometherion
Copy link
Member

@mateuszkwiatkowski we had some issues with CI, may I ask you to rebase, please?

@mateuszkwiatkowski
Copy link
Contributor Author

@prometherion I cleaned this PR - previously it was based on my local fork and i had to rebase. It should be good to go now.

Copy link
Member

@prometherion prometherion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit worried CI is not getting green, especially regarding migration: it seems unrelated to changes we want to introduce with this PR, trying to understand if this is just flakiness.

postgresqlShowTableOwnershipStatement = "SELECT 't' from pg_tables where tableowner = ? AND tablename = ?"
postgresqlKineTableExistsStatement = "SELECT 't' FROM pg_tables WHERE schemaname = ? AND tablename = ?"
postgresqlGrantPrivilegesStatement = "GRANT ALL PRIVILEGES ON DATABASE %s TO %s"
postgresqlGrantPrivilegesStatement = "GRANT CONNECT, CREATE ON DATABASE %s TO %s"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had some remarks here, given the fact that we need to perform deletions for Datastore compaction, but I tried on my own, and it worked as expected.

@prometherion prometherion merged commit 61a4c15 into clastix:master Dec 5, 2025
12 of 14 checks passed
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

Successfully merging this pull request may close these issues.

Reduce Database User Privileges from ALL to Specific Permissions

2 participants