SQL User management avoid hardcoding secret #3765
-
Hey there, I am following the guidance in the docs to implement the JWT capability but running into a wall. Say I have the below code in an SQL file, there doesnt seems to be any way that I can find on online documentation to set the Issue #1062 raises this and there is some links to another repo provided which combines using Any help or guidance would be greatly appreciated by anyone who has tackeled this before. Is it best to instead change the function to take an additional text input and actually pass the secret to the function via the API call?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
That would be pointless, because then your client would define the secret for authentication... and could authenticate as anyone?
Are you loading this SQL code via This would leave the secret in the pg_catalog table, because it's persisted with If you have control of the |
Beta Was this translation helpful? Give feedback.
That would be pointless, because then your client would define the secret for authentication... and could authenticate as anyone?
Are you loading this SQL code via
psql
? If yes, you can use its\getenv
command. Only available in PG 15+.This would leave the secret in the pg_catalog table, because it's persisted with
ALTER DATABASE