Applies to:
- Liquibase Pro
- Liquibase Open Source (Community)
Summary:
Proxy accounts are a great way to perform specific tasks with elevated privileges without granting those privileges directly to individual users or applications.
Liquibase allows proxy accounts to be used the same way they are used to connect outside of Liquibase to the database.
Environment Conditions:
- Any version of Liquibase Pro
- Database that has proxy users (such as Oracle)
How to use proxy user
There are two ways to specify the proxy user when connecting to a database, either by the username field or URL.
Username Field
The proxy user can be specified for the value of the Liquibase user. This can be set in either the Liquibase properties file, passed as a CLI argument, or as a Liquibase environment variable.
Liquibase Properties file
liquibase.command.username
Pass as a CLI argument
--username
Liquibase Envionrment variable
LIQUIBASE_COMMAND_USERNAME
The structure for the user is:
proxy_account[connect_through_user]
For example, if the username is defined in the Liquibase properties file, the value would be:
liquibase.command.username: liquibase_proxy_user[liquibase_user]
Where liquibase_proxy_user is the proxy account that has been granted the ability to connect as liquibase_user.
URL field
You are able to specify the connecting user via the URL. With this option, you will no longer need to specify a Liquibase username (liquibase.command.username
). However, you will still need to provide a password via liquibase.command.password
or corresponding environment variable LIQUIBASE_COMMAND_PASSWORD
.
You can specify the proxy user in the URL either by (Oracle Example):
jdbc:oracle:thin:proxyuser[APPSCHEMA]/@host:port/servicename
OR
jdbc:oracle:thin:proxyuser/@host:port/servicename
Comments
0 comments
Article is closed for comments.