Re: Q: cert authentication and user remapping fails
Albrecht Dreß <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.general |
|---|---|
| Message-ID | <[email protected]> |
Sorry for the late reply, I could test your solution only today…
Am 06.12.19 18:52 schrieb(en) Tom Lane:
> I don't think that the user name mapping feature works in the way you are hoping it does. According to https://www.postgresql.org/docs/current/auth-username-maps.html what the map does is to specify allowed combinations of the validated external user name ("Albrecht Dreß" in your example) and the database role the user asked to connect as. So given
>
> > certaccess /^.*$ testuser
>
> it should be possible to do
>
> psql -h dbserver -U testuser testdb
>
> with a certificate that has CN="Albrecht Dreß" (or anything else).
Yes, this works perfectly – I really misunderstood the docs here!
Thanks a lot for your help,
Albrecht.
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEcCEPemLFTtyGf4zATKlvDmfn2fgFAl3uhKEACgkQTKlvDmfn 2fjgQQgAySnAsapar2raQzUzVcF6t76XNYSBqBlO2Lsvavcxjd1KcO3frfORh5MZ M/IJl4B+TybjeKL1ym/5cbZ5TCxceD47LjzjaDFJswiTy7zb1g00rb3R4dl8su8u +qixVSmC3wsHgQM9nt22m/sUi17iq4T8oPiX3oc5Ou36E5LFiWGwRt75RbC1Srx2 JDgncpuj6tiJB+VQIPP3lid6O1JqAd6VhwY65UN650uPiDHkax7vqDLP1x+mS3ho VTGpsfEE/D15i4Djqb9uMudnIo3z127CTTqkOb4DmoYefbuP5wE3ZEkr/QwsIf3o 5UM8ZD4D0d3lbaSHdLz+URUu9fDPmQ== =c3rg -----END PGP SIGNATURE-----