zalando / zalando/postgres-operator
Default user for schema have no access to preparedDatabase
Open
Nobody has claimed this yet.
bug
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
Please, answer some short questions which should help us to understand your problem / question better?
- Which image of the operator are you using? registry.opensource.zalan.do/acid/postgres-operator:v1.8.2
- Where do you run it - cloud or metal? Kubernetes or OpenShift? DigitalOcean K8S
- Are you running Postgres Operator in production? yes
- Type of issue? Bug report
Prepared database defined like this:
spec:
preparedDatabases:
test:
defaultUsers: true
schemas:
public:
defaultRoles: true
defaultUsers: true
test_reader_user have access to database, but test_public_reader_user do not have.
# psql -U test_owner_user test
test=> create table test (id int);
CREATE TABLE
test=> insert into test values (1);
INSERT 0 1
test=> insert into test values (2);
INSERT 0 1
test=> select * from test ;
id
----
1
2
(2 rows)
test=> \q
# psql -U test_reader_user test
test=> select * from test ;
id
----
1
2
(2 rows)
test=> \q
# psql -U test_public_reader_user test
test=> select * from test ;
ERROR: permission denied for table test
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report names no source files or tests. Start by reproducing the supplied preparedDatabases configuration and psql permission checks, then trace how default schema roles are created; done means test_public_reader_user can read tables created by test_owner_user.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, postgresql
- Domain
- authorization, databases, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100