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

Secure the database with separate users for admin and query operations #2

Open
gastaldi opened this issue Jan 28, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@gastaldi
Copy link
Collaborator

Query operations should be performed by a user that has little privilege on the database.

Admin operations should happen only on authenticated and authorized requests

@gastaldi
Copy link
Collaborator Author

Implementation idea: Create an @ApplicationScoped bean implementing io.agroal.api.AgroalPoolInterceptor. This will listen for connections coming out and in from the pool.

Then perform a SET SESSION AUTHORIZATION 'user' on the interceptor.

Link: https://www.postgresql.org/docs/current/sql-set-session-authorization.html

@gastaldi gastaldi added the enhancement New feature or request label May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant