Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSQL Revocation Statements doesn't allow multiline queries #15678

Closed
melkorm opened this issue May 29, 2022 · 0 comments · Fixed by #18632
Closed

PostgreSQL Revocation Statements doesn't allow multiline queries #15678

melkorm opened this issue May 29, 2022 · 0 comments · Fixed by #18632
Labels
bug Used to indicate a potential bug ecosystem secret/database/postgresql

Comments

@melkorm
Copy link

melkorm commented May 29, 2022

Describe the bug
PostgreSQL Revocation Statements doesn't allow multiline queries as opposed to creation statements which take into consideration multline queries by searching for END keywords. Revocation statement lacks this logic.

To Reproduce
Steps to reproduce the behavior:

  1. Create any PostgreSQL backend
  2. For revocation statement use "DO $$ BEGIN CREATE ROLE \"reassign\"; EXCEPTION WHEN duplicate_object THEN RAISE NOTICE '%, moving to next statement', SQLERRM USING ERRCODE = SQLSTATE; END $$;"
  3. See error in vault logs about PostgreSQL syntax error.

Expected behavior
Revocation statements should consider multiline queries.

Environment:

  • Vault Server Version (retrieve with vault status): 1.10.3
  • Vault CLI Version (retrieve with vault version): 1.10.3
  • Server Operating System/Architecture: Linux amd64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug ecosystem secret/database/postgresql
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants