Prerequisites
- The Admin role on the folder you’ll add the account to
- A gateway that can reach the cluster
- A CockroachDB account template
Create the account
1
Go to Privileged Access Management > Accounts and select Add Account.
2
Select the Folder and a CockroachDB Account Template, then select Next.
3
Enter a Name and the connection details:
By default, CockroachDB only accepts passwords over TLS, so leave SSL Enabled on. If a private certificate authority (CA) signed the cluster’s node certificates, paste the CA certificate into SSL Certificate. For a cluster you set up with
cockroach cert, the CA certificate is the ca.crt file in the cluster’s certificates directory.If you have a connection string, such as postgresql://user:password@host:26257/defaultdb?sslmode=verify-full, paste it into Host. Infisical fills in the other fields from the connection string, including the credentials and the SSL settings.4
Enter the Username and Password of the CockroachDB user.
5
Select Create.
Credential rotation
Credential rotation changes the account’s password on a schedule or on demand. The rotation account needs permission to change that password:- The account itself: The account needs the
CREATEROLEandCREATELOGINrole options, unless you runSET CLUSTER SETTING sql.auth.change_own_password.enabled = true - A different account: The rotation account needs the
CREATEROLEandCREATELOGINrole options, or theadminrole
admin role, the rotation account needs the admin role too.
For example, to create a rotation user and a user for it to rotate:
infisical_rotator as the rotation account on the app_user account’s Rotation tab.
Connect
To open a session, follow Connect to an account.- Browser
- CLI
The browser session has a table browser, where you can view, filter, edit, and export rows, and a SQL editor for running queries.
Next steps
Credential rotation
Change the passwords of your PAM accounts on a schedule.
Sessions
Review and end the connections that people and agents make to your accounts.