Learn how to dynamically generate PostgreSQL database users.
Open Secret Overview Dashboard
Click on the 'Add Dynamic Secret' button
Select `SQL Database`
Provide the inputs for dynamic secret parameters
(Optional) Modify SQL Statements
{{randomUsername}}
: Random username string{{unixTimestamp}}
: Current Unix timestamp{{identity.name}}
: Name of the identity that is generating the secret{{random N}}
: Random string of N characterstruncate
: Truncates a string to a specified lengthreplace
: Replaces a substring with another value{{randomUsername}} // 3POnzeFyK9gW2nioK0q2gMjr6CZqsRiX{{unixTimestamp}} // 17490641580{{identity.name}} // testuser{{random-5}} // x9k2m{{truncate identity.name 4}} // test{{replace identity.name 'user' 'replace'}} // testreplace
Click 'Submit'
Generate dynamic secrets
Submit
button, a new secret lease will be generated and the credentials for it will be shown to you.Was this page helpful?