zalando / zalando/postgres-operator

Standby user has write access

Open
#2,889 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.2k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
3

Description

AFAIK the standby user should have only the permissions required for replication. However, it seems the user has write access:

root@test-db-0:/home/postgres# psql -U standby db
psql (16.3 (Ubuntu 16.3-1.pgdg22.04+1), server 15.7 (Ubuntu 15.7-1.pgdg22.04+1))
Type "help" for help.

db=> SELECT CURRENT_USER;
 current_user 
--------------
 standby
(1 row)

db=> create table aaaaa_test (dummy INTEGER NOT NULL PRIMARY KEY);
CREATE TABLE
db=> drop table aaaaa_test ;
DROP TABLE
  • postgres-operator version: ghcr.io/zalando/postgres-operator:v1.13.0
  • Spilo version: ghcr.io/zalando/spilo-16:3.3-p1
  • Type of issue: Bug report

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported psql session as the standby user on the listed Postgres and Spilo versions. Trace how the standby role is created and granted permissions, then verify that replication still works while CREATE TABLE and DROP TABLE are rejected. The issue mentions no source files or tests, so locating the relevant role-management entry point is part of the investigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, postgresql
Domain
databases, infrastructure, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.