postgresql
postgresql copied to clipboard
Default ident mapping
I believe that default Ident mapping should be like this
# pg_ident.conf
postgresql_pg_ident:
- comment: "root is allowed to login as {{ postgresql_admin_user }}"
mapname: "root_as_{{ postgresql_admin_user }}"
- system_username: "{{ postgresql_admin_user }}"
+ system_username: root
pg_username: "{{ postgresql_admin_user }}"
The contents of my pg_ident.conf
file is:
# MAPNAME SYSTEM-USERNAME PG-USERNAME
# root is allowed to login as postgres
root_as_postgres postgres postgres
Which is unnecessary, as postgres (linux)
is implicitly mapped to postgres (database)
:
https://www.postgresql.org/docs/current/auth-username-maps.html
To be honest I don't know anyone that uses root to login to their database via this method... and I would not recommend this type of setup, but the code written as it stands is incorrect. Embarrassingly, I added it with #348. :-/
Personally, I would call for removing this default altogether and adding it to the documentation/examples so that people to add it back in if they so desired:
# pg_ident.conf
postgresql_pg_ident:
- comment: "root is allowed to login as {{ postgresql_admin_user }}"
mapname: "root_as_{{ postgresql_admin_user }}"
system_username: "root"
pg_username: "{{ postgresql_admin_user }}"
What do you think @otakup0pe , @UnderGreen ? Anyone... Bueller?!?
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.