Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 6.68 KB

index.md

File metadata and controls

53 lines (35 loc) · 6.68 KB
page_title cipherstash Provider
description Use the CipherStash provider to manage machine identities, ZeroKMS clients, keysets, and keyset grants in a workspace, and to install EQL v4 into PostgreSQL databases. Configure a separate provider instance for each workspace. See the workspace documentation https://cipherstash.com/docs/reference/workspace for the CipherStash concepts. The provider has two optional halves. auth connects to a CipherStash workspace and is required by every CipherStash resource and data source. database connects to a PostgreSQL server and is required by cipherstash_eql_v4. Without auth, the provider never reads CS_* environment variables or contacts CipherStash; without database, it never connects to PostgreSQL. This provider is in development and is not published to the Terraform Registry. It uses this repository's public pkg/stack/auth and pkg/stack/manage Go packages. Builds require no BNDRY module, sibling SDK checkout, local module replacement or WebAssembly guest. The provider is licensed under the MIT License. Authenticate with an Admin access key. The provider requires a verified Admin role even for configurations that manage only ZeroKMS resources or read data sources. Successful configuration does not prove permission for every operation. Create this credential outside the Terraform configuration that uses it. Resource access keys and client key values are stored in Terraform state and saved plans, even when marked sensitive. Provider settings are not stored in state, but saved plans can contain them. Protect these files and your state backend. Neither the provider nor manage.Config reads CS_CLIENT_ID: it identifies an application encryption client, not an authentication principal. Manage client/keyset pairs explicitly with cipherstash_zerokms_keyset_grant.

cipherstash Provider

Use the CipherStash provider to manage machine identities, ZeroKMS clients, keysets, and keyset grants in a workspace, and to install EQL v4 into PostgreSQL databases. Configure a separate provider instance for each workspace. See the workspace documentation for the CipherStash concepts.

The provider has two optional halves. auth connects to a CipherStash workspace and is required by every CipherStash resource and data source. database connects to a PostgreSQL server and is required by cipherstash_eql_v4. Without auth, the provider never reads CS_* environment variables or contacts CipherStash; without database, it never connects to PostgreSQL.

This provider is in development and is not published to the Terraform Registry. It uses this repository's public pkg/stack/auth and pkg/stack/manage Go packages. Builds require no BNDRY module, sibling SDK checkout, local module replacement or WebAssembly guest. The provider is licensed under the MIT License.

Authenticate with an Admin access key. The provider requires a verified Admin role even for configurations that manage only ZeroKMS resources or read data sources. Successful configuration does not prove permission for every operation. Create this credential outside the Terraform configuration that uses it. Resource access keys and client key values are stored in Terraform state and saved plans, even when marked sensitive. Provider settings are not stored in state, but saved plans can contain them. Protect these files and your state backend.

Neither the provider nor manage.Config reads CS_CLIENT_ID: it identifies an application encryption client, not an authentication principal. Manage client/keyset pairs explicitly with cipherstash_zerokms_keyset_grant.

Schema

Optional

  • auth (Attributes) Connection to a CipherStash workspace. Every CipherStash resource and data source requires it. Set it to {} to take both values from the environment. When it is omitted, the provider never reads CS_WORKSPACE_CRN, CS_CLIENT_ACCESS_KEY or CS_CTS_HOST and never contacts CipherStash. When CS_CTS_HOST is set, as in CipherStash's SDKs, the provider sends the access key and management requests to that CipherStash Token Service instead of the workspace region's, and requires it to have issued the tokens. It must be an HTTPS URL, or HTTP to a loopback host, without credentials, query or fragment; an empty value is ignored. (see below for nested schema)
  • database (Attributes) Connection to a PostgreSQL server. cipherstash_eql_v4 requires it and names the database to use. Unset arguments fall back to the libpq environment variables PGHOST, PGPORT, PGUSER, PGPASSWORD, PGSSLMODE and PGSSLROOTCERT, and to the password file. Connect as a role that can create the ORE operator class: a superuser, or rds_superuser on Amazon RDS and Aurora. The connection opens only when a resource needs it, so these values may be unknown during planning. (see below for nested schema)

Nested Schema for auth

Optional:

  • client_access_key (String, Sensitive) Access key with the Admin role for this workspace. Omit this argument or set it to null to use CS_CLIENT_ACCESS_KEY. Explicit known values override the environment. Empty, unknown or malformed selected values are rejected without fallback. CS_ACCESS_KEY, CS_CONTROL_ACCESS_KEY and CIPHERSTASH_ACCESS_KEY are ignored. Native authentication verifies the token's signature, issuer, audience, expiry, workspace and Admin role before using it. Credentials without Admin, including Control-only and Member-only credentials, are rejected. CipherStash services authorize each request.
  • workspace_crn (String) CipherStash Resource Name (CRN) of the workspace, in the format crn:<region>.aws:<workspace ID>. Omit this argument or set it to null to use CS_WORKSPACE_CRN. Explicit known values override the environment. Empty, unknown or malformed selected values are rejected without fallback; no saved profile is read.

Nested Schema for database

Optional:

  • host (String) Server host name or IP address. Null uses PGHOST.
  • password (String, Sensitive) Password for the role. Null uses PGPASSWORD or the password file.
  • port (Number) Server port. Null uses PGPORT, or 5432.
  • sslmode (String) libpq TLS mode: disable, allow, prefer, require, verify-ca or verify-full. Null uses PGSSLMODE, or prefer. Use verify-full outside local development.
  • sslrootcert (String) Path to the certificate authorities that verify the server certificate. Null uses PGSSLROOTCERT.
  • username (String) Role to connect as. Null uses PGUSER. The role that installs EQL owns every EQL object.