-
Notifications
You must be signed in to change notification settings - Fork 7
Auth Model Reference
The auth-model field in a connection's configuration selects the authentication method. The keys you put in
auth-properties depend on the selected model.
Note:
auth-propertiesonly appears indata-sources.jsonwhen you pre-configure credentials manually. After the first connection withsave-password: true, dbvr encrypts the credentials and removesauth-propertiesfrom the file. In a working connection you'll only seeauth-model— the credentials are in the encrypted store.
Tip: To pre-configure credentials in
data-sources.jsonso connections authenticate automatically, see Pre-configure credentials.
Here is an example of a common auth model.
To set up username and password authentication, specify the ID that matches your database. Use native for most
standard connections like PostgreSQL or MySQL.
Once you select the appropriate ID, add the following fields to your configuration:
| Field | Description |
|---|---|
userName |
Database username |
userPassword |
Database password |
Example:
{ "auth-model": "native", "auth-properties": { "userName": "postgres", "userPassword": "secret" } }
For the full list of models available for your driver, run:
dbvr auth-models --driver=<driver-id>
- Getting started
- Reference
- Commands
- Connection options
- Databases support
- Administration
- About dbvr
- Development