2020-09-23 12:15:21 -07:00
|
|
|
---
|
|
|
|
|
layout: docs
|
2024-12-04 13:28:17 -05:00
|
|
|
page_title: GCP Cloud KMS configuration
|
2020-09-23 12:15:21 -07:00
|
|
|
description: >-
|
2024-12-04 13:28:17 -05:00
|
|
|
Learn about using the GCP Cloud KMS for key management and configuring parameters and authentication. View an example gcpkms configuration.
|
2020-09-23 12:15:21 -07:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# `gcpckms` KMS
|
|
|
|
|
|
|
|
|
|
The GCP Cloud KMS configures Boundary to use GCP Cloud KMS for key management.
|
|
|
|
|
|
|
|
|
|
The GCP Cloud KMS seal is activated by the presence of a `seal "gcpckms"` block in Boundary's configuration file.
|
|
|
|
|
|
2023-07-07 14:42:11 -04:00
|
|
|
## `gcpckms` example
|
2020-09-23 12:15:21 -07:00
|
|
|
|
|
|
|
|
This example shows configuring GCP Cloud KMS through the Boundary
|
|
|
|
|
configuration file by providing all the required values:
|
|
|
|
|
|
|
|
|
|
```hcl
|
|
|
|
|
kms "gcpckms" {
|
2020-10-13 15:21:09 -04:00
|
|
|
purpose = "root"
|
2020-09-23 12:15:21 -07:00
|
|
|
credentials = "/usr/boundary/boundary-project-user-creds.json"
|
|
|
|
|
project = "boundary-project"
|
|
|
|
|
region = "global"
|
|
|
|
|
key_ring = "boundary-keyring"
|
|
|
|
|
crypto_key = "boundary-key"
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2023-07-07 14:42:11 -04:00
|
|
|
## `gcpckms` parameters
|
2020-09-23 12:15:21 -07:00
|
|
|
|
|
|
|
|
These parameters apply to the `kms` stanza in the Boundary configuration file:
|
|
|
|
|
|
2022-11-24 19:07:37 -06:00
|
|
|
- `purpose` - Purpose of this KMS, acceptable values are: `worker-auth`, `worker-auth-storage`,
|
2024-04-12 15:37:52 -04:00
|
|
|
`root`, `previous-root`, `recovery`, `bsr`, or `config`.
|
2020-10-13 15:21:09 -04:00
|
|
|
|
2020-09-23 12:15:21 -07:00
|
|
|
- `credentials` `(string: <required>)`: The path to the credentials JSON file
|
|
|
|
|
to use. May be also specified by the `GOOGLE_CREDENTIALS` or
|
|
|
|
|
`GOOGLE_APPLICATION_CREDENTIALS` environment variable or set automatically if
|
|
|
|
|
running under Google App Engine, Google Compute Engine or Google Kubernetes
|
|
|
|
|
Engine.
|
|
|
|
|
|
|
|
|
|
- `project` `(string: <required>)`: The GCP project ID to use. May also be
|
|
|
|
|
specified by the `GOOGLE_PROJECT` environment variable.
|
|
|
|
|
|
|
|
|
|
- `region` `(string: "us-east-1")`: The GCP region/location where the key ring
|
|
|
|
|
lives. May also be specified by the `GOOGLE_REGION` environment variable.
|
|
|
|
|
|
2022-12-07 13:36:48 -08:00
|
|
|
- `key_ring` `(string: <required>)`: The GCP CKMS key ring to use. May also be specified
|
|
|
|
|
by the `GCPCKMS_WRAPPER_KEY_RING` environment variable.
|
2020-09-23 12:15:21 -07:00
|
|
|
|
|
|
|
|
- `crypto_key` `(string: <required>)`: The GCP CKMS crypto key to use for
|
2022-12-07 13:36:48 -08:00
|
|
|
encryption and decryption. May also be specified by the `GCPCKMS_WRAPPER_CRYPTO_KEY`
|
|
|
|
|
environment variable.
|
2020-09-23 12:15:21 -07:00
|
|
|
|
2023-07-07 14:42:11 -04:00
|
|
|
## Authentication & permissions
|
2020-09-23 12:15:21 -07:00
|
|
|
|
|
|
|
|
Authentication-related values must be provided, either as environment
|
|
|
|
|
variables or as configuration parameters.
|
|
|
|
|
|
|
|
|
|
GCP authentication values:
|
|
|
|
|
|
|
|
|
|
- `GOOGLE_CREDENTIALS` or `GOOGLE_APPLICATION_CREDENTIALS`
|
|
|
|
|
- `GOOGLE_PROJECT`
|
|
|
|
|
- `GOOGLE_REGION`
|