ldap2pg allows creating static roles defined in the yaml config. While its main use is to create "group" roles (with NOLOGIN), it'd be really conveniant to be able to define password for roles with the LOGIN option, eg
rules:
- roles:
- comment: Parent role for all ldap2pg managed roles
name: managed_roles
- comment: Role for device-services
name: device-services
options: LOGIN
password: SuperS3cr3tp@ssw0rd
parents:
- managed_roles
(or maybe a way to read it from env vars)
With that, ldap2pg could be a complete declarative role manager for postgres. It could even go one step further and be able to create databases too but hey, one RFE at a time ;-)
My use case is to simplify application initial setup in a container orchestrator (Nomad, but would be the same elswhere)