# Vertica temporary access

Create temporary database users through the existing [Rust provisioner](/docs/guides/provisioner).
Push and outbound-only polling use the same registration and connection token.

## Connect a database

In **Temporary access → Add target**, select **Vertica**, choose your provisioner,
and enter the host, port (5433 by default), database, and existing database roles.
Supply the management credential as JSON with `username` and `password`. Vertica
requires a superuser to create users and database password profiles. Paste a private
CA's PEM certificate in the optional CA field; TLS and hostname verification are mandatory.

The management connection uses the PostgreSQL-compatible protocol and supports
Vertica `password` or MD5 authentication over TLS. Vertica's proprietary SHA-512
challenge, OAuth and Kerberos authentication are not supported for that connection.
Choose a TLS-only authentication rule for the dedicated management account.

The browser encrypts settings and the management credential to your provisioner.
No target-specific deployment variables or files are needed. Grant the selected roles
the schema and object access you want leases to have, and avoid administrative roles.

## Lease lifecycle

The provisioner creates a locked user with a random password, grants the configured
roles, sets them as default roles, then unlocks the user. A temporary database password
profile marks ownership and inherits the default password policy, except that account
locks remain in place until a superuser clears them. This profile is a database object
created automatically, not a local configuration file.

Cleanup checks the user's profile before locking and dropping the account and removing
the profile. Password changes cannot bypass that ownership check. Existing users are
never overwritten. Cleanup does not cascade into user-owned objects; an account that
cannot be dropped stays locked and deletion is retried. Active sessions can retain
access until disconnected. Vertica does not enforce the lease deadline natively, so
keep the provisioner connected for scheduled cleanup.

## CLI and API

Register with `seekrit dynamic target add --name analytics --config target.json`,
piping the management login JSON on stdin:

```json
{
  "provider": "vertica",
  "executor": "remote",
  "provisionerId": "prv_REPLACE_WITH_REGISTERED_ID",
  "settings": {"host": "vertica.internal", "port": 5433, "database": "analytics", "roles": ["reader"]},
  "maxTtlSeconds": 3600
}
```

Request access with `seekrit dynamic lease <target-id> --ttl 1h`. The lease API accepts
`provider: "vertica"`. Members and service tokens use their existing signing keys
and grants without additional provisioner configuration.

See Vertica's [user management](https://docs.vertica.com/26.1.x/en/sql-reference/statements/create-statements/create-user/)
and [password profiles](https://docs.vertica.com/26.3.x/en/sql-reference/statements/create-statements/create-profile/).
