saltstack / saltstack/salt

Allow global postgres config to leverage peer ident mapping

Open
#51,830 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pending-discussion
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Arising from https://github.com/saltstack/salt/issues/51260#issuecomment-466072647

If it were possible to globally configure host=None, runas=None and user=postgres (or have the user continue to be auto-detected) then it should be possible for users to configure much more efficient running of postgres states.

pg_hba.conf

# TYPE  DATABASE        USER            ADDRESS                 METHOD
local   all             postgres                                peer map=local

pg_ident.conf

# MAPNAME       SYSTEM-USERNAME         PG-USERNAME
local           postgres                postgres
local           root                    postgres
local           salt                    postgres  # if salt doesn't run as root

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 with the linked Salt issue and comment, then trace the PostgreSQL states and how they handle host, runas, and user. Review the pg_hba.conf and pg_ident.conf examples as the intended peer-mapping setup; done means global configuration supports these values or automatic user detection and enables more efficient PostgreSQL state execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.