aws / pg_tle

Framework for building trusted language extensions for PostgreSQL
Apache License 2.0
337 stars 31 forks source link

Clientauth skip lists do not work when user/database names are mixed case #265

Closed adamguo0 closed 9 months ago

adamguo0 commented 10 months ago

Description

Users/databases on pgtle.clientauth_users_to_skip and pgtle.clientauth_databases_to_skip do not take effect if their names are mixed case.

Steps to reproduce

  1. Register a clientauth function
  2. Create a role with a mixed case name, e.g. CREATE ROLE "MixedCase";
  3. Add it to pgtle.clientauth_users_to_skip and reload config: ALTER SYSTEM SET pgtle.clientauth_users_to_skip = 'MixedCase'; SELECT pg_reload_conf()
  4. Connect as MixedCase

Expected outcome

Clientauth function should be skipped for MixedCase.

Actual outcome

Clientauth function is executed.

This behaviour can be reproduced similarly for mixed-case database names.

TianzeMYou commented 9 months ago

Merged