diff --git a/.hooks/pre-push b/.hooks/pre-push index 1cb94652d..e66f2029c 100755 --- a/.hooks/pre-push +++ b/.hooks/pre-push @@ -7,7 +7,7 @@ if [[ $remote_url == *"boundary-enterprise"* ]]; then exit 0 fi -if [ -f cmd/boundary/package_registration_ent.go ]; then +if [ -f cmd/threshold/package_registration_ent.go ]; then echo "Found enterprise file while pushing to oss remote" exit 1 fi diff --git a/.release/boundary-artifacts.hcl b/.release/boundary-artifacts.hcl deleted file mode 100644 index ab7746df0..000000000 --- a/.release/boundary-artifacts.hcl +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright IBM Corp. 2020, 2026 -# SPDX-License-Identifier: BUSL-1.1 - -schema = 1 -artifacts { - zip = [ - "boundary_${version}_darwin_amd64.zip", - "boundary_${version}_darwin_arm64.zip", - "boundary_${version}_freebsd_386.zip", - "boundary_${version}_freebsd_amd64.zip", - "boundary_${version}_freebsd_arm.zip", - "boundary_${version}_linux_386.zip", - "boundary_${version}_linux_amd64.zip", - "boundary_${version}_linux_arm.zip", - "boundary_${version}_linux_arm64.zip", - "boundary_${version}_netbsd_386.zip", - "boundary_${version}_netbsd_amd64.zip", - "boundary_${version}_netbsd_arm.zip", - "boundary_${version}_openbsd_386.zip", - "boundary_${version}_openbsd_amd64.zip", - "boundary_${version}_openbsd_arm.zip", - "boundary_${version}_solaris_amd64.zip", - "boundary_${version}_windows_386.zip", - "boundary_${version}_windows_amd64.zip", - ] - rpm = [ - "boundary-${version_linux}-1.aarch64.rpm", - "boundary-${version_linux}-1.armv7hl.rpm", - "boundary-${version_linux}-1.i386.rpm", - "boundary-${version_linux}-1.x86_64.rpm", - ] - deb = [ - "boundary_${version_linux}-1_amd64.deb", - "boundary_${version_linux}-1_arm64.deb", - "boundary_${version_linux}-1_armhf.deb", - "boundary_${version_linux}-1_i386.deb", - ] - container = [ - "boundary_default_linux_386_${version}_${commit_sha}.docker.tar", - "boundary_default_linux_amd64_${version}_${commit_sha}.docker.tar", - "boundary_default_linux_arm64_${version}_${commit_sha}.docker.tar", - "boundary_default_linux_arm_${version}_${commit_sha}.docker.tar", - ] -} diff --git a/.release/docker/README.md b/.release/docker/README.md index b5a47aa94..159bd4f75 100644 --- a/.release/docker/README.md +++ b/.release/docker/README.md @@ -1,16 +1,15 @@ -# Boundary Docker Image +# Threshold Docker Image -The root of this repository contains the officially supported HashiCorp Dockerfile to build the hashicorp/boundary docker image. -The dev docker image should be built for local dev and testing, -while the production docker image is built in CI and makes use of CI-built binaries. -The official docker image is built using the official binaries from releases.hashicorp.com. +The root of this repository contains the Dockerfile used to build the Threshold +docker image. Threshold is a community fork of HashiCorp Boundary Community +Edition and is not affiliated with or endorsed by HashiCorp or IBM. + +The dev docker image is built from a locally built binary (`./bin/threshold`), +while the production docker image makes use of CI-built binaries. ## Build -See the Makefile targets in the root of this repository -for building Boundary images in either development or release modes: +See the Makefile targets in the root of this repository for building images: - `make docker-build-dev` - - `make docker-multiarch-build` - - `make docker-build` - `make docker` diff --git a/.release/docker/README_docker_io.md b/.release/docker/README_docker_io.md index 401274cac..5eab76624 100644 --- a/.release/docker/README_docker_io.md +++ b/.release/docker/README_docker_io.md @@ -1,46 +1,46 @@ -# Boundary +# Threshold ## Usage See the latest updates to the Dockerfile for this image in our -[GitHub repository](https://github.com/hashicorp/boundary). +[repository](https://repo.anhonesthost.net/CyberCoveLLC/threshold). ### Dev Mode -Due to the limitations of `boundary dev` running and maintaining a postgres docker container, +Due to the limitations of `threshold dev` running and maintaining a postgres docker container, it's not recommended to run `dev` mode inside docker. To do so will require knowledge of running [docker-in-docker](https://hub.docker.com/_/docker), and the caveats associated with it. ### Default Configuration -The default behavior of the Boundary docker image is to run `boundary server -config /boundary/config.hcl`. +The default behavior of the Threshold docker image is to run `threshold server -config /threshold/config.hcl`. The included `config.hcl` file is meant to serve as an example, and is not suitable for actual deployment. Please see the comments within the file for more information; -full configuration details can be found on Boundary's documentation site. +full configuration details can be found on Threshold's documentation site. ### Postgres -The usage instructions in this README assume you have an external postgres database (version 12 or greater) to run boundary server with. +The usage instructions in this README assume you have an external postgres database (version 12 or greater) to run threshold server with. If you want to get started quickly, you can start a local postgres in docker: ```bash docker run -it -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres postgres ``` -The postgres URL setting is defined with `env://BOUNDARY_POSTGRES_URL` so it can be easily set with `-e` during docker run: +The postgres URL setting is defined with `env://THRESHOLD_POSTGRES_URL` so it can be easily set with `-e` during docker run: ```bash docker run \ --network host \ - -e 'BOUNDARY_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ - hashicorp/boundary + -e 'THRESHOLD_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ + repo.anhonesthost.net/cybercovellc/threshold ``` ### Database Init @@ -52,8 +52,8 @@ initialize the database using the default `config.hcl`: ```bash docker run \ --network host \ - -e 'BOUNDARY_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ - hashicorp/boundary database init -config /boundary/config.hcl + -e 'THRESHOLD_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ + repo.anhonesthost.net/cybercovellc/threshold database init -config /threshold/config.hcl ``` If you want to run this with your own `config.hcl` (assuming `config.hcl` is located at `$(pwd)/config.hcl`): @@ -61,22 +61,22 @@ If you want to run this with your own `config.hcl` (assuming `config.hcl` is loc ```bash docker run \ --network host \ - -e 'BOUNDARY_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ - -v "$(pwd)":/boundary/ \ - hashicorp/boundary database init -config /boundary/config.hcl + -e 'THRESHOLD_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ + -v "$(pwd)":/threshold/ \ + repo.anhonesthost.net/cybercovellc/threshold database init -config /threshold/config.hcl ``` ### Database Migration -If you are updating to a newer version of boundary with a database instance +If you are updating to a newer version of threshold with a database instance that was initialized with an older version, you will need to apply the database migrations: ```bash docker run \ --network host \ - -e 'BOUNDARY_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ - hashicorp/boundary database migrate -config /boundary/config.hcl + -e 'THRESHOLD_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ + repo.anhonesthost.net/cybercovellc/threshold database migrate -config /threshold/config.hcl ``` If you want to run this with your own `config.hcl` (assuming `config.hcl` is located at `$(pwd)/config.hcl`): @@ -84,14 +84,14 @@ If you want to run this with your own `config.hcl` (assuming `config.hcl` is loc ```bash docker run \ --network host \ - -e 'BOUNDARY_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ - -v "$(pwd)":/boundary/ \ - hashicorp/boundary database migrate -config /boundary/config.hcl + -e 'THRESHOLD_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ + -v "$(pwd)":/threshold/ \ + repo.anhonesthost.net/cybercovellc/threshold database migrate -config /threshold/config.hcl ``` ### Server -Start a Boundary server using the default `config.hcl`: +Start a Threshold server using the default `config.hcl`: ```bash docker run \ @@ -99,11 +99,11 @@ docker run \ -p 9200:9200 \ -p 9201:9201 \ -p 9202:9202 \ - -e 'BOUNDARY_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ - hashicorp/boundary + -e 'THRESHOLD_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ + repo.anhonesthost.net/cybercovellc/threshold ``` -Start a Boundary server using your own `config.hcl`, assuming it's located at `$(pwd)/config.hcl`: +Start a Threshold server using your own `config.hcl`, assuming it's located at `$(pwd)/config.hcl`: ```bash docker run \ @@ -111,7 +111,7 @@ docker run \ -p 9200:9200 \ -p 9201:9201 \ -p 9202:9202 \ - -v "$(pwd)":/boundary/ \ - -e 'BOUNDARY_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ - hashicorp/boundary + -v "$(pwd)":/threshold/ \ + -e 'THRESHOLD_POSTGRES_URL=postgresql://postgres:postgres@0.0.0.0:5432/postgres?sslmode=disable' \ + repo.anhonesthost.net/cybercovellc/threshold ``` diff --git a/.release/docker/config.hcl b/.release/docker/config.hcl index 20b224da3..73761f15e 100644 --- a/.release/docker/config.hcl +++ b/.release/docker/config.hcl @@ -14,12 +14,12 @@ controller { database { # This configuration setting requires the user to execute the container with the URL as an env var - # to connect to the Boundary postgres DB. An example of how this can be done assuming the postgres + # to connect to the Threshold postgres DB. An example of how this can be done assuming the postgres # database is running as a container and you're using Docker for Mac (replace host.docker.internal with # localhost if you're on Linux): # - # $ docker run -e 'BOUNDARY_POSTGRES_URL=postgresql://postgres:postgres@host.docker.internal:5432/postgres?sslmode=disable' [other options] boundary:[version] - url = "env://BOUNDARY_POSTGRES_URL" + # $ docker run -e 'THRESHOLD_POSTGRES_URL=postgresql://postgres:postgres@host.docker.internal:5432/postgres?sslmode=disable' [other options] threshold:[version] + url = "env://THRESHOLD_POSTGRES_URL" } public_cluster_addr = "env://HOSTNAME" @@ -48,7 +48,7 @@ listener "tcp" { tls_disable = true } -# Root KMS configuration block: this is the root key for Boundary +# Root KMS configuration block: this is the root key for Threshold # Use a production KMS such as AWS KMS in production installs kms "aead" { purpose = "root" @@ -67,7 +67,7 @@ kms "aead" { key_id = "global_worker-auth" } -# Recovery KMS block: configures the recovery key for Boundary +# Recovery KMS block: configures the recovery key for Threshold # Use a production KMS such as AWS KMS for production installs kms "aead" { purpose = "recovery" diff --git a/.release/docker/docker-entrypoint.sh b/.release/docker/docker-entrypoint.sh index 3fd93a752..f9b4b6293 100755 --- a/.release/docker/docker-entrypoint.sh +++ b/.release/docker/docker-entrypoint.sh @@ -12,24 +12,34 @@ set -e # Prevent core dumps ulimit -c 0 -# If the user is trying to run Boundary directly with some arguments, then -# pass them to Boundary. +# Backwards compatibility: honor legacy BOUNDARY_* environment variables by +# mirroring them to their THRESHOLD_* equivalents when the latter are unset. +# (The Threshold CLI itself also falls back to BOUNDARY_* for CLI variables.) +for legacy_name in $(env | sed -n 's/^\(BOUNDARY_[A-Za-z0-9_]*\)=.*/\1/p'); do + new_name="THRESHOLD_${legacy_name#BOUNDARY_}" + if [ -z "$(printenv "$new_name")" ]; then + export "$new_name=$(printenv "$legacy_name")" + fi +done + +# If the user is trying to run Threshold directly with some arguments, then +# pass them to Threshold. if [ "${1:0:1}" = '-' ]; then - set -- boundary "$@" + set -- threshold "$@" fi if [ "$1" = 'server' ]; then shift - set -- boundary server \ + set -- threshold server \ "$@" -elif boundary --help "$1" 2>&1 | grep -q "boundary $1"; then +elif threshold --help "$1" 2>&1 | grep -q "threshold $1"; then # We can't use the return code to check for the existence of a subcommand, so # we have to use grep to look for a pattern in the help output. - set -- boundary "$@" + set -- threshold "$@" fi -# If we are running Boundary, make sure it executes as the proper user. -if [ "$1" = 'boundary' ]; then +# If we are running Threshold, make sure it executes as the proper user. +if [ "$1" = 'threshold' ]; then is_root=0 if [ "$(id -u)" = '0' ]; then is_root=1 @@ -38,23 +48,23 @@ if [ "$1" = 'boundary' ]; then if [ -z "$SKIP_CHOWN" ]; then if [ "$is_root" = '1' ]; then # If the config dir is bind mounted then chown it - if [ "$(stat -c %u /boundary)" != "$(id -u boundary)" ]; then - chown -R boundary:boundary /boundary || echo "Could not chown /boundary (may not have appropriate permissions)" + if [ "$(stat -c %u /threshold)" != "$(id -u threshold)" ]; then + chown -R threshold:threshold /threshold || echo "Could not chown /threshold (may not have appropriate permissions)" fi else - >&2 echo "SKIP_CHOWN not set but running non-root; skipping chown /boundary" + >&2 echo "SKIP_CHOWN not set but running non-root; skipping chown /threshold" fi fi if [ -z "$SKIP_SETCAP" ]; then if [ "$is_root" = '1' ]; then - # Allow mlock to avoid swapping Boundary memory to disk - setcap cap_ipc_lock=+ep $(readlink -f $(which boundary)) + # Allow mlock to avoid swapping Threshold memory to disk + setcap cap_ipc_lock=+ep $(readlink -f $(which threshold)) - # In the case Boundary has been started in a container without IPC_LOCK privileges - if ! boundary -version 1>/dev/null 2>/dev/null; then - >&2 echo "Couldn't start Boundary with IPC_LOCK. Disabling IPC_LOCK, please use --privileged or --cap-add IPC_LOCK" - setcap cap_ipc_lock=-ep $(readlink -f $(which boundary)) + # In the case Threshold has been started in a container without IPC_LOCK privileges + if ! threshold -version 1>/dev/null 2>/dev/null; then + >&2 echo "Couldn't start Threshold with IPC_LOCK. Disabling IPC_LOCK, please use --privileged or --cap-add IPC_LOCK" + setcap cap_ipc_lock=-ep $(readlink -f $(which threshold)) fi else >&2 echo "SKIP_SETCAP not set but running non-root; skipping setcap" @@ -62,7 +72,7 @@ if [ "$1" = 'boundary' ]; then fi if [ "$is_root" = '1' ]; then - set -- su-exec boundary "$@" + set -- su-exec threshold "$@" fi fi diff --git a/.release/linux/package/etc/boundary.d/boundary.env b/.release/linux/package/etc/threshold.d/threshold.env similarity index 100% rename from .release/linux/package/etc/boundary.d/boundary.env rename to .release/linux/package/etc/threshold.d/threshold.env diff --git a/.release/linux/package/etc/boundary.d/boundary.hcl b/.release/linux/package/etc/threshold.d/threshold.hcl similarity index 90% rename from .release/linux/package/etc/boundary.d/boundary.hcl rename to .release/linux/package/etc/threshold.d/threshold.hcl index bef657304..15a633e1a 100644 --- a/.release/linux/package/etc/boundary.d/boundary.hcl +++ b/.release/linux/package/etc/threshold.d/threshold.hcl @@ -15,7 +15,7 @@ # # supply the url, or "env://" to name an environment variable # # that contains the URL. # database { -# url = "postgresql://boundary:boundarydemo@postgres.yourdomain.com:5432/boundary" +# url = "postgresql://threshold:thresholddemo@postgres.yourdomain.com:5432/threshold" # } # } @@ -42,7 +42,7 @@ # purpose = "cluster" # } -# # Root KMS configuration block: this is the root key for Boundary +# # Root KMS configuration block: this is the root key for Threshold # # Use a production KMS such as AWS KMS in production installs # kms "aead" { # purpose = "root" @@ -61,7 +61,7 @@ # key_id = "global_worker-auth" # } -# # Recovery KMS block: configures the recovery key for Boundary +# # Recovery KMS block: configures the recovery key for Threshold # # Use a production KMS such as AWS KMS for production installs # kms "aead" { # purpose = "recovery" diff --git a/.release/linux/package/etc/boundary.d/worker.hcl b/.release/linux/package/etc/threshold.d/worker.hcl similarity index 100% rename from .release/linux/package/etc/boundary.d/worker.hcl rename to .release/linux/package/etc/threshold.d/worker.hcl diff --git a/.release/linux/package/usr/lib/systemd/system/boundary.service b/.release/linux/package/usr/lib/systemd/system/boundary.service deleted file mode 100644 index 617f56179..000000000 --- a/.release/linux/package/usr/lib/systemd/system/boundary.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description="HashiCorp Boundary - Identity-based access management for dynamic infrastructure" -Documentation=https://www.boundaryproject.io/docs -StartLimitIntervalSec=60 -StartLimitBurst=3 - -[Service] -EnvironmentFile=-/etc/boundary.d/boundary.env -User=boundary -Group=boundary -ProtectSystem=full -ProtectHome=read-only -ExecStart=/usr/bin/boundary server -config=/etc/boundary.d/boundary.hcl -ExecReload=/bin/kill --signal HUP $MAINPID -KillMode=process -KillSignal=SIGINT -Restart=on-failure -RestartSec=5 -TimeoutStopSec=30 -LimitMEMLOCK=infinity - -[Install] -WantedBy=multi-user.target diff --git a/.release/linux/package/usr/lib/systemd/system/threshold.service b/.release/linux/package/usr/lib/systemd/system/threshold.service new file mode 100644 index 000000000..1c2926ba3 --- /dev/null +++ b/.release/linux/package/usr/lib/systemd/system/threshold.service @@ -0,0 +1,23 @@ +[Unit] +Description="Threshold (fork of HashiCorp Boundary CE) - Identity-based access management for dynamic infrastructure" +Documentation=https://repo.anhonesthost.net/CyberCoveLLC/threshold +StartLimitIntervalSec=60 +StartLimitBurst=3 + +[Service] +EnvironmentFile=-/etc/threshold.d/threshold.env +User=threshold +Group=threshold +ProtectSystem=full +ProtectHome=read-only +ExecStart=/usr/bin/threshold server -config=/etc/threshold.d/threshold.hcl +ExecReload=/bin/kill --signal HUP $MAINPID +KillMode=process +KillSignal=SIGINT +Restart=on-failure +RestartSec=5 +TimeoutStopSec=30 +LimitMEMLOCK=infinity + +[Install] +WantedBy=multi-user.target diff --git a/.release/linux/postrm b/.release/linux/postrm index 342d3be85..ecf8f5079 100644 --- a/.release/linux/postrm +++ b/.release/linux/postrm @@ -2,7 +2,7 @@ if [ "$1" = "purge" ] then - userdel boundary + userdel threshold fi exit 0 \ No newline at end of file diff --git a/.release/linux/preinst b/.release/linux/preinst index 22d84d439..5f0fcaf9a 100644 --- a/.release/linux/preinst +++ b/.release/linux/preinst @@ -2,7 +2,7 @@ set -eu -USER="boundary" +USER="threshold" if ! id -u $USER > /dev/null 2>&1; then useradd \ diff --git a/.release/release-metadata.hcl b/.release/release-metadata.hcl index 97e9d8905..b5a8d5740 100644 --- a/.release/release-metadata.hcl +++ b/.release/release-metadata.hcl @@ -1,9 +1,7 @@ # Copyright IBM Corp. 2020, 2026 # SPDX-License-Identifier: BUSL-1.1 -url_docker_registry_dockerhub = "https://hub.docker.com/r/hashicorp/boundary" -url_docker_registry_ecr = "https://gallery.ecr.aws/hashicorp/boundary" -url_license = "https://github.com/hashicorp/boundary/blob/main/LICENSE" -url_project_website = "https://www.boundaryproject.io" -url_release_notes = "https://www.boundaryproject.io/docs/releases/release-notes" -url_source_repository = "https://github.com/hashicorp/boundary" \ No newline at end of file +url_license = "https://repo.anhonesthost.net/CyberCoveLLC/threshold/src/branch/main/LICENSE" +url_project_website = "https://repo.anhonesthost.net/CyberCoveLLC/threshold" +url_release_notes = "https://repo.anhonesthost.net/CyberCoveLLC/threshold/src/branch/main/CHANGELOG.md" +url_source_repository = "https://repo.anhonesthost.net/CyberCoveLLC/threshold" \ No newline at end of file diff --git a/.release/threshold-artifacts.hcl b/.release/threshold-artifacts.hcl new file mode 100644 index 000000000..aad86cc6a --- /dev/null +++ b/.release/threshold-artifacts.hcl @@ -0,0 +1,44 @@ +# Copyright IBM Corp. 2020, 2026 +# SPDX-License-Identifier: BUSL-1.1 + +schema = 1 +artifacts { + zip = [ + "threshold_${version}_darwin_amd64.zip", + "threshold_${version}_darwin_arm64.zip", + "threshold_${version}_freebsd_386.zip", + "threshold_${version}_freebsd_amd64.zip", + "threshold_${version}_freebsd_arm.zip", + "threshold_${version}_linux_386.zip", + "threshold_${version}_linux_amd64.zip", + "threshold_${version}_linux_arm.zip", + "threshold_${version}_linux_arm64.zip", + "threshold_${version}_netbsd_386.zip", + "threshold_${version}_netbsd_amd64.zip", + "threshold_${version}_netbsd_arm.zip", + "threshold_${version}_openbsd_386.zip", + "threshold_${version}_openbsd_amd64.zip", + "threshold_${version}_openbsd_arm.zip", + "threshold_${version}_solaris_amd64.zip", + "threshold_${version}_windows_386.zip", + "threshold_${version}_windows_amd64.zip", + ] + rpm = [ + "threshold-${version_linux}-1.aarch64.rpm", + "threshold-${version_linux}-1.armv7hl.rpm", + "threshold-${version_linux}-1.i386.rpm", + "threshold-${version_linux}-1.x86_64.rpm", + ] + deb = [ + "threshold_${version_linux}-1_amd64.deb", + "threshold_${version_linux}-1_arm64.deb", + "threshold_${version_linux}-1_armhf.deb", + "threshold_${version_linux}-1_i386.deb", + ] + container = [ + "threshold_default_linux_386_${version}_${commit_sha}.docker.tar", + "threshold_default_linux_amd64_${version}_${commit_sha}.docker.tar", + "threshold_default_linux_arm64_${version}_${commit_sha}.docker.tar", + "threshold_default_linux_arm_${version}_${commit_sha}.docker.tar", + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 83ff7606e..6daab31a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# Threshold CHANGELOG + +> **Note:** Threshold is a community fork of HashiCorp Boundary Community Edition (CE), which was archived upstream on +> 2026-10-09. Entries below this note are the upstream Boundary changelog and are kept unchanged for history. +> Threshold-specific changes are listed under the "Threshold" heading, newest first. + +## Threshold + +### Unreleased + +* Renamed the CLI binary to `threshold` and rebranded user-visible text. `THRESHOLD_*` environment variables are now + preferred, with `BOUNDARY_*` honored as a fallback. The client cache directory is `~/.threshold` (falling back to an + existing `~/.boundary`), and stored tokens are written under new keyring names while old entries are still read. + # Boundary CHANGELOG Canonical reference for changes, improvements, and bugfixes for Boundary. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6176796c6..0898c4e19 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,53 +1,46 @@ -# Contributing to Boundary +# Contributing to Threshold -Thank you for contributing to Boundary! Here you can find common questions around reporting issues and opening -pull requests to our project. +Thank you for contributing to Threshold! Threshold is a community fork of HashiCorp Boundary Community Edition (CE). +It is not affiliated with or endorsed by HashiCorp or IBM. Here you can find common questions around reporting issues +and opening pull requests to the project. The repository lives at +. -When contributing in any way to the Boundary project (new issue, PR, etc), please be aware that our team identifies with many gender pronouns. Please remember to use nonbinary pronouns (they/them) and gender neutral language ("Hello folks") when addressing our team. For more reading on our code of conduct, please see the [HashiCorp community guidelines](https://www.hashicorp.com/community-guidelines). +Please be respectful and inclusive when contributing in any way (new issue, PR, etc). ## Issue Reporting ### Reporting Security Related Vulnerabilities -We take Boundary's security and our users' trust very seriously. If you believe you have found a security issue -in Boundary, please responsibly disclose by contacting us at security@hashicorp.com. Do not open an issue on -our GitHub issue tracker if you believe you've found a security related issue, thank you! +If you believe you have found a security issue in Threshold, please disclose it responsibly by contacting the +maintainers privately rather than opening a public issue. Issues that exist in upstream HashiCorp Boundary CE should +also be treated as security-sensitive. ### Bug Fixes -If you believe you found a bug with Boundary, please: +If you believe you found a bug with Threshold, please: -1. Build from the latest `main` HEAD commit to attempt to reproduce the issue. It's possible we've already fixed -the bug, and this is a first good step to ensuring that's not the case. -1. Take a look at the [Boundary Discuss](https://discuss.hashicorp.com/c/boundary/50) to see if other folks have had -similar issues. -1. Ensure a similar ticket is not already opened by searching our opened issues on GitHub. +1. Build from the latest `main` HEAD commit to attempt to reproduce the issue. It's possible it has already been fixed. +1. Ensure a similar issue is not already opened by searching the open issues in the repository. - -Once you've verified the above, feel free to open a bug fix issue template type from our [issue selector](https://github.com/hashicorp/boundary/issues/new/choose) -and we'll do our best to triage it as quickly as possible. +Once you've verified the above, open an issue in the repository describing how to reproduce the problem. ## Pull Requests ### New Features & Improvements -Before writing a line of code, please ask us about a potential improvement or feature that you want to write into Boundary. We may already be working on it; even if we aren't, we need to ensure that both the feature and its proposed implementation is aligned with our road map, vision, and standards for the project. We're happy to help walk through that via a [feature request issue](https://github.com/hashicorp/boundary/issues/new/choose). - -You can see a public [road map for Boundary](https://github.com/hashicorp/boundary/issues/new/choose) on our docs site and we encourage -everyone to look this over to understand at a high level what we're working on with Boundary. +Before writing a line of code, please open an issue to discuss a potential improvement or feature. Threshold is +focused on maintaining the Community Edition code base, so changes that stay close to upstream behavior and +compatibility are the easiest to accept. ### Submitting a New Pull Request When submitting a pull request, please ensure: 1. You've added a changelog line clearly describing the new addition under the correct changelog sub-section. -1. You've followed the above guidelines for contributing to Boundary. - -Once you open your PR, our auto-labeling will add labels to help us triage and prioritize your contribution. Please -allow us a couple of days to comment, request changes, or approve your PR. Thank you for your contribution! +1. You've followed the above guidelines for contributing to Threshold. ## Changelog -The changelog is updated by PR contributors. Each contribution to Boundary should include a changelog update at the contributor or reviewer discretion. +The changelog is updated by PR contributors. Each contribution to Threshold should include a changelog update at the contributor or reviewer discretion. The changelog should be updated when the contribution is large enough to warrant it being called out in the larger release cycle. Enhancements, bug fixes, and other contributions that practitioners might want to be aware of should exist in the changelog. @@ -72,7 +65,7 @@ Any bug fixes fall into this section. Most tests require a postgres database instance to successfully run. This is provided via docker -by running a customized postgres image that is optimized for boundary tests. +by running a customized postgres image that is optimized for Threshold tests. Before running the test suite, this docker container must be started: @@ -109,7 +102,7 @@ once the test database is ready: $ make test ``` -Before running any test please ensure that Docker is started. Boundary uses a Docker container to initiate a database for testing. +Before running any test please ensure that Docker is started. Threshold uses a Docker container to initiate a database for testing. If a test is interrupted check to make certain that all Docker containers have been properly destroyed. ### Running individual tests diff --git a/Dockerfile b/Dockerfile index bbe12c2bf..726367bad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,108 +13,53 @@ # For local dev and testing purposes, please build and use the `dev` docker image. -# Development docker image -FROM docker.mirror.hashicorp.services/alpine:3.21 as dev +# Development docker image (built from the locally built ./bin/threshold) +FROM alpine:3.21 as dev RUN set -eux && \ - addgroup boundary && \ - adduser -s /bin/sh -S -G boundary boundary && \ + addgroup threshold && \ + adduser -s /bin/sh -S -G threshold threshold && \ apk add --no-cache wget ca-certificates dumb-init gnupg libcap openssl su-exec iputils libc6-compat iptables -ADD bin/boundary /bin/boundary -RUN setcap cap_ipc_lock=+ep /bin/boundary +ADD bin/threshold /bin/threshold +RUN setcap cap_ipc_lock=+ep /bin/threshold -RUN mkdir /boundary/ -ADD .release/docker/config.hcl /boundary/config.hcl -RUN chown -R boundary:boundary /boundary/ -RUN chmod -R 640 /boundary/* +RUN mkdir /threshold/ +ADD .release/docker/config.hcl /threshold/config.hcl +RUN chown -R threshold:threshold /threshold/ +RUN chmod -R 640 /threshold/* EXPOSE 9200 9201 9202 -VOLUME /boundary/ +VOLUME /threshold/ LABEL org.opencontainers.image.licenses="BUSL-1.1" COPY .release/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY bin/LICENSE.txt /usr/share/doc/boundary/LICENSE.txt +COPY bin/LICENSE.txt /usr/share/doc/threshold/LICENSE.txt -USER boundary +USER threshold ENTRYPOINT ["docker-entrypoint.sh"] -CMD ["server", "-config", "/boundary/config.hcl"] - - -# Official docker image that uses binaries from releases.hashicorp.com -FROM docker.mirror.hashicorp.services/alpine:3.21 as official - -ARG PRODUCT_VERSION - -LABEL name="Boundary" \ - maintainer="HashiCorp Boundary Team " \ - vendor="HashiCorp" \ - version=$PRODUCT_VERSION \ - release=$PRODUCT_VERSION \ - summary="Boundary provides simple and secure access to hosts and services" \ - description="The Boundary Docker image is designed to enable practitioners to run Boundary in server mode on a container scheduler" \ - org.opencontainers.image.licenses="BUSL-1.1" - -RUN set -eux && \ - addgroup boundary && \ - adduser -s /bin/sh -S -G boundary boundary && \ - apk add --no-cache wget ca-certificates dumb-init gnupg libcap openssl su-exec iputils libc6-compat iptables && \ - gpg --keyserver keyserver.ubuntu.com --recv-keys C874011F0AB405110D02105534365D9472D7468F && \ - cd /tmp && \ - apkArch="$(apk --print-arch)" && \ - case "${apkArch}" in \ - aarch64) boundaryArch='arm64' ;; \ - armhf) boundaryArch='armhfv6' ;; \ - x86) boundaryArch='386' ;; \ - x86_64) boundaryArch='amd64' ;; \ - *) echo >&2 "error: unsupported architecture: ${apkArch} (see https://releases.hashicorp.com/boundary/${PRODUCT_VERSION}/ )" && exit 1 ;; \ - esac && \ - wget https://releases.hashicorp.com/boundary/${PRODUCT_VERSION}/boundary_${PRODUCT_VERSION}_linux_${boundaryArch}.zip && \ - wget https://releases.hashicorp.com/boundary/${PRODUCT_VERSION}/boundary_${PRODUCT_VERSION}_SHA256SUMS && \ - wget https://releases.hashicorp.com/boundary/${PRODUCT_VERSION}/boundary_${PRODUCT_VERSION}_SHA256SUMS.sig && \ - gpg --batch --verify boundary_${PRODUCT_VERSION}_SHA256SUMS.sig boundary_${PRODUCT_VERSION}_SHA256SUMS && \ - grep boundary_${PRODUCT_VERSION}_linux_${boundaryArch}.zip boundary_${PRODUCT_VERSION}_SHA256SUMS | sha256sum -c && \ - unzip -d /bin boundary_${PRODUCT_VERSION}_linux_${boundaryArch}.zip && \ - rm boundary_${PRODUCT_VERSION}_linux_${boundaryArch}.zip boundary_${PRODUCT_VERSION}_SHA256SUMS boundary_${PRODUCT_VERSION}_SHA256SUMS.sig && \ - setcap cap_ipc_lock=+ep /bin/boundary && \ - cp /bin/LICENSE.txt /usr/share/doc/boundary/LICENSE.txt && \ - mkdir /boundary - -COPY .release/docker/config.hcl /boundary/config.hcl - -RUN chown -R boundary:boundary /boundary/ -RUN chmod -R 640 /boundary/* - -EXPOSE 9200 9201 9202 -VOLUME /boundary/ - -COPY .release/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh - -USER boundary -ENTRYPOINT ["docker-entrypoint.sh"] -CMD ["server", "-config", "/boundary/config.hcl"] +CMD ["server", "-config", "/threshold/config.hcl"] # Production docker image # Remember, this cannot be built locally -FROM docker.mirror.hashicorp.services/alpine:3.21 as default +FROM alpine:3.21 as default ARG BIN_NAME -# NAME and PRODUCT_VERSION are the name of the software in releases.hashicorp.com -# and the version to download. Example: NAME=boundary PRODUCT_VERSION=1.2.3. -ARG NAME=boundary +# NAME is the name of the software (and of the user/group created in the image); +# PRODUCT_VERSION is the version. Example: NAME=threshold PRODUCT_VERSION=1.2.3. +ARG NAME=threshold ARG PRODUCT_VERSION # TARGETARCH and TARGETOS are set automatically when --platform is provided. ARG TARGETOS TARGETARCH -LABEL name="Boundary" \ - maintainer="HashiCorp Boundary Team " \ - vendor="HashiCorp" \ +LABEL name="Threshold" \ + vendor="Threshold (fork of HashiCorp Boundary CE)" \ version=$PRODUCT_VERSION \ release=$PRODUCT_VERSION \ - summary="Boundary provides simple and secure access to hosts and services" \ - description="The Boundary Docker image is designed to enable practitioners to run Boundary in server mode on a container scheduler" \ + summary="Threshold provides simple and secure access to hosts and services" \ + description="The Threshold Docker image is designed to enable practitioners to run Threshold, a community fork of HashiCorp Boundary Community Edition, in server mode on a container scheduler. Not affiliated with or endorsed by HashiCorp or IBM." \ org.opencontainers.image.licenses="BUSL-1.1" # Set ARGs as ENV so that they can be used in ENTRYPOINT/CMD @@ -126,20 +71,20 @@ RUN addgroup ${NAME} && adduser -s /bin/sh -S -G ${NAME} ${NAME} RUN apk add --no-cache wget ca-certificates dumb-init gnupg libcap openssl su-exec iputils libc6-compat iptables -COPY .release/docker/config.hcl /boundary/config.hcl +COPY .release/docker/config.hcl /threshold/config.hcl COPY dist/$TARGETOS/$TARGETARCH/$BIN_NAME /bin/ -COPY dist/$TARGETOS/$TARGETARCH/LICENSE.txt /usr/share/doc/boundary/LICENSE.txt +COPY dist/$TARGETOS/$TARGETARCH/LICENSE.txt /usr/share/doc/threshold/LICENSE.txt RUN setcap cap_ipc_lock=+ep /bin/$BIN_NAME -RUN chown -R ${NAME}:${NAME} /boundary -RUN chmod -R 640 /boundary/* +RUN chown -R ${NAME}:${NAME} /threshold +RUN chmod -R 640 /threshold/* EXPOSE 9200 9201 9202 -VOLUME /boundary/ +VOLUME /threshold/ COPY .release/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh USER ${NAME} ENTRYPOINT ["docker-entrypoint.sh"] -CMD ["server", "-config", "/boundary/config.hcl"] +CMD ["server", "-config", "/threshold/config.hcl"] diff --git a/Makefile b/Makefile index 6ccd19dff..38a5c8025 100644 --- a/Makefile +++ b/Makefile @@ -55,16 +55,16 @@ dev: .PHONY: build build: BUILD_TAGS+=ui build: build-ui-ifne - @echo "==> Building Boundary with UI features enabled" + @echo "==> Building Threshold with UI features enabled" @CGO_ENABLED=$(CGO_ENABLED) BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/build.sh'" .PHONY: build-no-ui build-no-ui: - @echo "==> Building Boundary without UI features" + @echo "==> Building Threshold without UI features" @CGO_ENABLED=$(CGO_ENABLED) BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/build.sh'" .PHONY: install -install: export BOUNDARY_INSTALL_BINARY=1 +install: export THRESHOLD_INSTALL_BINARY=1 install: build .PHONY: install-no-plugins @@ -74,7 +74,7 @@ install-no-plugins: install .PHONY: build-memprof build-memprof: BUILD_TAGS+=memprofiler build-memprof: - @echo "==> Building Boundary with memory profiling enabled" + @echo "==> Building Threshold with memory profiling enabled" @CGO_ENABLED=$(CGO_ENABLED) BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/build.sh'" # Format Go files, ignoring files marked as generated through the header defined at @@ -363,35 +363,14 @@ install-go: ./ci/goinstall.sh # Docker build and publish variables and targets -REGISTRY_NAME?=docker.io/hashicorp -IMAGE_NAME=boundary +REGISTRY_NAME?=repo.anhonesthost.net/cybercovellc +IMAGE_NAME=threshold VERSION?=0.7.4 IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(VERSION) IMAGE_TAG_DEV?=$(REGISTRY_NAME)/$(IMAGE_NAME):latest-$(shell git rev-parse --short HEAD) .PHONY: docker -docker: docker-build - -.PHONY: docker-build -# Builds from the releases.hashicorp.com official binary -docker-build: - docker build \ - --tag $(IMAGE_TAG) \ - --tag hashicorp/boundary:latest \ - --target=official \ - --build-arg VERSION=$(VERSION) \ - . - -.PHONY: docker-multiarch-build -# Builds multiarch from the releases.hashicorp.com official binary -docker-multiarch-build: - docker buildx build \ - --tag $(IMAGE_TAG) \ - --tag hashicorp/boundary:latest \ - --target=official \ - --build-arg VERSION=$(VERSION) \ - --platform linux/amd64,linux/arm64 \ - . +docker: docker-build-dev DEV_DOCKER_GOOS ?= linux DEV_DOCKER_GOARCH ?= amd64 @@ -406,7 +385,7 @@ docker-build-dev: build --platform $(DEV_DOCKER_GOOS)/$(DEV_DOCKER_GOARCH) \ --tag $(IMAGE_TAG_DEV) \ --target=dev \ - --build-arg=boundary \ + --build-arg=threshold \ . @echo "Successfully built $(IMAGE_TAG_DEV)" @@ -417,7 +396,7 @@ docker-build-dev: build version: @go run \ -ldflags "-X 'github.com/hashicorp/boundary/version.Version=$(shell cat version/VERSION)'" \ - ./cmd/boundary version \ + ./cmd/threshold version \ | awk '/Version Number:/ { print $$3 }' EDITION?= @@ -425,7 +404,7 @@ EDITION?= # This is used for release builds by .github/workflows/build.yml edition: @if [ -z "$(EDITION)" ]; then \ - go run ./cmd/boundary version -format=json | jq -r '.version_metadata // "oss"'; \ + go run ./cmd/threshold version -format=json | jq -r '.version_metadata // "oss"'; \ else \ echo $(EDITION); \ fi; \ diff --git a/NOTICE b/NOTICE new file mode 100644 index 000000000..3b7f8d3e9 --- /dev/null +++ b/NOTICE @@ -0,0 +1,26 @@ +Threshold +========= + +Threshold is a community fork of HashiCorp Boundary Community Edition (CE), +originally developed by HashiCorp, Inc. (an IBM company): + + https://github.com/hashicorp/boundary + +The upstream repository was archived on 2026-10-09. Threshold continues +maintenance of that code base. + +Original work: + Copyright (c) HashiCorp, Inc. + Copyright IBM Corp. 2020, 2026 + Licensed under the Business Source License 1.1 (see LICENSE). + +All existing copyright headers and the LICENSE file are preserved unchanged. +Threshold is distributed under the same license terms as the upstream project. + +Threshold is not affiliated with, endorsed by, or sponsored by HashiCorp, +Inc. or IBM. "Boundary", "HashiCorp", "HCP Boundary" and related marks are +the property of their respective owners and are referenced here solely to +identify the origin of this software. + +Portions of this repository (for example the api and sdk modules) carry their +own license files, which apply to those portions. diff --git a/README.md b/README.md index 71edb5413..1a6157410 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,83 @@ -Boundary +# Threshold -Boundary Community Edition (CE) is no longer under active development, and this repository has been archived as of October 8, 2026. Future Boundary development will focus on HCP Boundary and Boundary Enterprise, where we can provide enterprise grade human and agentic access capabilities. +Threshold provides simple and secure access to hosts and services. It is a +community-maintained fork of HashiCorp Boundary Community Edition (CE). -This repository is now read-only and no longer accepts new issues, pull requests, or community contributions. Existing source code and previously released binaries remain available for reference and existing self-managed use. +## About this fork -No new Boundary CE releases, maintenance updates, bug fixes, or security patches are currently planned. +Threshold is a community fork of [HashiCorp Boundary Community Edition](https://github.com/hashicorp/boundary). +HashiCorp (an IBM company) archived the upstream Boundary CE repository on +2026-10-09 and announced that no further CE releases, maintenance updates, bug +fixes or security patches are planned. Threshold continues maintenance of the +Community Edition code base so that existing self-managed deployments can keep +receiving fixes. -Teams continuing to use Boundary CE should evaluate whether it meets their operational, security, and compliance requirements. -For supported Boundary capabilities, including production-scale governance, compliance, session recording, enterprise support, and future Boundary development, please evaluate HCP Boundary or Boundary Enterprise. +- Threshold is licensed under the [Business Source License 1.1](LICENSE), the + same license as the upstream code. The original license text and all + copyright headers are preserved. See [NOTICE](NOTICE) for attribution. +- **Threshold is not affiliated with, endorsed by, or sponsored by HashiCorp or + IBM.** "Boundary", "HashiCorp" and "HCP Boundary" are trademarks of their + respective owners and are used here only to describe the origin of this + project. +- Upstream project: +- This repository: + +### Compatibility with Boundary CE + +This is the first phase of the rebrand and is designed to keep existing +Boundary CE deployments working: + +- The command-line binary is now `threshold` (built from `cmd/threshold`). +- The wire protocol, HTTP API paths (`/v1`), database schema, plugin protocol + and configuration file format are unchanged. +- The Go module path is still `github.com/hashicorp/boundary` for now; it will + change in a later phase together with regenerated protobuf code. +- Release versions are still reported on the wire with the upstream + `Boundary v` prefix so mixed clusters keep working. `Threshold v` is also + accepted when parsing. + +### Environment variable and path fallbacks + +Threshold prefers `THRESHOLD_*` environment variables, and transparently falls +back to the legacy `BOUNDARY_*` name when the `THRESHOLD_*` variable is not set. +For example `THRESHOLD_ADDR`, `THRESHOLD_TOKEN`, `THRESHOLD_SCOPE_ID`, +`THRESHOLD_KEYRING_TYPE`, `THRESHOLD_TOKEN_NAME`, `THRESHOLD_CONNECT_*`, +`THRESHOLD_SKIP_CACHE_DAEMON` and the other CLI and server variables are read +first, then `BOUNDARY_ADDR`, `BOUNDARY_TOKEN`, and so on. A `THRESHOLD_*` variable that is +set to a non-empty value always wins. Existing scripts and deployments that +only set `BOUNDARY_*` variables do not need to change. + +Notes: + +- `env://VAR` references inside configuration files and flags (for example + `url = "env://BOUNDARY_POSTGRES_URL"` or `url = "env://THRESHOLD_POSTGRES_URL"` + as used by the bundled container config) name an environment variable + literally and are not rewritten; keep using whichever variable name you export. +- `threshold connect -exec` exports both `THRESHOLD_PROXIED_{PORT,IP,ADDR}` and + the legacy `BOUNDARY_PROXIED_{PORT,IP,ADDR}` variables to the child process. +- The container image entrypoint mirrors any `BOUNDARY_*` variables to the + matching `THRESHOLD_*` variable when it is unset. + +Other fallbacks: + +| Item | New | Legacy fallback | +|------|-----|-----------------| +| Client cache directory | `~/.threshold` | `~/.boundary` is used if it exists and `~/.threshold` does not | +| Keyring entry (macOS Keychain / Windows Credential Manager) | `Threshold Auth Token` | `HashiCorp Boundary Auth Token` is read if the new entry is not found, and removed on `threshold logout` | +| Keyring prefix (`pass`, libsecret) | `Threshold` | `HashiCorp_Boundary` is read if the new entry is not found, and removed on `threshold logout` | + +Tokens are always written using the new names. + +## Building + +``` +make build # builds bin/threshold (requires the embedded UI, see Makefile) +make build-no-ui # builds bin/threshold without the embedded admin UI +``` + +The embedded admin UI is built from the upstream `boundary-ui` project and is +not part of this repository. + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/api/client.go b/api/client.go index 1f12dc4af..af0c45563 100644 --- a/api/client.go +++ b/api/client.go @@ -15,7 +15,6 @@ import ( "net" "net/http" "net/url" - "os" "path" "strconv" "strings" @@ -53,14 +52,14 @@ const ( // Config is used to configure the creation of the client type Config struct { - // Addr is the address of the Boundary controller. This should be a - // complete URL such as "http://boundary.example.com". If you need a custom + // Addr is the address of the Threshold controller. This should be a + // complete URL such as "http://threshold.example.com". If you need a custom // SSL cert or want to enable insecure mode, you need to specify a custom // HttpClient. Addr string // Token is the client token that reuslts from authentication and can be - // used to make calls into Boundary + // used to make calls into Threshold Token string // RecoveryKmsWrapper is a wrapper used in the recovery KMS authentication @@ -68,9 +67,9 @@ type Config struct { // per-call, regardless of any value set in Token. RecoveryKmsWrapper wrapping.Wrapper - // HttpClient is the HTTP client to use. Boundary sets sane defaults for the + // HttpClient is the HTTP client to use. Threshold sets sane defaults for the // http.Client and its associated http.Transport created in DefaultConfig. - // If you must modify Boundary's defaults, it is suggested that you start + // If you must modify Threshold's defaults, it is suggested that you start // with that client and modify as needed rather than start with an empty // client (or http.DefaultClient). Currently if the client is cloned the // same HttpClient is used. @@ -114,20 +113,20 @@ type Config struct { } // TLSConfig contains the parameters needed to configure TLS on the HTTP client -// used to communicate with Boundary. +// used to communicate with Threshold. type TLSConfig struct { // CACert is the path to a PEM-encoded CA cert file to use to verify the - // Boundary server SSL certificate. + // Threshold server SSL certificate. CACert string // CAPath is the path to a directory of PEM-encoded CA cert files to verify - // the Boundary server SSL certificate. + // the Threshold server SSL certificate. CAPath string - // ClientCert is the path to the certificate for Boundary communication + // ClientCert is the path to the certificate for Threshold communication ClientCert string - // ClientKey is the path to the private key for Boundary communication + // ClientKey is the path to the private key for Threshold communication ClientKey string // ServerName, if set, is used to set the SNI host when connecting via @@ -162,7 +161,7 @@ func RateLimitLinearJitterBackoff(min, max time.Duration, attemptNum int, resp * // safe to modify the return value of this function. // // The default Addr is http://127.0.0.1:9200, but this can be overridden by -// setting the `BOUNDARY_ADDR` environment variable. +// setting the `THRESHOLD_ADDR` environment variable. // // If an error is encountered, this will return nil. func DefaultConfig() (*Config, error) { @@ -270,7 +269,7 @@ func (c *Config) setAddr(addr string) error { // Remove trailing or leading slashes path := strings.Trim(u.Path, "/") // Remove v1 in front or back (e.g. they could have - // https://boundary.example.com/myinstall/v1 which would put it at the + // https://threshold.example.com/myinstall/v1 which would put it at the // back) path = strings.TrimPrefix(path, "v1") path = strings.TrimSuffix(path, "v1") @@ -296,15 +295,15 @@ func (c *Config) ReadEnvironment() error { var envServerName string // Parse the environment variables - if v := os.Getenv(EnvBoundaryAddr); v != "" { + if v := Getenv(EnvBoundaryAddr); v != "" { c.Addr = v } - if v := os.Getenv(EnvBoundaryToken); v != "" { + if v := Getenv(EnvBoundaryToken); v != "" { c.Token = v } - if v := os.Getenv(EnvBoundaryMaxRetries); v != "" { + if v := Getenv(EnvBoundaryMaxRetries); v != "" { maxRetries, err := strconv.ParseUint(v, 10, 32) if err != nil { return err @@ -318,7 +317,7 @@ func (c *Config) ReadEnvironment() error { c.MaxRetries = int(maxRetries) } - if v := os.Getenv(EnvBoundarySRVLookup); v != "" { + if v := Getenv(EnvBoundarySRVLookup); v != "" { var err error lookup, err := strconv.ParseBool(v) if err != nil { @@ -327,7 +326,7 @@ func (c *Config) ReadEnvironment() error { c.SRVLookup = lookup } - if t := os.Getenv(EnvBoundaryClientTimeout); t != "" { + if t := Getenv(EnvBoundaryClientTimeout); t != "" { clientTimeout, err := parseutil.ParseDurationSecond(t) if err != nil { return fmt.Errorf("could not parse %q", EnvBoundaryClientTimeout) @@ -335,7 +334,7 @@ func (c *Config) ReadEnvironment() error { c.Timeout = clientTimeout } - if v := os.Getenv(EnvBoundaryRateLimit); v != "" { + if v := Getenv(EnvBoundaryRateLimit); v != "" { rateLimit, burstLimit, err := parseRateLimit(v) if err != nil { return err @@ -346,31 +345,31 @@ func (c *Config) ReadEnvironment() error { // TLS Config { var foundTLSConfig bool - if v := os.Getenv(EnvBoundaryCACert); v != "" { + if v := Getenv(EnvBoundaryCACert); v != "" { foundTLSConfig = true envCACert = v } - if v := os.Getenv(EnvBoundaryCAPath); v != "" { + if v := Getenv(EnvBoundaryCAPath); v != "" { foundTLSConfig = true envCAPath = v } - if v := os.Getenv(EnvBoundaryClientCert); v != "" { + if v := Getenv(EnvBoundaryClientCert); v != "" { foundTLSConfig = true envClientCert = v } - if v := os.Getenv(EnvBoundaryClientKey); v != "" { + if v := Getenv(EnvBoundaryClientKey); v != "" { foundTLSConfig = true envClientKey = v } - if v := os.Getenv(EnvBoundaryTLSInsecure); v != "" { + if v := Getenv(EnvBoundaryTLSInsecure); v != "" { foundTLSConfig = true var err error envInsecure, err = strconv.ParseBool(v) if err != nil { - return fmt.Errorf("could not parse BOUNDARY_TLS_INSECURE") + return fmt.Errorf("could not parse THRESHOLD_TLS_INSECURE") } } - if v := os.Getenv(EnvBoundaryTLSServerName); v != "" { + if v := Getenv(EnvBoundaryTLSServerName); v != "" { foundTLSConfig = true envServerName = v } @@ -405,7 +404,7 @@ func parseRateLimit(val string) (rate float64, burst int, err error) { return rate, burst, err } -// Client is the client to the Boundary API. Create a client with NewClient. +// Client is the client to the Threshold API. Create a client with NewClient. type Client struct { modifyLock sync.RWMutex config *Config @@ -413,10 +412,10 @@ type Client struct { // NewClient returns a new client for the given configuration. // -// If the configuration is nil, Boundary will use configuration from +// If the configuration is nil, Threshold will use configuration from // DefaultConfig(), which is the recommended starting configuration. // -// If the environment variable `BOUNDARY_TOKEN` is present, the token will be +// If the environment variable `THRESHOLD_TOKEN` is present, the token will be // automatically added to the client. Otherwise, you must manually call // `SetToken()`. func NewClient(c *Config) (*Client, error) { @@ -465,9 +464,9 @@ func (c *Client) Addr() string { return c.config.Addr } -// Sets the address of Boundary in the client. The format of address should +// Sets the address of Threshold in the client. The format of address should // be "://:". Setting this on a client will override the -// value of the BOUNDARY_ADDR environment variable. +// value of the THRESHOLD_ADDR environment variable. func (c *Client) SetAddr(addr string) error { c.modifyLock.Lock() defer c.modifyLock.Unlock() @@ -624,7 +623,7 @@ func copyHeaders(in http.Header) http.Header { return ret } -// NewRequest creates a new raw request object to query the Boundary controller +// NewRequest creates a new raw request object to query the Threshold controller // configured for this client. This is an advanced method and generally // doesn't need to be called externally. func (c *Client) NewRequest(ctx context.Context, method, requestPath string, body any, opt ...Option) (*retryablehttp.Request, error) { @@ -762,7 +761,7 @@ func (c *Client) Do(r *retryablehttp.Request, opt ...Option) (*Response, error) return !unicode.IsPrint(c) }) if idx != -1 { - return nil, fmt.Errorf("configured Boundary token contains non-printable characters and cannot be used") + return nil, fmt.Errorf("configured Threshold token contains non-printable characters and cannot be used") } if outputCurlString { @@ -848,9 +847,9 @@ func (c *Client) Do(r *retryablehttp.Request, opt ...Option) (*Response, error) "but the client is configured to use TLS. Please either enable TLS\n"+ "on the server or run the client with -address set to an address\n"+ "that uses the http protocol:\n\n"+ - " boundary -address http://
\n\n"+ - "You can also set the BOUNDARY_ADDR environment variable:\n\n\n"+ - " BOUNDARY_ADDR=http://
boundary \n\n"+ + " threshold -address http://
\n\n"+ + "You can also set the THRESHOLD_ADDR environment variable:\n\n\n"+ + " THRESHOLD_ADDR=http://
threshold \n\n"+ "where
is replaced by the actual address to the controller.", err) } diff --git a/api/env.go b/api/env.go new file mode 100644 index 000000000..10ae2da76 --- /dev/null +++ b/api/env.go @@ -0,0 +1,56 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: BUSL-1.1 + +package api + +import ( + "os" + "strings" +) + +const ( + // legacyEnvPrefix is the environment variable prefix used by upstream + // HashiCorp Boundary. It is still honored as a fallback. + legacyEnvPrefix = "BOUNDARY_" + // envPrefix is the preferred environment variable prefix for Threshold. + envPrefix = "THRESHOLD_" +) + +// PreferredEnvName returns the Threshold (THRESHOLD_*) form of an environment +// variable name. Names that do not use the legacy BOUNDARY_ prefix are +// returned unchanged. +func PreferredEnvName(name string) string { + if strings.HasPrefix(name, legacyEnvPrefix) { + return envPrefix + strings.TrimPrefix(name, legacyEnvPrefix) + } + return name +} + +// LegacyEnvName returns the legacy (BOUNDARY_*) form of an environment +// variable name. Names that do not use the THRESHOLD_ prefix are returned +// unchanged. +func LegacyEnvName(name string) string { + if strings.HasPrefix(name, envPrefix) { + return legacyEnvPrefix + strings.TrimPrefix(name, envPrefix) + } + return name +} + +// LookupEnv looks up an environment variable, preferring the THRESHOLD_* +// name and falling back to the legacy BOUNDARY_* name. The name may be given +// with either prefix; names with neither prefix are looked up as-is. +func LookupEnv(name string) (string, bool) { + if v, ok := os.LookupEnv(PreferredEnvName(LegacyEnvName(name))); ok { + return v, true + } + return os.LookupEnv(LegacyEnvName(name)) +} + +// Getenv is like os.Getenv but follows the LookupEnv precedence. A set but +// empty THRESHOLD_* variable falls through to the legacy BOUNDARY_* variable. +func Getenv(name string) string { + if v := os.Getenv(PreferredEnvName(LegacyEnvName(name))); v != "" { + return v + } + return os.Getenv(LegacyEnvName(name)) +} diff --git a/api/env_test.go b/api/env_test.go new file mode 100644 index 000000000..c5245a5c3 --- /dev/null +++ b/api/env_test.go @@ -0,0 +1,24 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: BUSL-1.1 + +package api + +import "testing" + +func TestEnvFallback(t *testing.T) { + t.Setenv("THRESHOLD_ZZ_TEST", "") + t.Setenv("BOUNDARY_ZZ_TEST", "old") + if got := Getenv("BOUNDARY_ZZ_TEST"); got != "old" { + t.Fatalf("want old, got %q", got) + } + t.Setenv("THRESHOLD_ZZ_TEST", "new") + if got := Getenv("BOUNDARY_ZZ_TEST"); got != "new" { + t.Fatalf("want new, got %q", got) + } + if got, ok := LookupEnv("THRESHOLD_ZZ_TEST"); !ok || got != "new" { + t.Fatalf("want new, got %q %v", got, ok) + } + if PreferredEnvName("BOUNDARY_ADDR") != "THRESHOLD_ADDR" || LegacyEnvName("THRESHOLD_ADDR") != "BOUNDARY_ADDR" { + t.Fatal("name mapping") + } +} diff --git a/api/output_string.go b/api/output_string.go index 35b0ec492..508cb23f6 100644 --- a/api/output_string.go +++ b/api/output_string.go @@ -5,7 +5,6 @@ package api import ( "fmt" - "os" "strings" retryablehttp "github.com/hashicorp/go-retryablehttp" @@ -60,15 +59,15 @@ func (d *OutputStringError) parseRequest() { for k, v := range d.Request.Header { for _, h := range v { if strings.ToLower(k) == "authorization" { - tokenName := os.Getenv("BOUNDARY_TOKEN_NAME") - keyringType := os.Getenv("BOUNDARY_KEYRING_TYPE") + tokenName := Getenv("THRESHOLD_TOKEN_NAME") + keyringType := Getenv("THRESHOLD_KEYRING_TYPE") switch { case tokenName == "none" || keyringType == "none": h = `Bearer ` case tokenName == "" && keyringType == "": - h = `Bearer $(boundary config get-token)` + h = `Bearer $(threshold config get-token)` default: - h = fmt.Sprintf("Bearer $(boundary config get-token -keyring-type %s -token-name %s)", keyringType, tokenName) + h = fmt.Sprintf("Bearer $(threshold config get-token -keyring-type %s -token-name %s)", keyringType, tokenName) } } d.parsedCurlString = fmt.Sprintf("%s -H \"%s: %s\"", d.parsedCurlString, k, h) diff --git a/boundary.png b/boundary.png deleted file mode 100644 index 422535b74..000000000 Binary files a/boundary.png and /dev/null differ diff --git a/boundary_desktop_example.gif b/boundary_desktop_example.gif deleted file mode 100644 index 1dcfa986d..000000000 Binary files a/boundary_desktop_example.gif and /dev/null differ diff --git a/cmd/boundary/.gitignore b/cmd/threshold/.gitignore similarity index 100% rename from cmd/boundary/.gitignore rename to cmd/threshold/.gitignore diff --git a/cmd/boundary/main.go b/cmd/threshold/main.go similarity index 100% rename from cmd/boundary/main.go rename to cmd/threshold/main.go diff --git a/cmd/boundary/package_registry_oss.go b/cmd/threshold/package_registry_oss.go similarity index 100% rename from cmd/boundary/package_registry_oss.go rename to cmd/threshold/package_registry_oss.go diff --git a/internal/clientcache/cmd/cache/addtoken.go b/internal/clientcache/cmd/cache/addtoken.go index 661bc8921..4333e2217 100644 --- a/internal/clientcache/cmd/cache/addtoken.go +++ b/internal/clientcache/cmd/cache/addtoken.go @@ -28,16 +28,16 @@ type AddTokenCommand struct { } func (c *AddTokenCommand) Synopsis() string { - return "Add an auth token to a running boundary cache" + return "Add an auth token to a running threshold cache" } func (c *AddTokenCommand) Help() string { helpText := ` -Usage: boundary cache add-token [options] +Usage: threshold cache add-token [options] Add an auth token to the cache: - $ boundary cache add-token + $ threshold cache add-token For a full list of examples, please see the documentation. @@ -54,7 +54,7 @@ func (c *AddTokenCommand) Flags() *base.FlagSets { Target: &c.FlagAddr, EnvVar: api.EnvBoundaryAddr, Completion: complete.PredictAnything, - Usage: "Addr of the Boundary controller, as a complete URL (e.g. https://boundary.example.com:9200).", + Usage: "Addr of the Threshold controller, as a complete URL (e.g. https://threshold.example.com:9200).", }) f = set.NewFlagSet("Client Options") diff --git a/internal/clientcache/cmd/cache/cache.go b/internal/clientcache/cmd/cache/cache.go index 9fdbeb8e8..cbe23beb3 100644 --- a/internal/clientcache/cmd/cache/cache.go +++ b/internal/clientcache/cmd/cache/cache.go @@ -21,18 +21,18 @@ type CacheCommand struct { } func (c *CacheCommand) Synopsis() string { - return "Manages the client side Boundary cache" + return "Manages the client side Threshold cache" } func (c *CacheCommand) Help() string { helpText := ` -Usage: boundary cache [sub command] [options] +Usage: threshold cache [sub command] [options] - This command allows interacting with the Boundary cache. + This command allows interacting with the Threshold cache. Start a cache: - $ boundary cache start + $ threshold cache start For a full list of examples, please see the documentation. @@ -54,7 +54,7 @@ func (c *CacheCommand) AutocompleteFlags() complete.Flags { func (c *CacheCommand) Run(args []string) int { if len(args) >= 2 && args[1] == "daemon" { - c.UI.Warn("The `boundary daemon` command is deprecated, use `boundary cache` instead") + c.UI.Warn("The `threshold daemon` command is deprecated, use `threshold cache` instead") } return cli.RunResultHelp } diff --git a/internal/clientcache/cmd/cache/start.go b/internal/clientcache/cmd/cache/start.go index 53c9f5923..efb8e5133 100644 --- a/internal/clientcache/cmd/cache/start.go +++ b/internal/clientcache/cmd/cache/start.go @@ -24,7 +24,6 @@ import ( ) const ( - dotDirname = ".boundary" pidFileName = "cache.pid" logFileName = "cache.log" @@ -54,16 +53,16 @@ type StartCommand struct { } func (c *StartCommand) Synopsis() string { - return "Start a Boundary cache" + return "Start a Threshold cache" } func (c *StartCommand) Help() string { helpText := ` -Usage: boundary cache start [options] +Usage: threshold cache start [options] Start a cache: - $ boundary cache start + $ threshold cache start For a full list of examples, please see the documentation. @@ -78,7 +77,7 @@ func (c *StartCommand) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "log-level", Target: &c.flagLogLevel, - EnvVar: "BOUNDARY_LOG_LEVEL", + EnvVar: "THRESHOLD_LOG_LEVEL", Completion: complete.PredictSet("trace", "debug", "info", "warn", "err"), Usage: "Log verbosity level, mostly as a fallback for events. Supported values (in order of more detail to less) are " + "\"trace\", \"debug\", \"info\", \"warn\", and \"err\".", @@ -255,7 +254,7 @@ func DefaultDotDirectory(ctx context.Context) (string, error) { if err != nil { return "", errors.Wrap(ctx, err, op) } - return filepath.Join(homeDir, dotDirname), nil + return daemon.DotDirectory(homeDir), nil } // logFile returns a log file which is rotated after it reaches the provided diff --git a/internal/clientcache/cmd/cache/status.go b/internal/clientcache/cmd/cache/status.go index d4a5b95ac..0e0fb71b1 100644 --- a/internal/clientcache/cmd/cache/status.go +++ b/internal/clientcache/cmd/cache/status.go @@ -34,16 +34,16 @@ type StatusCommand struct { } func (c *StatusCommand) Synopsis() string { - return "Get the status information of the running boundary cache" + return "Get the status information of the running threshold cache" } func (c *StatusCommand) Help() string { helpText := ` -Usage: boundary cache status [options] +Usage: threshold cache status [options] - Get the status of the boundary cache: + Get the status of the threshold cache: - $ boundary cache status + $ threshold cache status For a full list of examples, please see the documentation. diff --git a/internal/clientcache/cmd/cache/stop.go b/internal/clientcache/cmd/cache/stop.go index 0743ebf22..0c9b757bf 100644 --- a/internal/clientcache/cmd/cache/stop.go +++ b/internal/clientcache/cmd/cache/stop.go @@ -17,16 +17,16 @@ type StopCommand struct { } func (c *StopCommand) Synopsis() string { - return "Stop the Boundary cache" + return "Stop the Threshold cache" } func (c *StopCommand) Help() string { helpText := ` -Usage: boundary cache stop +Usage: threshold cache stop Stop a cache: - $ boundary cache stop + $ threshold cache stop For a full list of examples, please see the documentation. diff --git a/internal/clientcache/cmd/cache/wrapper_register.go b/internal/clientcache/cmd/cache/wrapper_register.go index d294567cf..ffd72449a 100644 --- a/internal/clientcache/cmd/cache/wrapper_register.go +++ b/internal/clientcache/cmd/cache/wrapper_register.go @@ -76,7 +76,7 @@ func startDaemon(ctx context.Context, baseCmd *base.Command) (started bool, _ er cmdName, err := os.Executable() if err != nil { - baseCmd.UI.Error(fmt.Sprintf("unable to find boundary binary for cache startup: %s", err.Error())) + baseCmd.UI.Error(fmt.Sprintf("unable to find threshold binary for cache startup: %s", err.Error())) return false, err } @@ -113,7 +113,7 @@ func stopDaemon(ctx context.Context, baseCmd *base.Command) error { cmdName, err := os.Executable() if err != nil { - baseCmd.UI.Error(fmt.Sprintf("unable to find boundary binary for cache startup: %s", err.Error())) + baseCmd.UI.Error(fmt.Sprintf("unable to find threshold binary for cache startup: %s", err.Error())) return err } cmd := exec.Command(cmdName, "cache", "stop") diff --git a/internal/clientcache/cmd/search/search.go b/internal/clientcache/cmd/search/search.go index a64cd2e79..722c3b07d 100644 --- a/internal/clientcache/cmd/search/search.go +++ b/internal/clientcache/cmd/search/search.go @@ -54,16 +54,16 @@ type SearchCommand struct { } func (c *SearchCommand) Synopsis() string { - return "Search Boundary resources using client cache" + return "Search Threshold resources using client cache" } func (c *SearchCommand) Help() string { helpText := ` -Usage: boundary search [options] +Usage: threshold search [options] - Search a boundary resource: + Search a threshold resource: - $ boundary search -resource targets -query 'name="foo"' + $ threshold search -resource targets -query 'name="foo"' For a full list of examples, please see the documentation. diff --git a/internal/clientcache/internal/cache/refresh_test.go b/internal/clientcache/internal/cache/refresh_test.go index 2b9112d3c..bb11465ab 100644 --- a/internal/clientcache/internal/cache/refresh_test.go +++ b/internal/clientcache/internal/cache/refresh_test.go @@ -284,7 +284,7 @@ func TestCleanAndPickTokens(t *testing.T) { assert.ElementsMatch(t, maps.Values(got), []string{at1a.Token, at1b.Token}) }) - t.Run("boundary in memory auth token expires", func(t *testing.T) { + t.Run("threshold in memory auth token expires", func(t *testing.T) { require.NoError(t, r.AddRawToken(ctx, boundaryAddr, at1a.Token)) require.NoError(t, r.AddRawToken(ctx, boundaryAddr, at1b.Token)) @@ -302,7 +302,7 @@ func TestCleanAndPickTokens(t *testing.T) { assert.ElementsMatch(t, maps.Values(got), []string{at1a.Token}) }) - t.Run("boundary in memory auth token not found", func(t *testing.T) { + t.Run("threshold in memory auth token not found", func(t *testing.T) { require.NoError(t, r.AddRawToken(ctx, boundaryAddr, at1a.Token)) require.NoError(t, r.AddRawToken(ctx, boundaryAddr, at1b.Token)) @@ -320,7 +320,7 @@ func TestCleanAndPickTokens(t *testing.T) { assert.ElementsMatch(t, maps.Values(got), []string{at1a.Token}) }) - t.Run("boundary keyring auths token expires", func(t *testing.T) { + t.Run("threshold keyring auths token expires", func(t *testing.T) { key1 := ringToken{"k1", "t1"} atMap[key1] = keyringAuthToken1 require.NoError(t, r.AddKeyringToken(ctx, boundaryAddr, KeyringToken{ @@ -350,7 +350,7 @@ func TestCleanAndPickTokens(t *testing.T) { assert.ElementsMatch(t, maps.Values(got), []string{keyringAuthToken1.Token}) }) - t.Run("boundary in memory auth token check errors", func(t *testing.T) { + t.Run("threshold in memory auth token check errors", func(t *testing.T) { require.NoError(t, r.AddRawToken(ctx, boundaryAddr, at1a.Token)) require.NoError(t, r.AddRawToken(ctx, boundaryAddr, at1b.Token)) @@ -368,7 +368,7 @@ func TestCleanAndPickTokens(t *testing.T) { assert.ElementsMatch(t, maps.Values(got), []string{at1a.Token}) }) - t.Run("boundary keyring auths token check errors", func(t *testing.T) { + t.Run("threshold keyring auths token check errors", func(t *testing.T) { key1 := ringToken{"k1", "t1"} atMap[key1] = keyringAuthToken1 require.NoError(t, r.AddKeyringToken(ctx, boundaryAddr, KeyringToken{ diff --git a/internal/clientcache/internal/cache/repository_refresh_token.go b/internal/clientcache/internal/cache/repository_refresh_token.go index 8d135f800..03998994b 100644 --- a/internal/clientcache/internal/cache/repository_refresh_token.go +++ b/internal/clientcache/internal/cache/repository_refresh_token.go @@ -23,7 +23,7 @@ var ErrRefreshNotSupported = stderrors.New("refresh tokens are not supported for type RefreshTokenValue string // sentinelNoRefreshToken is the value set in the refresh token table when -// Boundary returns resources but no refresh tokens. The presence of this value +// Threshold returns resources but no refresh tokens. The presence of this value // indicates that the boundary instance queried does not support refresh tokens. const sentinelNoRefreshToken RefreshTokenValue = "__no_refresh_token_supported__" diff --git a/internal/clientcache/internal/cache/repository_token.go b/internal/clientcache/internal/cache/repository_token.go index 2b0620317..cd4e85885 100644 --- a/internal/clientcache/internal/cache/repository_token.go +++ b/internal/clientcache/internal/cache/repository_token.go @@ -37,7 +37,7 @@ func upsertUserAndAuthToken(ctx context.Context, reader db.Reader, writer db.Wri case util.IsNil(at): return errors.New(ctx, errors.InvalidParameter, op, "auth token is nil") case bAddr == "": - return errors.New(ctx, errors.InvalidParameter, op, "boundary address is empty") + return errors.New(ctx, errors.InvalidParameter, op, "threshold address is empty") case at.Id == "": return errors.New(ctx, errors.InvalidParameter, op, "auth token id is empty") case at.UserId == "": @@ -114,15 +114,15 @@ func (r *Repository) AddRawToken(ctx context.Context, bAddr string, rawToken str const op = "cache.(Repository).AddRawToken" switch { case rawToken == "": - return errors.New(ctx, errors.InvalidParameter, op, "boundary auth token is empty", errors.WithoutEvent()) + return errors.New(ctx, errors.InvalidParameter, op, "threshold auth token is empty", errors.WithoutEvent()) case bAddr == "": - return errors.New(ctx, errors.InvalidParameter, op, "boundary address is empty", errors.WithoutEvent()) + return errors.New(ctx, errors.InvalidParameter, op, "threshold address is empty", errors.WithoutEvent()) } // rawToken should look something like at_1234567890_someencryptedpayload atIdParts := strings.SplitN(rawToken, "_", 4) if len(atIdParts) != 3 { - return errors.New(ctx, errors.InvalidParameter, op, "boundary auth token is is malformed", errors.WithoutEvent()) + return errors.New(ctx, errors.InvalidParameter, op, "threshold auth token is is malformed", errors.WithoutEvent()) } atId := strings.Join(atIdParts[:AuthTokenIdSegmentCount], "_") @@ -192,9 +192,9 @@ func (r *Repository) AddKeyringToken(ctx context.Context, bAddr string, token Ke case token.KeyringType == "": return errors.New(ctx, errors.InvalidParameter, op, "keyring type is empty", errors.WithoutEvent()) case token.AuthTokenId == "": - return errors.New(ctx, errors.InvalidParameter, op, "boundary auth token id is empty", errors.WithoutEvent()) + return errors.New(ctx, errors.InvalidParameter, op, "threshold auth token id is empty", errors.WithoutEvent()) case bAddr == "": - return errors.New(ctx, errors.InvalidParameter, op, "boundary address is empty", errors.WithoutEvent()) + return errors.New(ctx, errors.InvalidParameter, op, "threshold address is empty", errors.WithoutEvent()) } kt := token.clone() keyringStoredAt, err := r.tokenKeyringFn(kt.KeyringType, kt.TokenName) diff --git a/internal/clientcache/internal/cache/repository_token_test.go b/internal/clientcache/internal/cache/repository_token_test.go index 28714e5c7..3fd1233a5 100644 --- a/internal/clientcache/internal/cache/repository_token_test.go +++ b/internal/clientcache/internal/cache/repository_token_test.go @@ -103,7 +103,7 @@ func TestRepository_AddKeyringToken(t *testing.T) { TokenName: tokenName, AuthTokenId: at.Id, }, - errorContains: "boundary address is empty", + errorContains: "threshold address is empty", }, { name: "missing token", @@ -130,7 +130,7 @@ func TestRepository_AddKeyringToken(t *testing.T) { KeyringType: keyring, TokenName: tokenName, }, - errorContains: "boundary auth token id is empty", + errorContains: "threshold auth token id is empty", }, { name: "unmatching auth token id", @@ -218,7 +218,7 @@ func TestRepository_AddRawToken(t *testing.T) { { name: "missing address", rawAt: at.Token, - errorContains: "boundary address is empty", + errorContains: "threshold address is empty", }, { name: "missing token", @@ -229,7 +229,7 @@ func TestRepository_AddRawToken(t *testing.T) { name: "malformed auth token", addr: "address", rawAt: fmt.Sprintf("%s_extraunderscore", at.Token), - errorContains: "boundary auth token is is malformed", + errorContains: "threshold auth token is is malformed", }, { name: "not found in boundary", @@ -1079,7 +1079,7 @@ func TestUpsertUserAndAuthToken(t *testing.T) { writer: txWriter, addr: "", at: defaultAt, - errorContains: "boundary address is empty", + errorContains: "threshold address is empty", }, { name: "auth token is nil", diff --git a/internal/clientcache/internal/daemon/search_handler.go b/internal/clientcache/internal/daemon/search_handler.go index dfbd14141..d422adb15 100644 --- a/internal/clientcache/internal/daemon/search_handler.go +++ b/internal/clientcache/internal/daemon/search_handler.go @@ -256,7 +256,7 @@ func toApiResult(sr *cache.SearchResult) *SearchResult { var errSearchNotSupported = &api.Error{ Kind: "Unsupported Search Request", - Message: "The request is for a Boundary instance that doesn't support search. The Boundary instance must support refresh tokens for search to be supported.", + Message: "The request is for a Threshold instance that doesn't support search. The Threshold instance must support refresh tokens for search to be supported.", } func writeUnsupportedError(w http.ResponseWriter) { diff --git a/internal/clientcache/internal/daemon/server.go b/internal/clientcache/internal/daemon/server.go index 66eda70ef..135505ff3 100644 --- a/internal/clientcache/internal/daemon/server.go +++ b/internal/clientcache/internal/daemon/server.go @@ -191,7 +191,7 @@ func defaultBoundaryTokenReader(ctx context.Context, cp ClientProvider) (cache.B at, err := atClient.Read(ctx, atId) if err != nil { if api.ErrPermissionDenied.Is(err) { - return nil, errors.Wrap(ctx, err, op, errors.WithMsg("Failed to get auth token from Boundary"), errors.WithCode(errors.Forbidden), errors.WithoutEvent()) + return nil, errors.Wrap(ctx, err, op, errors.WithMsg("Failed to get auth token from Threshold"), errors.WithCode(errors.Forbidden), errors.WithoutEvent()) } return nil, errors.Wrap(ctx, err, op, errors.WithoutEvent()) } @@ -360,7 +360,7 @@ func (s *CacheServer) printInfo(ctx context.Context) { verInfo := version.Get() if verInfo.Version != "" { s.infoKeys = append(s.infoKeys, "version") - s.info["version"] = verInfo.FullVersionNumber(false) + s.info["version"] = verInfo.DisplayVersionNumber(false) } if verInfo.Revision != "" { s.info["version sha"] = strings.Trim(verInfo.Revision, "'") @@ -506,7 +506,7 @@ func setupEventing(ctx context.Context, logger hclog.Logger, serializationLock * // openStore will open the underlying store for the db. If no options are // provided, it will default to an on disk store using the user's home dir + -// ".boundary/cache.db". If a url is provided, it will use that as the store. +// ".threshold/cache.db". If a url is provided, it will use that as the store. // Supported options: WithUrl, WithLogger, WithHomeDir func openStore(ctx context.Context, opt ...Option) (*db.DB, error) { const op = "daemon.openStore" @@ -562,7 +562,7 @@ func defaultDbUrl(ctx context.Context, opt ...Option) (string, error) { return "", errors.Wrap(ctx, err, op) } } - dotDir := filepath.Join(opts.withHomeDir, dotDirname) + dotDir := DotDirectory(opts.withHomeDir) if err := os.MkdirAll(dotDir, 0o700); err != nil { return "", errors.Wrap(ctx, err, op) } @@ -584,10 +584,27 @@ func defaultDbUrl(ctx context.Context, opt ...Option) (string, error) { return fmt.Sprintf("%s%s", fileName, fkPragma), nil } +// DotDirectory returns the path of the client cache dot directory inside the +// given home directory. The Threshold directory is preferred; if it does not +// exist but the legacy directory used by upstream HashiCorp Boundary does, the +// legacy directory is used so existing state keeps being found. +func DotDirectory(homeDir string) string { + preferred := filepath.Join(homeDir, dotDirname) + if _, err := os.Stat(preferred); err == nil { + return preferred + } + legacy := filepath.Join(homeDir, legacyDotDirname) + if fi, err := os.Stat(legacy); err == nil && fi.IsDir() { + return legacy + } + return preferred +} + const ( - dotDirname = ".boundary" - dbFileName = "cache.db" - fkPragma = "?_pragma=foreign_keys(1)" + dotDirname = ".threshold" + legacyDotDirname = ".boundary" + dbFileName = "cache.db" + fkPragma = "?_pragma=foreign_keys(1)" ) type gormDebugLogger struct { diff --git a/internal/clientcache/internal/daemon/status_handler.go b/internal/clientcache/internal/daemon/status_handler.go index 898a881bf..cf99f31dc 100644 --- a/internal/clientcache/internal/daemon/status_handler.go +++ b/internal/clientcache/internal/daemon/status_handler.go @@ -49,7 +49,7 @@ type BoundaryStatus struct { Address string `json:"address,omitempty"` // Whether the controller responses are supported by the cache CacheSupport string `json:"cache_support,omitempty"` - // How long ago the Boundary instance was checked for cache compatibility + // How long ago the Threshold instance was checked for cache compatibility LastSupportCheck time.Duration `json:"last_support_check,omitempty"` } @@ -131,7 +131,7 @@ func toApiStatus(in *cache.Status, started time.Time, socketAddr, logLocation st // sleeps. Uptime: time.Since(started.Round(0)), SocketAddress: socketAddr, - Version: version.Get().FullVersionNumber(true), + Version: version.Get().DisplayVersionNumber(true), LogLocation: logLocation, } diff --git a/internal/cmd/base/base.go b/internal/cmd/base/base.go index af0a2b330..16fc4b51b 100644 --- a/internal/cmd/base/base.go +++ b/internal/cmd/base/base.go @@ -72,16 +72,20 @@ const ( // maxLineLength is the maximum width of any line. maxLineLength int = 78 - envToken = "BOUNDARY_TOKEN" - EnvTokenName = "BOUNDARY_TOKEN_NAME" - EnvKeyringType = "BOUNDARY_KEYRING_TYPE" - envRecoveryConfig = "BOUNDARY_RECOVERY_CONFIG" - envSkipCacheDaemon = "BOUNDARY_SKIP_CACHE_DAEMON" - envSkipClientAgent = "BOUNDARY_SKIP_CLIENT_AGENT" - EnvClientAgentPort = "BOUNDARY_CLIENT_AGENT_LISTENING_PORT" - EnvBoundaryClientAgentCliErrorOutput = "BOUNDARY_CLIENT_AGENT_CLI_ERROR_OUTPUT" + envToken = "THRESHOLD_TOKEN" + EnvTokenName = "THRESHOLD_TOKEN_NAME" + EnvKeyringType = "THRESHOLD_KEYRING_TYPE" + envRecoveryConfig = "THRESHOLD_RECOVERY_CONFIG" + envSkipCacheDaemon = "THRESHOLD_SKIP_CACHE_DAEMON" + envSkipClientAgent = "THRESHOLD_SKIP_CLIENT_AGENT" + EnvClientAgentPort = "THRESHOLD_CLIENT_AGENT_LISTENING_PORT" + EnvBoundaryClientAgentCliErrorOutput = "THRESHOLD_CLIENT_AGENT_CLI_ERROR_OUTPUT" - StoredTokenName = "HashiCorp Boundary Auth Token" + // StoredTokenName is the name of the credential entry written to + // wincred/keychain keyrings. LegacyStoredTokenName is the name used by + // upstream HashiCorp Boundary; it is only read (and deleted on logout). + StoredTokenName = "Threshold Auth Token" + LegacyStoredTokenName = "HashiCorp Boundary Auth Token" ) // reRemoveWhitespace is a regular expression for stripping whitespace from @@ -339,10 +343,10 @@ func (c *Command) Client(opt ...Option) (*api.Client, error) { } c.client.SetToken(token) - case os.Getenv(envToken) != "": - // Backwards compat: allow reading from existing BOUNDARY_TOKEN env var - c.UI.Warn(`Direct usage of BOUNDARY_TOKEN env var is deprecated; please use "-token env://" format, e.g. "-token env://BOUNDARY_TOKEN" to specify an env var to use.`) - c.client.SetToken(os.Getenv(envToken)) + case api.Getenv(envToken) != "": + // Backwards compat: allow reading from existing THRESHOLD_TOKEN env var + c.UI.Warn(`Direct usage of THRESHOLD_TOKEN env var is deprecated; please use "-token env://" format, e.g. "-token env://THRESHOLD_TOKEN" to specify an env var to use.`) + c.client.SetToken(api.Getenv(envToken)) case c.client.Token() == "" && strings.ToLower(c.FlagKeyringType) != "none": keyringType, tokenName, err := c.DiscoverKeyringTokenInfo() @@ -393,7 +397,7 @@ func (c *Command) FlagSet(bit FlagSetBit) *FlagSets { Target: &c.FlagAddr, EnvVar: api.EnvBoundaryAddr, Completion: complete.PredictAnything, - Usage: "Addr of the Boundary controller, as a complete URL (e.g. https://boundary.example.com:9200).", + Usage: "Addr of the Threshold controller, as a complete URL (e.g. https://threshold.example.com:9200).", }) f.StringVar(&StringVar{ @@ -421,7 +425,7 @@ func (c *Command) FlagSet(bit FlagSetBit) *FlagSets { EnvVar: api.EnvBoundaryClientCert, Completion: complete.PredictFiles("*"), Usage: "Path on the local disk to a single PEM-encoded CA " + - "certificate to use for TLS authentication to the Boundary Controller. If " + + "certificate to use for TLS authentication to the Threshold Controller. If " + "this flag is specified, -client-key is also required.", }) @@ -439,7 +443,7 @@ func (c *Command) FlagSet(bit FlagSetBit) *FlagSets { Target: &c.flagTLSServerName, EnvVar: api.EnvBoundaryTLSServerName, Completion: complete.PredictAnything, - Usage: "Name to use as the SNI host when connecting to the Boundary " + + Usage: "Name to use as the SNI host when connecting to the Threshold " + "server via TLS.", }) @@ -449,7 +453,7 @@ func (c *Command) FlagSet(bit FlagSetBit) *FlagSets { EnvVar: api.EnvBoundaryTLSInsecure, Usage: "Disable verification of TLS certificates. Using this option " + "is highly discouraged as it decreases the security of data " + - "transmissions to and from the Boundary server.", + "transmissions to and from the Threshold server.", }) } diff --git a/internal/cmd/base/const.go b/internal/cmd/base/const.go index be34bc254..7f50071dc 100644 --- a/internal/cmd/base/const.go +++ b/internal/cmd/base/const.go @@ -5,7 +5,7 @@ package base const ( // FlagNameAddr is the flag used in the base command to read in the - // address of the Boundary server. + // address of the Threshold server. FlagNameAddr = "addr" // FlagnameCACert is the flag used in the base command to read in the CA // cert. @@ -28,6 +28,6 @@ const ( ) const ( - EnvBoundaryCLINoColor = `BOUNDARY_CLI_NO_COLOR` - EnvBoundaryCLIFormat = `BOUNDARY_CLI_FORMAT` + EnvBoundaryCLINoColor = `THRESHOLD_CLI_NO_COLOR` + EnvBoundaryCLIFormat = `THRESHOLD_CLI_FORMAT` ) diff --git a/internal/cmd/base/dev.go b/internal/cmd/base/dev.go index d14f4cdb4..908b85517 100644 --- a/internal/cmd/base/dev.go +++ b/internal/cmd/base/dev.go @@ -350,7 +350,7 @@ func (b *Server) createInitialLdapAuthMethod(ctx context.Context, host string, p scope.Global.String(), ldap.WithUrls(ctx, u), ldap.WithName(ctx, "Generated global scope initial ldap auth method"), - ldap.WithDescription(ctx, "Provides initial administrative and unprivileged authentication into Boundary"), + ldap.WithDescription(ctx, "Provides initial administrative and unprivileged authentication into Threshold"), ldap.WithDiscoverDn(ctx), ldap.WithUserDn(ctx, testdirectory.DefaultUserDN), ldap.WithGroupDn(ctx, testdirectory.DefaultGroupDN), @@ -602,7 +602,7 @@ func (b *Server) createInitialOidcAuthMethod(ctx context.Context) (*oidc.AuthMet b.DevOidcSetup.clientId, b.DevOidcSetup.clientSecret, oidc.WithName("Generated global scope initial oidc auth method"), - oidc.WithDescription("Provides initial administrative and unprivileged authentication into Boundary"), + oidc.WithDescription("Provides initial administrative and unprivileged authentication into Threshold"), oidc.WithIssuer(discoveryUrl), oidc.WithApiUrl(b.DevOidcSetup.callbackUrl), oidc.WithSigningAlgs(oidc.EdDSA), diff --git a/internal/cmd/base/flags.go b/internal/cmd/base/flags.go index 305cbfdb1..9c129c7f2 100644 --- a/internal/cmd/base/flags.go +++ b/internal/cmd/base/flags.go @@ -7,7 +7,7 @@ import ( "errors" "flag" "fmt" - "os" + "github.com/hashicorp/boundary/api" "regexp" "sort" "strconv" @@ -51,7 +51,7 @@ type BoolVar struct { func (f *FlagSet) BoolVar(i *BoolVar) { def := i.Default - if v, exist := os.LookupEnv(i.EnvVar); exist { + if v, exist := api.LookupEnv(i.EnvVar); exist { if b, err := strconv.ParseBool(v); err == nil { def = b } @@ -112,7 +112,7 @@ type Int64Var struct { func (f *FlagSet) Int64Var(i *Int64Var) { initial := i.Default - if v, exist := os.LookupEnv(i.EnvVar); exist { + if v, exist := api.LookupEnv(i.EnvVar); exist { if i, err := strconv.ParseInt(v, 0, 64); err == nil { initial = i } @@ -176,7 +176,7 @@ type Uint64Var struct { func (f *FlagSet) Uint64Var(i *Uint64Var) { initial := i.Default - if v, exist := os.LookupEnv(i.EnvVar); exist { + if v, exist := api.LookupEnv(i.EnvVar); exist { if i, err := strconv.ParseUint(v, 0, 64); err == nil { initial = i } @@ -240,7 +240,7 @@ type Uint16Var struct { func (f *FlagSet) Uint16Var(i *Uint16Var) { initial := i.Default - if v, exist := os.LookupEnv(i.EnvVar); exist { + if v, exist := api.LookupEnv(i.EnvVar); exist { if i, err := strconv.ParseUint(v, 0, 16); err == nil { initial = uint16(i) } @@ -304,7 +304,7 @@ type StringVar struct { func (f *FlagSet) StringVar(i *StringVar) { initial := i.Default - if v, exist := os.LookupEnv(i.EnvVar); exist { + if v, exist := api.LookupEnv(i.EnvVar); exist { initial = v } @@ -361,7 +361,7 @@ type Float64Var struct { func (f *FlagSet) Float64Var(i *Float64Var) { initial := i.Default - if v, exist := os.LookupEnv(i.EnvVar); exist { + if v, exist := api.LookupEnv(i.EnvVar); exist { if i, err := strconv.ParseFloat(v, 64); err == nil { initial = i } @@ -425,7 +425,7 @@ type DurationVar struct { func (f *FlagSet) DurationVar(i *DurationVar) { initial := i.Default - if v, exist := os.LookupEnv(i.EnvVar); exist { + if v, exist := api.LookupEnv(i.EnvVar); exist { if d, err := time.ParseDuration(appendDurationSuffix(v)); err == nil { initial = d } @@ -507,7 +507,7 @@ type StringSliceVar struct { func (f *FlagSet) StringSliceVar(i *StringSliceVar) { initial := i.Default - if v, exist := os.LookupEnv(i.EnvVar); exist { + if v, exist := api.LookupEnv(i.EnvVar); exist { parts := strings.Split(v, ",") for i := range parts { parts[i] = strings.TrimSpace(parts[i]) diff --git a/internal/cmd/base/format.go b/internal/cmd/base/format.go index 3392b3d38..7a35870b8 100644 --- a/internal/cmd/base/format.go +++ b/internal/cmd/base/format.go @@ -7,7 +7,6 @@ import ( "encoding/json" "errors" "fmt" - "os" "sort" "strings" "unicode" @@ -376,7 +375,7 @@ func Format(ui cli.Ui) string { return t.Format } - format := os.Getenv(EnvBoundaryCLIFormat) + format := api.Getenv(EnvBoundaryCLIFormat) if format == "" { format = "table" } diff --git a/internal/cmd/base/initial_resources.go b/internal/cmd/base/initial_resources.go index 74008a880..1073b11e5 100644 --- a/internal/cmd/base/initial_resources.go +++ b/internal/cmd/base/initial_resources.go @@ -156,7 +156,7 @@ func (b *Server) CreateInitialPasswordAuthMethod(ctx context.Context) (*password } authMethod, err := password.NewAuthMethod(ctx, scope.Global.String(), password.WithName("Generated global scope initial password auth method"), - password.WithDescription("Provides initial administrative and unprivileged authentication into Boundary"), + password.WithDescription("Provides initial administrative and unprivileged authentication into Threshold"), ) if err != nil { return nil, nil, fmt.Errorf("error creating new in memory auth method: %w", err) @@ -355,7 +355,7 @@ func (b *Server) CreateInitialScopes(ctx context.Context, opt ...Option) (*iam.S } iamOpts := []iam.Option{ iam.WithName("Generated org scope"), - iam.WithDescription("Provides an initial org scope in Boundary"), + iam.WithDescription("Provides an initial org scope in Threshold"), iam.WithRandomReader(b.SecureRandomReader), iam.WithPublicId(b.DevOrgId), } @@ -381,7 +381,7 @@ func (b *Server) CreateInitialScopes(ctx context.Context, opt ...Option) (*iam.S } iamOpts = []iam.Option{ iam.WithName("Generated project scope"), - iam.WithDescription("Provides an initial project scope in Boundary"), + iam.WithDescription("Provides an initial project scope in Threshold"), iam.WithRandomReader(b.SecureRandomReader), iam.WithPublicId(b.DevProjectId), } @@ -430,7 +430,7 @@ func (b *Server) CreateInitialHostResources(ctx context.Context) (*static.HostCa } opts := []static.Option{ static.WithName("Generated host catalog"), - static.WithDescription("Provides an initial host catalog in Boundary"), + static.WithDescription("Provides an initial host catalog in Threshold"), static.WithPublicId(b.DevHostCatalogId), } hc, err := static.NewHostCatalog(ctx, b.DevProjectId, opts...) @@ -455,7 +455,7 @@ func (b *Server) CreateInitialHostResources(ctx context.Context) (*static.HostCa } opts = []static.Option{ static.WithName("Generated host"), - static.WithDescription("Provides an initial host in Boundary"), + static.WithDescription("Provides an initial host in Threshold"), static.WithAddress(b.DevHostAddress), static.WithPublicId(b.DevHostId), } @@ -478,7 +478,7 @@ func (b *Server) CreateInitialHostResources(ctx context.Context) (*static.HostCa } opts = []static.Option{ static.WithName("Generated host set"), - static.WithDescription("Provides an initial host set in Boundary"), + static.WithDescription("Provides an initial host set in Threshold"), static.WithPublicId(b.DevHostSetId), } hs, err := static.NewHostSet(ctx, hc.PublicId, opts...) @@ -515,8 +515,8 @@ func (b *Server) CreateInitialTargetWithAddress(ctx context.Context) (target.Tar return nil, fmt.Errorf("failed to create target repository: %w", err) } - // When this function is not called as part of boundary dev (eg: as part of - // boundary database init or tests), generate random target ids. + // When this function is not called as part of threshold dev (eg: as part of + // threshold database init or tests), generate random target ids. if len(b.DevTargetId) == 0 { b.DevTargetId, err = db.NewPublicId(ctx, globals.TcpTargetPrefix) if err != nil { @@ -531,7 +531,7 @@ func (b *Server) CreateInitialTargetWithAddress(ctx context.Context) (target.Tar } opts := []target.Option{ target.WithName("Generated target with a direct address"), - target.WithDescription("Provides an initial target using an address in Boundary"), + target.WithDescription("Provides an initial target using an address in Threshold"), target.WithDefaultPort(uint32(b.DevTargetDefaultPort)), target.WithSessionMaxSeconds(uint32(b.DevTargetSessionMaxSeconds)), target.WithSessionConnectionLimit(int32(b.DevTargetSessionConnectionLimit)), @@ -580,8 +580,8 @@ func (b *Server) CreateInitialTargetWithHostSources(ctx context.Context) (target return nil, fmt.Errorf("failed to create target repository: %w", err) } - // When this function is not called as part of boundary dev (eg: as part of - // boundary database init or tests), generate random target ids. + // When this function is not called as part of threshold dev (eg: as part of + // threshold database init or tests), generate random target ids. if len(b.DevSecondaryTargetId) == 0 { b.DevSecondaryTargetId, err = db.NewPublicId(ctx, globals.TcpTargetPrefix) if err != nil { @@ -594,7 +594,7 @@ func (b *Server) CreateInitialTargetWithHostSources(ctx context.Context) (target opts := []target.Option{ target.WithName("Generated target using host sources"), - target.WithDescription("Provides a target using host sources in Boundary"), + target.WithDescription("Provides a target using host sources in Threshold"), target.WithDefaultPort(uint32(b.DevTargetDefaultPort)), target.WithSessionMaxSeconds(uint32(b.DevTargetSessionMaxSeconds)), target.WithSessionConnectionLimit(int32(b.DevTargetSessionConnectionLimit)), @@ -615,7 +615,7 @@ func (b *Server) CreateInitialTargetWithHostSources(ctx context.Context) (target } // Create targets that can be connected to using an alias. The three targets created are: -// - "postgres.boundary.dev": the Boundary dev postgres instance. Uses brokered credentials +// - "postgres.boundary.dev": the Threshold dev postgres instance. Uses brokered credentials // - "www.hashicorp.com": a web target // - "ssh.boundary.dev": A localhost ssh target func (b *Server) CreateInitialTargetsWithAlias(ctx context.Context) error { @@ -668,7 +668,7 @@ func (b *Server) CreateInitialTargetsWithAlias(ctx context.Context) error { func (b *Server) createSshAliasTarget(ctx context.Context, targetRepo *target.Repository, aliasRepo *aliastar.Repository) error { opts := []target.Option{ target.WithName("Generated localhost ssh target with an alias"), - target.WithDescription("Provides an initial localhost target to SSH to using an alias in Boundary"), + target.WithDescription("Provides an initial localhost target to SSH to using an alias in Threshold"), target.WithDefaultPort(22), target.WithSessionMaxSeconds(uint32(b.DevTargetSessionMaxSeconds)), target.WithSessionConnectionLimit(int32(b.DevTargetSessionConnectionLimit)), @@ -716,7 +716,7 @@ func (b *Server) createPostgresAliasTarget(ctx context.Context, opts := []target.Option{ target.WithName("Generated local postgres target with alias"), - target.WithDescription(fmt.Sprintf("Provides a local postgres target using aliasing in Boundary. Connect using the flag `-dbname %s`", dbname)), + target.WithDescription(fmt.Sprintf("Provides a local postgres target using aliasing in Threshold. Connect using the flag `-dbname %s`", dbname)), target.WithDefaultPort(uint32(port)), target.WithAddress(host), target.WithSessionMaxSeconds(uint32(b.DevTargetSessionMaxSeconds)), @@ -779,7 +779,7 @@ func (b *Server) createWebTarget(ctx context.Context, ) error { opts := []target.Option{ target.WithName("www.hashicorp.com"), - target.WithDescription("Provides an initial web target using an address in Boundary. Note: Only HTTPS is supported, as this target uses port 443. Alias names for web targets should match the URL for the target."), + target.WithDescription("Provides an initial web target using an address in Threshold. Note: Only HTTPS is supported, as this target uses port 443. Alias names for web targets should match the URL for the target."), target.WithDefaultPort(443), target.WithSessionMaxSeconds(5), target.WithSessionConnectionLimit(int32(b.DevTargetSessionConnectionLimit)), diff --git a/internal/cmd/base/internal/docker/supported.go b/internal/cmd/base/internal/docker/supported.go index 898b0c668..2fe6d2c7a 100644 --- a/internal/cmd/base/internal/docker/supported.go +++ b/internal/cmd/base/internal/docker/supported.go @@ -8,7 +8,7 @@ package docker import ( "fmt" - "os" + "github.com/hashicorp/boundary/api" "strings" "github.com/hashicorp/boundary/globals" @@ -54,8 +54,8 @@ func startDbInDockerSupported(dialect string, opt ...Option) (cleanup func() err switch dialect { case "postgres", "pgx": switch { - case os.Getenv("BOUNDARY_TESTING_PG_URL") != "": - url = os.Getenv("BOUNDARY_TESTING_PG_URL") + case api.Getenv("THRESHOLD_TESTING_PG_URL") != "": + url = api.Getenv("THRESHOLD_TESTING_PG_URL") return func() error { return nil }, url, "", nil case repository != "": runOpts.Repository = repository diff --git a/internal/cmd/base/internal/metric/build_info.go b/internal/cmd/base/internal/metric/build_info.go index 54ea3b2dc..bbe242ee2 100644 --- a/internal/cmd/base/internal/metric/build_info.go +++ b/internal/cmd/base/internal/metric/build_info.go @@ -20,12 +20,12 @@ const ( ) // buildInfoVec is a gauge metric whose value is always equal to 1 and whose -// labels contain the current go version, git revision, and boundary version. +// labels contain the current go version, git revision, and threshold version. var buildInfoVec = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Namespace: globals.MetricNamespace, Name: "build_info", - Help: "Gauge with labels describing go version, git revision hash, and Boundary release version.", + Help: "Gauge with labels describing go version, git revision hash, and Threshold release version.", }, []string{labelGoVersion, labelGitRevision, labelBoundaryVersion}, ) diff --git a/internal/cmd/base/keyring.go b/internal/cmd/base/keyring.go index 118d6bb95..3346eb57e 100644 --- a/internal/cmd/base/keyring.go +++ b/internal/cmd/base/keyring.go @@ -28,7 +28,11 @@ const ( DefaultTokenName = "default" LoginCollection = "login" - PassPrefix = "HashiCorp_Boundary" + // PassPrefix is the prefix used for tokens stored in "pass"-style + // keyrings. LegacyPassPrefix is the value used by upstream HashiCorp + // Boundary; it is only read as a fallback and never written. + PassPrefix = "Threshold" + LegacyPassPrefix = "HashiCorp_Boundary" ) // ErrNoToken is returned when no matching token could be found in the keyring @@ -125,11 +129,15 @@ func ReadTokenFromKeyring(ui cli.Ui, keyringType, tokenName string) (*authtokens case WincredKeyring, KeychainKeyring: token, err = zkeyring.Get(StoredTokenName, tokenName) + if err == zkeyring.ErrNotFound { + // Fall back to the entry name used by upstream HashiCorp Boundary + token, err = zkeyring.Get(LegacyStoredTokenName, tokenName) + } if err != nil { if err == zkeyring.ErrNotFound { ui.Error("No saved credential found, continuing without") } else { - ui.Warn("Token must be provided via BOUNDARY_TOKEN env var or -token flag. Reading the token can also be disabled via -keyring-type=none.") + ui.Warn("Token must be provided via THRESHOLD_TOKEN env var or -token flag. Reading the token can also be disabled via -keyring-type=none.") return nil, fmt.Errorf("%s: error reading auth token from keyring: %w", op, err) } } @@ -143,13 +151,26 @@ func ReadTokenFromKeyring(ui cli.Ui, keyringType, tokenName string) (*authtokens kr, err := nkeyring.Open(krConfig) if err != nil { - ui.Warn("Token must be provided via BOUNDARY_TOKEN env var or -token flag. Reading the token can also be disabled via -keyring-type=none.") + ui.Warn("Token must be provided via THRESHOLD_TOKEN env var or -token flag. Reading the token can also be disabled via -keyring-type=none.") return nil, fmt.Errorf("%s: failed to open keyring: %w", op, err) } item, err := kr.Get(tokenName) if err != nil { - ui.Warn("Token must be provided via BOUNDARY_TOKEN env var or -token flag. Reading the token can also be disabled via -keyring-type=none.") + // Fall back to the keyring prefix used by upstream HashiCorp Boundary + legacyKr, legacyErr := nkeyring.Open(nkeyring.Config{ + LibSecretCollectionName: LoginCollection, + PassPrefix: LegacyPassPrefix, + AllowedBackends: []nkeyring.BackendType{nkeyring.BackendType(keyringType)}, + }) + if legacyErr == nil { + if legacyItem, getErr := legacyKr.Get(tokenName); getErr == nil { + item, err = legacyItem, nil + } + } + } + if err != nil { + ui.Warn("Token must be provided via THRESHOLD_TOKEN env var or -token flag. Reading the token can also be disabled via -keyring-type=none.") return nil, fmt.Errorf("%s: failed to get token from keyring: %w", op, err) } diff --git a/internal/cmd/base/logging/logging.go b/internal/cmd/base/logging/logging.go index 65b0c1252..6ca23e7b8 100644 --- a/internal/cmd/base/logging/logging.go +++ b/internal/cmd/base/logging/logging.go @@ -5,8 +5,8 @@ package logging import ( "fmt" + "github.com/hashicorp/boundary/api" "io" - "os" "strings" log "github.com/hashicorp/go-hclog" @@ -67,7 +67,7 @@ func ParseLogFormat(format string) (LogFormat, error) { // ParseEnvLogFormat parses the log format from an environment variable. func ParseEnvLogFormat() LogFormat { - logFormat := os.Getenv("BOUNDARY_LOG_FORMAT") + logFormat := api.Getenv("THRESHOLD_LOG_FORMAT") switch strings.ToLower(logFormat) { case "json": return JSONFormat diff --git a/internal/cmd/base/option.go b/internal/cmd/base/option.go index 11bffb590..294491c64 100644 --- a/internal/cmd/base/option.go +++ b/internal/cmd/base/option.go @@ -192,7 +192,7 @@ func WithStatusCode(statusCode int) Option { } // WithDatabaseTemplate allows for using an existing database template for -// initializing the boundary database. +// initializing the threshold database. func WithDatabaseTemplate(template string) Option { return func(o *Options) { o.withDatabaseTemplate = template diff --git a/internal/cmd/base/servers.go b/internal/cmd/base/servers.go index ca2ab9789..4683faa5c 100644 --- a/internal/cmd/base/servers.go +++ b/internal/cmd/base/servers.go @@ -9,6 +9,7 @@ import ( "crypto/tls" "errors" "fmt" + "github.com/hashicorp/boundary/api" "io" "os" "os/signal" @@ -284,7 +285,7 @@ func (b *Server) SetupLogging(flagLogLevel, flagLogFormat, configLogLevel, confi // create GRPC logger namedGRPCLogFaker := b.Logger.Named("grpclogfaker") - grpcLogFaker.SetLogOnOff(os.Getenv("BOUNDARY_GRPC_LOGGING") != "") + grpcLogFaker.SetLogOnOff(api.Getenv("THRESHOLD_GRPC_LOGGING") != "") grpcLogFaker.SetLogger(namedGRPCLogFaker) b.Info["log level"] = logLevel.String() @@ -384,7 +385,7 @@ func (b *Server) PrintInfo(ui cli.Ui) { verInfo := version.Get() if verInfo.Version != "" { b.InfoKeys = append(b.InfoKeys, "version") - b.Info["version"] = verInfo.FullVersionNumber(false) + b.Info["version"] = verInfo.DisplayVersionNumber(false) } if verInfo.Revision != "" { b.Info["version sha"] = strings.Trim(verInfo.Revision, "'") @@ -405,7 +406,7 @@ func (b *Server) PrintInfo(ui cli.Ui) { } } sort.Strings(b.InfoKeys) - ui.Output("==> Boundary server configuration:\n") + ui.Output("==> Threshold server configuration:\n") for _, k := range b.InfoKeys { ui.Output(fmt.Sprintf( "%s%s: %s", @@ -417,7 +418,7 @@ func (b *Server) PrintInfo(ui cli.Ui) { // Output the header that the server has started if !b.CombineLogs { - ui.Output("==> Boundary server started! Log data will stream in below:\n") + ui.Output("==> Threshold server started! Log data will stream in below:\n") } } @@ -760,7 +761,7 @@ func (b *Server) OpenDatabase(ctx context.Context, dialect, url string) (*db.DB, db.WithMaxIdleConnections(b.DatabaseMaxIdleConnections), db.WithConnMaxIdleTimeDuration(b.DatabaseConnMaxIdleTimeDuration), } - if os.Getenv("BOUNDARY_DISABLE_GORM_FORMATTER") == "" { + if api.Getenv("THRESHOLD_DISABLE_GORM_FORMATTER") == "" { opts = append(opts, db.WithGormFormatter(b.Logger)) } diff --git a/internal/cmd/commands/accountscmd/accounts.gen.go b/internal/cmd/commands/accountscmd/accounts.gen.go index c5f9b93dd..20e995e4c 100644 --- a/internal/cmd/commands/accountscmd/accounts.gen.go +++ b/internal/cmd/commands/accountscmd/accounts.gen.go @@ -153,7 +153,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagAuthMethodId == "" { - c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or BOUNDARY_AUTH_METHOD_ID")) + c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or THRESHOLD_AUTH_METHOD_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/accountscmd/funcs.go b/internal/cmd/commands/accountscmd/funcs.go index 4bb97e813..5f8441e2e 100644 --- a/internal/cmd/commands/accountscmd/funcs.go +++ b/internal/cmd/commands/accountscmd/funcs.go @@ -57,37 +57,37 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary accounts [sub command] [options] [args]", + "Usage: threshold accounts [sub command] [options] [args]", "", - " This command allows operations on Boundary account resources. Example:", + " This command allows operations on Threshold account resources. Example:", "", " Read a account:", "", - ` $ boundary accounts read -id acctpw_1234567890`, + ` $ threshold accounts read -id acctpw_1234567890`, "", " Please see the accounts subcommand help for detailed usage information.", }) case "change-password": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary accounts change-password [options] [args]", + "Usage: threshold accounts change-password [options] [args]", "", " This command allows changing the password (with verification of the current password) on account-type resources, if the types match and the operation is allowed by the given account type. Example:", "", " Change the password on a password-type account:", "", - ` $ boundary accounts change-password -id acctpw_1234567890 -current-password -new-password `, + ` $ threshold accounts change-password -id acctpw_1234567890 -current-password -new-password `, "", "", }) case "set-password": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary accounts set-password [options] [args]", + "Usage: threshold accounts set-password [options] [args]", "", " This command allows setting the password on account-type resources, if the types match and the operation is allowed by the given account type. Example:", "", " Set the password on a password-type account:", "", - ` $ boundary accounts set-password -id acctpw_1234567890 -password `, + ` $ threshold accounts set-password -id acctpw_1234567890 -password `, "", "", }) diff --git a/internal/cmd/commands/accountscmd/ldap_accounts.gen.go b/internal/cmd/commands/accountscmd/ldap_accounts.gen.go index a693907d5..efc776ae3 100644 --- a/internal/cmd/commands/accountscmd/ldap_accounts.gen.go +++ b/internal/cmd/commands/accountscmd/ldap_accounts.gen.go @@ -137,7 +137,7 @@ func (c *LdapCommand) Run(args []string) int { case "create": if c.FlagAuthMethodId == "" { - c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or BOUNDARY_AUTH_METHOD_ID")) + c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or THRESHOLD_AUTH_METHOD_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/accountscmd/ldap_funcs.go b/internal/cmd/commands/accountscmd/ldap_funcs.go index 0788ed28a..5427f77db 100644 --- a/internal/cmd/commands/accountscmd/ldap_funcs.go +++ b/internal/cmd/commands/accountscmd/ldap_funcs.go @@ -33,22 +33,22 @@ func (c *LdapCommand) extraLdapHelpFunc(helpMap map[string]func() string) string switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary accounts create ldap [options] [args]", + "Usage: threshold accounts create ldap [options] [args]", "", " Create an ldap-type account. Example:", "", - ` $ boundary accounts create ldap -login-name prodops -description "ldap account for ProdOps"`, + ` $ threshold accounts create ldap -login-name prodops -description "ldap account for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary accounts update ldap [options] [args]", + "Usage: threshold accounts update ldap [options] [args]", "", " Update an ldap-type account given its ID. Example:", "", - ` $ boundary accounts update ldap -id acctldap_1234567890 -name "devops" -description "ldap account for DevOps"`, + ` $ threshold accounts update ldap -id acctldap_1234567890 -name "devops" -description "ldap account for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/accountscmd/oidc_accounts.gen.go b/internal/cmd/commands/accountscmd/oidc_accounts.gen.go index 7f939ce5d..b57a5bf81 100644 --- a/internal/cmd/commands/accountscmd/oidc_accounts.gen.go +++ b/internal/cmd/commands/accountscmd/oidc_accounts.gen.go @@ -137,7 +137,7 @@ func (c *OidcCommand) Run(args []string) int { case "create": if c.FlagAuthMethodId == "" { - c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or BOUNDARY_AUTH_METHOD_ID")) + c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or THRESHOLD_AUTH_METHOD_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/accountscmd/oidc_funcs.go b/internal/cmd/commands/accountscmd/oidc_funcs.go index f2826b116..a5771e959 100644 --- a/internal/cmd/commands/accountscmd/oidc_funcs.go +++ b/internal/cmd/commands/accountscmd/oidc_funcs.go @@ -35,22 +35,22 @@ func (c *OidcCommand) extraOidcHelpFunc(helpMap map[string]func() string) string switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary accounts create oidc [options] [args]", + "Usage: threshold accounts create oidc [options] [args]", "", " Create a oidc-type account. Example:", "", - ` $ boundary accounts create oidc -subject "prodops" -description "Oidc account for ProdOps"`, + ` $ threshold accounts create oidc -subject "prodops" -description "Oidc account for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary accounts update oidc [options] [args]", + "Usage: threshold accounts update oidc [options] [args]", "", " Update a oidc-type account given its ID. Example:", "", - ` $ boundary accounts update oidc -id acctoidc_1234567890 -name "devops" -description "Oidc account for DevOps"`, + ` $ threshold accounts update oidc -id acctoidc_1234567890 -name "devops" -description "Oidc account for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/accountscmd/password_accounts.gen.go b/internal/cmd/commands/accountscmd/password_accounts.gen.go index 4b30257e2..82700b0e4 100644 --- a/internal/cmd/commands/accountscmd/password_accounts.gen.go +++ b/internal/cmd/commands/accountscmd/password_accounts.gen.go @@ -137,7 +137,7 @@ func (c *PasswordCommand) Run(args []string) int { case "create": if c.FlagAuthMethodId == "" { - c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or BOUNDARY_AUTH_METHOD_ID")) + c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or THRESHOLD_AUTH_METHOD_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/accountscmd/password_funcs.go b/internal/cmd/commands/accountscmd/password_funcs.go index 6841e76f6..10701f687 100644 --- a/internal/cmd/commands/accountscmd/password_funcs.go +++ b/internal/cmd/commands/accountscmd/password_funcs.go @@ -39,22 +39,22 @@ func (c *PasswordCommand) extraPasswordHelpFunc(helpMap map[string]func() string switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary accounts create password [options] [args]", + "Usage: threshold accounts create password [options] [args]", "", " Create a password-type account. Example:", "", - ` $ boundary accounts create password -login-name prodops -description "Password account for ProdOps"`, + ` $ threshold accounts create password -login-name prodops -description "Password account for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary accounts update password [options] [args]", + "Usage: threshold accounts update password [options] [args]", "", " Update a password-type account given its ID. Example:", "", - ` $ boundary accounts update password -id acctpw_1234567890 -name "devops" -description "Password account for DevOps"`, + ` $ threshold accounts update password -id acctpw_1234567890 -name "devops" -description "Password account for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/aliasescmd/aliases.gen.go b/internal/cmd/commands/aliasescmd/aliases.gen.go index 2f2d9cd09..1e60802cd 100644 --- a/internal/cmd/commands/aliasescmd/aliases.gen.go +++ b/internal/cmd/commands/aliasescmd/aliases.gen.go @@ -151,7 +151,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/aliasescmd/funcs.go b/internal/cmd/commands/aliasescmd/funcs.go index ade64817c..911801acb 100644 --- a/internal/cmd/commands/aliasescmd/funcs.go +++ b/internal/cmd/commands/aliasescmd/funcs.go @@ -17,33 +17,33 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary aliases [sub command] [options] [args]", + "Usage: threshold aliases [sub command] [options] [args]", "", - " This command allows operations on Boundary alias resources. Example:", + " This command allows operations on Threshold alias resources. Example:", "", " Read an alias:", "", - ` $ boundary aliases read -id alt_1234567890`, + ` $ threshold aliases read -id alt_1234567890`, "", " Please see the aliases subcommand help for detailed usage information.", }) case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary aliases create target [options] [args]", + "Usage: threshold aliases create target [options] [args]", "", " Create an alias. Example:", "", - ` $ boundary aliases create target -value prod-ops.example -name prodops -description "Target alias for ProdOps"`, + ` $ threshold aliases create target -value prod-ops.example -name prodops -description "Target alias for ProdOps"`, "", " Please see the typed subcommand help for detailed usage information.", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary aliases update target [options] [args]", + "Usage: threshold aliases update target [options] [args]", "", " Update an alias. Example:", "", - ` $ boundary aliases update target -id alt_1234567890 -name devops`, + ` $ threshold aliases update target -id alt_1234567890 -name devops`, "", " Please see the typed subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/aliasescmd/target_aliases.gen.go b/internal/cmd/commands/aliasescmd/target_aliases.gen.go index 35e834eb9..a0d020473 100644 --- a/internal/cmd/commands/aliasescmd/target_aliases.gen.go +++ b/internal/cmd/commands/aliasescmd/target_aliases.gen.go @@ -137,7 +137,7 @@ func (c *TargetCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/aliasescmd/target_funcs.go b/internal/cmd/commands/aliasescmd/target_funcs.go index 45f7b2b09..280049b1b 100644 --- a/internal/cmd/commands/aliasescmd/target_funcs.go +++ b/internal/cmd/commands/aliasescmd/target_funcs.go @@ -32,33 +32,33 @@ func (c *TargetCommand) extraTargetHelpFunc(helpMap map[string]func() string) st switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary aliases [sub command] [options] [args]", + "Usage: threshold aliases [sub command] [options] [args]", "", - " This command allows operations on Boundary alias resources. Example:", + " This command allows operations on Threshold alias resources. Example:", "", " Read an alias:", "", - ` $ boundary aliases read -id alt_1234567890`, + ` $ threshold aliases read -id alt_1234567890`, "", " Please see the aliases subcommand help for detailed usage information.", }) case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary aliases create target [options] [args]", + "Usage: threshold aliases create target [options] [args]", "", " Create a target-type alias. Example:", "", - ` $ boundary aliases create target -value prod-ops.example -name prodops -description "Target alias for ProdOps"`, + ` $ threshold aliases create target -value prod-ops.example -name prodops -description "Target alias for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary aliases update target [options] [args]", + "Usage: threshold aliases update target [options] [args]", "", " Update an alias. Example:", "", - ` $ boundary aliases update target -id alt_1234567890 -name devops`, + ` $ threshold aliases update target -id alt_1234567890 -name devops`, "", "", }) diff --git a/internal/cmd/commands/authenticate/authenticate.go b/internal/cmd/commands/authenticate/authenticate.go index 69687324e..b928215d5 100644 --- a/internal/cmd/commands/authenticate/authenticate.go +++ b/internal/cmd/commands/authenticate/authenticate.go @@ -28,29 +28,29 @@ func (c *Command) Synopsis() string { func (c *Command) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary authenticate [sub command] [options] [args]", + "Usage: threshold authenticate [sub command] [options] [args]", "", - " This command authenticates the Boundary commandline client using a specified auth method. Examples:", + " This command authenticates the Threshold commandline client using a specified auth method. Examples:", "", " Authenticate with the primary auth method in the global scope:", "", - " $ boundary authenticate", + " $ threshold authenticate", "", " Authenticate using the primary auth method in a specific scope", "", - " $ boundary authenticate password -scope-id o_1234567890", + " $ threshold authenticate password -scope-id o_1234567890", "", " Authenticate with a password auth method using a specific auth method ID:", "", - " $ boundary authenticate password -auth-method-id ampw_1234567890", + " $ threshold authenticate password -auth-method-id ampw_1234567890", "", " Authenticate with an OIDC auth method using a specific auth method ID:", "", - " $ boundary authenticate oidc -auth-method-id amoidc_1234567890", + " $ threshold authenticate oidc -auth-method-id amoidc_1234567890", "", " Authenticate with an LDAP auth method:", "", - " $ boundary authenticate ldap -auth-method-id amldap_1234567890", + " $ threshold authenticate ldap -auth-method-id amldap_1234567890", "", " Please see the auth method subcommand help for detailed usage information.", }) + c.Flags().Help() @@ -62,7 +62,7 @@ func (c *Command) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "scope-id", - EnvVar: "BOUNDARY_SCOPE_ID", + EnvVar: "THRESHOLD_SCOPE_ID", Target: &c.FlagScopeId, Usage: "The scope to use for the operation", }) @@ -95,7 +95,7 @@ func (c *Command) Run(args []string) int { aClient := authmethods.NewClient(client) pri, err := getPrimaryAuthMethodId(c.Context, aClient, scope.Global.String(), "") if err != nil { - c.PrintCliError(errors.New("Error looking up primary auth method ID for the global scope. Try setting a primary auth method for the global scope, or use an auth method subcommand (see 'boundary authenticate -h' for available sub command usage).")) + c.PrintCliError(errors.New("Error looking up primary auth method ID for the global scope. Try setting a primary auth method for the global scope, or use an auth method subcommand (see 'threshold authenticate -h' for available sub command usage).")) return base.CommandUserError } diff --git a/internal/cmd/commands/authenticate/funcs.go b/internal/cmd/commands/authenticate/funcs.go index 170bdf99b..77f346385 100644 --- a/internal/cmd/commands/authenticate/funcs.go +++ b/internal/cmd/commands/authenticate/funcs.go @@ -71,7 +71,7 @@ func saveAndOrPrintToken(c *base.Command, result *authmethods.AuthenticateResult default: krConfig := nkeyring.Config{ LibSecretCollectionName: "login", - PassPrefix: "HashiCorp_Boundary", + PassPrefix: base.PassPrefix, AllowedBackends: []nkeyring.BackendType{nkeyring.BackendType(keyringType)}, } @@ -100,7 +100,7 @@ func saveAndOrPrintToken(c *base.Command, result *authmethods.AuthenticateResult switch { case gotErr: - c.UI.Warn(fmt.Sprintf("The token was not successfully saved to a system keyring. The token is:\n\n%s\n\nIt must be manually passed in via the BOUNDARY_TOKEN env var or -token flag. Storing the token can also be disabled via -keyring-type=none.", token.Token)) + c.UI.Warn(fmt.Sprintf("The token was not successfully saved to a system keyring. The token is:\n\n%s\n\nIt must be manually passed in via the THRESHOLD_TOKEN env var or -token flag. Storing the token can also be disabled via -keyring-type=none.", token.Token)) case c.FlagKeyringType == "none": c.UI.Warn("\nStoring the token in a keyring was disabled. The token is:") c.UI.Output(token.Token) @@ -124,11 +124,11 @@ func getPrimaryAuthMethodId(ctx context.Context, client *authmethods.Client, sco for _, m := range authMethodListResult.GetItems() { if m.IsPrimary { if !strings.HasPrefix(m.Id, amType) { - return "", fmt.Errorf("Error looking up primary auth method in scope '%s': got '%s' but the command requires an auth method prefix of '%s'. Make sure the sub command you're using matches the primary auth method type in the scope being used. For example, if using the password sub command the primary auth method must have a prefix of 'ampw'.\n\nSee 'boundary authenticate -h' for available sub command usage.", scopeId, m.Id, amType) + return "", fmt.Errorf("Error looking up primary auth method in scope '%s': got '%s' but the command requires an auth method prefix of '%s'. Make sure the sub command you're using matches the primary auth method type in the scope being used. For example, if using the password sub command the primary auth method must have a prefix of 'ampw'.\n\nSee 'threshold authenticate -h' for available sub command usage.", scopeId, m.Id, amType) } return m.Id, nil } } - return "", fmt.Errorf("Primary auth method not found for scope ID: '%s'. Please set a primary auth method on this scope or pass one explicitly using an authenticate sub command (see 'boundary authenticate -h') along with the -auth-method-id flag.", scopeId) + return "", fmt.Errorf("Primary auth method not found for scope ID: '%s'. Please set a primary auth method on this scope or pass one explicitly using an authenticate sub command (see 'threshold authenticate -h') along with the -auth-method-id flag.", scopeId) } diff --git a/internal/cmd/commands/authenticate/ldap.go b/internal/cmd/commands/authenticate/ldap.go index 9d8ff0a7c..a7c9a163a 100644 --- a/internal/cmd/commands/authenticate/ldap.go +++ b/internal/cmd/commands/authenticate/ldap.go @@ -35,16 +35,16 @@ type LdapCommand struct { } func (c *LdapCommand) Synopsis() string { - return wordwrap.WrapString("Invoke the ldap auth method to authenticate with Boundary", base.TermWidth) + return wordwrap.WrapString("Invoke the ldap auth method to authenticate with Threshold", base.TermWidth) } func (c *LdapCommand) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary authenticate ldap [options] [args]", + "Usage: threshold authenticate ldap [options] [args]", "", - " Invoke the ldap auth method to authenticate the Boundary CLI. Example:", + " Invoke the ldap auth method to authenticate the Threshold CLI. Example:", "", - ` $ boundary authenticate ldap -auth-method-id amldap_1234567890 -login-name foo`, + ` $ threshold authenticate ldap -auth-method-id amldap_1234567890 -login-name foo`, "", "", }) + c.Flags().Help() @@ -70,7 +70,7 @@ func (c *LdapCommand) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "auth-method-id", - EnvVar: "BOUNDARY_AUTH_METHOD_ID", + EnvVar: "THRESHOLD_AUTH_METHOD_ID", Target: &c.FlagAuthMethodId, Usage: "The auth-method resource to use for the operation.", }) @@ -78,7 +78,7 @@ func (c *LdapCommand) Flags() *base.FlagSets { if !c.parsedOpts.WithSkipScopeIdFlag { f.StringVar(&base.StringVar{ Name: "scope-id", - EnvVar: "BOUNDARY_SCOPE_ID", + EnvVar: "THRESHOLD_SCOPE_ID", Target: &c.FlagScopeId, Usage: "The scope ID to use for the operation.", }) diff --git a/internal/cmd/commands/authenticate/oidc.go b/internal/cmd/commands/authenticate/oidc.go index 91518131c..96a21b280 100644 --- a/internal/cmd/commands/authenticate/oidc.go +++ b/internal/cmd/commands/authenticate/oidc.go @@ -33,16 +33,16 @@ type OidcCommand struct { } func (c *OidcCommand) Synopsis() string { - return wordwrap.WrapString("Invoke the OIDC auth method to authenticate with Boundary", base.TermWidth) + return wordwrap.WrapString("Invoke the OIDC auth method to authenticate with Threshold", base.TermWidth) } func (c *OidcCommand) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary authenticate oidc [options] [args]", + "Usage: threshold authenticate oidc [options] [args]", "", - " Invoke the OIDC auth method to authenticate the Boundary CLI. Example:", + " Invoke the OIDC auth method to authenticate the Threshold CLI. Example:", "", - ` $ boundary authenticate oidc -auth-method-id amoidc_1234567890`, + ` $ threshold authenticate oidc -auth-method-id amoidc_1234567890`, "", "", }) + c.Flags().Help() @@ -54,7 +54,7 @@ func (c *OidcCommand) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "auth-method-id", - EnvVar: "BOUNDARY_AUTH_METHOD_ID", + EnvVar: "THRESHOLD_AUTH_METHOD_ID", Target: &c.FlagAuthMethodId, Usage: "The auth-method resource to use for the operation", }) @@ -62,7 +62,7 @@ func (c *OidcCommand) Flags() *base.FlagSets { if !c.parsedOpts.WithSkipScopeIdFlag { f.StringVar(&base.StringVar{ Name: "scope-id", - EnvVar: "BOUNDARY_SCOPE_ID", + EnvVar: "THRESHOLD_SCOPE_ID", Target: &c.FlagScopeId, Usage: "The scope ID to use for the operation.", }) diff --git a/internal/cmd/commands/authenticate/password.go b/internal/cmd/commands/authenticate/password.go index 99c2e9ea4..cc64fd837 100644 --- a/internal/cmd/commands/authenticate/password.go +++ b/internal/cmd/commands/authenticate/password.go @@ -26,8 +26,8 @@ var ( ) var ( - envPassword = "BOUNDARY_AUTHENTICATE_PASSWORD_PASSWORD" - envLoginName = "BOUNDARY_AUTHENTICATE_PASSWORD_LOGIN_NAME" + envPassword = "THRESHOLD_AUTHENTICATE_PASSWORD_PASSWORD" + envLoginName = "THRESHOLD_AUTHENTICATE_PASSWORD_LOGIN_NAME" ) type PasswordCommand struct { @@ -40,16 +40,16 @@ type PasswordCommand struct { } func (c *PasswordCommand) Synopsis() string { - return wordwrap.WrapString("Invoke the password auth method to authenticate with Boundary", base.TermWidth) + return wordwrap.WrapString("Invoke the password auth method to authenticate with Threshold", base.TermWidth) } func (c *PasswordCommand) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary authenticate password [options] [args]", + "Usage: threshold authenticate password [options] [args]", "", - " Invoke the password auth method to authenticate the Boundary CLI. Example:", + " Invoke the password auth method to authenticate the Threshold CLI. Example:", "", - ` $ boundary authenticate password -auth-method-id ampw_1234567890 -login-name foo`, + ` $ threshold authenticate password -auth-method-id ampw_1234567890 -login-name foo`, "", "", }) + c.Flags().Help() @@ -75,7 +75,7 @@ func (c *PasswordCommand) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "auth-method-id", - EnvVar: "BOUNDARY_AUTH_METHOD_ID", + EnvVar: "THRESHOLD_AUTH_METHOD_ID", Target: &c.FlagAuthMethodId, Usage: "The auth-method resource to use for the operation.", }) @@ -83,7 +83,7 @@ func (c *PasswordCommand) Flags() *base.FlagSets { if !c.parsedOpts.WithSkipScopeIdFlag { f.StringVar(&base.StringVar{ Name: "scope-id", - EnvVar: "BOUNDARY_SCOPE_ID", + EnvVar: "THRESHOLD_SCOPE_ID", Target: &c.FlagScopeId, Usage: "The scope ID to use for the operation.", }) diff --git a/internal/cmd/commands/authmethodscmd/authmethods.gen.go b/internal/cmd/commands/authmethodscmd/authmethods.gen.go index 2fcc3e7ed..dbb8e923a 100644 --- a/internal/cmd/commands/authmethodscmd/authmethods.gen.go +++ b/internal/cmd/commands/authmethodscmd/authmethods.gen.go @@ -151,7 +151,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/authmethodscmd/funcs.go b/internal/cmd/commands/authmethodscmd/funcs.go index d0aab1960..c0b7f8838 100644 --- a/internal/cmd/commands/authmethodscmd/funcs.go +++ b/internal/cmd/commands/authmethodscmd/funcs.go @@ -23,37 +23,37 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary auth-methods [sub command] [options] [args]", + "Usage: threshold auth-methods [sub command] [options] [args]", "", - " This command allows operations on Boundary auth method resources. Example:", + " This command allows operations on Threshold auth method resources. Example:", "", " Read an auth method:", "", - ` $ boundary auth-methods read -id ampw_1234567890`, + ` $ threshold auth-methods read -id ampw_1234567890`, "", " Please see the auth-methods subcommand help for detailed usage information.", }) case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary auth-methods create [type] [sub command] [options] [args]", + "Usage: threshold auth-methods create [type] [sub command] [options] [args]", "", - " This command allows create operations on Boundary auth method resources. Example:", + " This command allows create operations on Threshold auth method resources. Example:", "", " Create a password-type auth method:", "", - ` $ boundary auth-methods create password -name prodops -description "For ProdOps usage"`, + ` $ threshold auth-methods create password -name prodops -description "For ProdOps usage"`, "", " Please see the typed subcommand help for detailed usage information.", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary auth-methods update [type] [sub command] [options] [args]", + "Usage: threshold auth-methods update [type] [sub command] [options] [args]", "", - " This command allows update operations on Boundary auth method resources. Example:", + " This command allows update operations on Threshold auth method resources. Example:", "", " Update a password-type auth method:", "", - ` $ boundary auth-methods update password -id ampw_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold auth-methods update password -id ampw_1234567890 -name devops -description "For DevOps usage"`, "", " Please see the typed subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/authmethodscmd/ldap_authmethods.gen.go b/internal/cmd/commands/authmethodscmd/ldap_authmethods.gen.go index 68eb1590b..0503b807d 100644 --- a/internal/cmd/commands/authmethodscmd/ldap_authmethods.gen.go +++ b/internal/cmd/commands/authmethodscmd/ldap_authmethods.gen.go @@ -137,7 +137,7 @@ func (c *LdapCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/authmethodscmd/ldap_funcs.go b/internal/cmd/commands/authmethodscmd/ldap_funcs.go index 14a77adac..27b7a79b9 100644 --- a/internal/cmd/commands/authmethodscmd/ldap_funcs.go +++ b/internal/cmd/commands/authmethodscmd/ldap_funcs.go @@ -258,22 +258,22 @@ func (c *LdapCommand) extraLdapHelpFunc(helpMap map[string]func() string) string switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary auth-methods create ldap [options] [args]", + "Usage: threshold auth-methods create ldap [options] [args]", "", " Create an ldap-type auth method. Example:", "", - ` $ boundary auth-methods create ldap -name prodops -description "LDAP auth-method for ProdOps"`, + ` $ threshold auth-methods create ldap -name prodops -description "LDAP auth-method for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary auth-methods update ldap [options] [args]", + "Usage: threshold auth-methods update ldap [options] [args]", "", " Update an ldap-type auth method given its ID. Example:", "", - ` $ boundary auth-methods update ldap -id amldap_1234567890 -name "devops" -description "LDAP auth-method for DevOps"`, + ` $ threshold auth-methods update ldap -id amldap_1234567890 -name "devops" -description "LDAP auth-method for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/authmethodscmd/oidc_authmethods.gen.go b/internal/cmd/commands/authmethodscmd/oidc_authmethods.gen.go index bcfe499b4..dce01b960 100644 --- a/internal/cmd/commands/authmethodscmd/oidc_authmethods.gen.go +++ b/internal/cmd/commands/authmethodscmd/oidc_authmethods.gen.go @@ -137,7 +137,7 @@ func (c *OidcCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/authmethodscmd/oidc_funcs.go b/internal/cmd/commands/authmethodscmd/oidc_funcs.go index ae9845fb8..78c5ef0cd 100644 --- a/internal/cmd/commands/authmethodscmd/oidc_funcs.go +++ b/internal/cmd/commands/authmethodscmd/oidc_funcs.go @@ -142,7 +142,7 @@ func extraOidcFlagsFuncImpl(c *OidcCommand, set *base.FlagSets, _ *base.FlagSet) f.StringSliceVar(&base.StringSliceVar{ Name: accountClaimMaps, Target: &c.flagAccountClaimMaps, - Usage: `The optional account claim maps from custom claims to the standard claims of sub, name and email. These maps are represented as key=value where the key equals the Provider from-claim and the value equals the Boundary to-claim. For example "oid=sub". May be specified multiple times for different to-claims.`, + Usage: `The optional account claim maps from custom claims to the standard claims of sub, name and email. These maps are represented as key=value where the key equals the Provider from-claim and the value equals the Threshold to-claim. For example "oid=sub". May be specified multiple times for different to-claims.`, }) case stateFlagName: f.StringVar(&base.StringVar{ @@ -177,32 +177,32 @@ func (c *OidcCommand) extraOidcHelpFunc(helpMap map[string]func() string) string switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary auth-methods create oidc [options] [args]", + "Usage: threshold auth-methods create oidc [options] [args]", "", " Create an oidc-type auth method. Example:", "", - ` $ boundary auth-methods create oidc -name prodops -description "Oidc auth-method for ProdOps"`, + ` $ threshold auth-methods create oidc -name prodops -description "Oidc auth-method for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary auth-methods update oidc [options] [args]", + "Usage: threshold auth-methods update oidc [options] [args]", "", " Update an oidc-type auth method given its ID. Example:", "", - ` $ boundary auth-methods update oidc -id amoidc_1234567890 -name "devops" -description "Oidc auth-method for DevOps"`, + ` $ threshold auth-methods update oidc -id amoidc_1234567890 -name "devops" -description "Oidc auth-method for DevOps"`, "", "", }) case "change-state": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary auth-methods change-state oidc [options] [args]", + "Usage: threshold auth-methods change-state oidc [options] [args]", "", " Change the active and visibility state of an oidc-type auth method given its ID. Example:", "", - ` $ boundary auth-methods change-state oidc -id amoidc_1234567890 -state "public-active"`, + ` $ threshold auth-methods change-state oidc -id amoidc_1234567890 -state "public-active"`, "", "", }) diff --git a/internal/cmd/commands/authmethodscmd/password_authmethods.gen.go b/internal/cmd/commands/authmethodscmd/password_authmethods.gen.go index 28b5d5363..b4bd55f59 100644 --- a/internal/cmd/commands/authmethodscmd/password_authmethods.gen.go +++ b/internal/cmd/commands/authmethodscmd/password_authmethods.gen.go @@ -137,7 +137,7 @@ func (c *PasswordCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/authmethodscmd/password_funcs.go b/internal/cmd/commands/authmethodscmd/password_funcs.go index 5a51202f7..5b8b7b08c 100644 --- a/internal/cmd/commands/authmethodscmd/password_funcs.go +++ b/internal/cmd/commands/authmethodscmd/password_funcs.go @@ -34,22 +34,22 @@ func (c *PasswordCommand) extraPasswordHelpFunc(helpMap map[string]func() string switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary auth-methods create password [options] [args]", + "Usage: threshold auth-methods create password [options] [args]", "", " Create a password-type auth method. Example:", "", - ` $ boundary auth-methods create password -name prodops -description "Password auth-method for ProdOps"`, + ` $ threshold auth-methods create password -name prodops -description "Password auth-method for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary auth-methods update password [options] [args]", + "Usage: threshold auth-methods update password [options] [args]", "", " Update a password-type auth method given its ID. Example:", "", - ` $ boundary auth-methods update password -id ampw_1234567890 -name "devops" -description "Password auth-method for DevOps"`, + ` $ threshold auth-methods update password -id ampw_1234567890 -name "devops" -description "Password auth-method for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/authtokenscmd/authtokens.gen.go b/internal/cmd/commands/authtokenscmd/authtokens.gen.go index 12e2c0b89..49cfb9999 100644 --- a/internal/cmd/commands/authtokenscmd/authtokens.gen.go +++ b/internal/cmd/commands/authtokenscmd/authtokens.gen.go @@ -146,7 +146,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/authtokenscmd/authtokens.go b/internal/cmd/commands/authtokenscmd/authtokens.go index b11754c4d..a9c8c392c 100644 --- a/internal/cmd/commands/authtokenscmd/authtokens.go +++ b/internal/cmd/commands/authtokenscmd/authtokens.go @@ -10,13 +10,13 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary auth-tokens [sub command] [options] [args]", + "Usage: threshold auth-tokens [sub command] [options] [args]", "", - " This command allows operations on Boundary auth token resources. Example:", + " This command allows operations on Threshold auth token resources. Example:", "", " List all auth tokens:", "", - ` $ boundary auth-tokens list -recursive `, + ` $ threshold auth-tokens list -recursive `, "", " Please see the auth-tokens subcommand help for detailed usage information.", " Note: To create an auth token, see the authenticate subcommand.", diff --git a/internal/cmd/commands/billingcmd/funcs.go b/internal/cmd/commands/billingcmd/funcs.go index 30d943ace..47a536f0c 100644 --- a/internal/cmd/commands/billingcmd/funcs.go +++ b/internal/cmd/commands/billingcmd/funcs.go @@ -129,25 +129,25 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary billing [sub command] [options] [args]", + "Usage: threshold billing [sub command] [options] [args]", "", - " This command allows for collecting Boundary billing reports. Example:", + " This command allows for collecting Threshold billing reports. Example:", "", " Monthly active users:", "", - ` $ boundary billing monthly-active-users`, + ` $ threshold billing monthly-active-users`, "", " Please see the billing subcommand help for detailed usage information.", }) case "monthly-active-users": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary billing monthly-active-users [options]", + "Usage: threshold billing monthly-active-users [options]", "", - " This command allows for collecting active Boundary user reports, by month. Example:", + " This command allows for collecting active Threshold user reports, by month. Example:", "", " Monthly active users between September 2023 and February 2024:", "", - ` $ boundary billing monthly-active-users -start-time="2023-09" -end-time="2024-02"`, + ` $ threshold billing monthly-active-users -start-time="2023-09" -end-time="2024-02"`, "", " Please see the billing subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/clientagentcmd/clientagentcmd.go b/internal/cmd/commands/clientagentcmd/clientagentcmd.go index ffe8b2938..212c09c32 100644 --- a/internal/cmd/commands/clientagentcmd/clientagentcmd.go +++ b/internal/cmd/commands/clientagentcmd/clientagentcmd.go @@ -22,27 +22,27 @@ type ClientAgentCommand struct { } func (c *ClientAgentCommand) Synopsis() string { - return "Manages the Boundary client agent" + return "Manages the Threshold client agent" } func (c *ClientAgentCommand) Help() string { helpText := ` -Usage: boundary client-agent [sub command] [options] +Usage: threshold client-agent [sub command] [options] - This command allows interacting with the Boundary client agent. + This command allows interacting with the Threshold client agent. Get the status of the agent: - $ boundary client-agent status + $ threshold client-agent status Pause and resume the agent: - $ boundary client-agent pause - $ boundary client-agent resume + $ threshold client-agent pause + $ threshold client-agent resume List active transparent sessions: - $ boundary client-agent sessions + $ threshold client-agent sessions For a full list of examples, please see the documentation. diff --git a/internal/cmd/commands/clientagentcmd/pause.go b/internal/cmd/commands/clientagentcmd/pause.go index 73f2da44f..f3e1410d3 100644 --- a/internal/cmd/commands/clientagentcmd/pause.go +++ b/internal/cmd/commands/clientagentcmd/pause.go @@ -26,16 +26,16 @@ type PauseCommand struct { } func (c *PauseCommand) Synopsis() string { - return "Pauses the running boundary client agent" + return "Pauses the running threshold client agent" } func (c *PauseCommand) Help() string { helpText := ` -Usage: boundary client-agent pause +Usage: threshold client-agent pause - Pause the boundary client agent: + Pause the threshold client agent: - $ boundary client-agent pause + $ threshold client-agent pause For a full list of examples, please see the documentation. diff --git a/internal/cmd/commands/clientagentcmd/resume.go b/internal/cmd/commands/clientagentcmd/resume.go index 8d72bc267..d9457e350 100644 --- a/internal/cmd/commands/clientagentcmd/resume.go +++ b/internal/cmd/commands/clientagentcmd/resume.go @@ -26,16 +26,16 @@ type ResumeCommand struct { } func (c *ResumeCommand) Synopsis() string { - return "Resumes the paused boundary client agent" + return "Resumes the paused threshold client agent" } func (c *ResumeCommand) Help() string { helpText := ` -Usage: boundary client-agent resume +Usage: threshold client-agent resume - Resume the boundary client agent: + Resume the threshold client agent: - $ boundary client-agent resume + $ threshold client-agent resume For a full list of examples, please see the documentation. diff --git a/internal/cmd/commands/clientagentcmd/sessions.go b/internal/cmd/commands/clientagentcmd/sessions.go index f1482157b..19ac2fe89 100644 --- a/internal/cmd/commands/clientagentcmd/sessions.go +++ b/internal/cmd/commands/clientagentcmd/sessions.go @@ -36,11 +36,11 @@ func (c *SessionsCommand) Synopsis() string { func (c *SessionsCommand) Help() string { helpText := ` -Usage: boundary client-agent sessions [options] +Usage: threshold client-agent sessions [options] List the active transparent sessions: - $ boundary client-agent sessions + $ threshold client-agent sessions For a full list of examples, please see the documentation. diff --git a/internal/cmd/commands/clientagentcmd/status.go b/internal/cmd/commands/clientagentcmd/status.go index 95ec62f88..431fedbed 100644 --- a/internal/cmd/commands/clientagentcmd/status.go +++ b/internal/cmd/commands/clientagentcmd/status.go @@ -27,16 +27,16 @@ type StatusCommand struct { } func (c *StatusCommand) Synopsis() string { - return "Get the status information of the running boundary client agent" + return "Get the status information of the running threshold client agent" } func (c *StatusCommand) Help() string { helpText := ` -Usage: boundary client-agent status [options] +Usage: threshold client-agent status [options] - Get the status of the boundary client agent: + Get the status of the threshold client agent: - $ boundary client-agent status + $ threshold client-agent status For a full list of examples, please see the documentation. diff --git a/internal/cmd/commands/config/autocomplete.go b/internal/cmd/commands/config/autocomplete.go index 09feecd2b..006b5891d 100644 --- a/internal/cmd/commands/config/autocomplete.go +++ b/internal/cmd/commands/config/autocomplete.go @@ -27,7 +27,7 @@ func (c *AutocompleteCommand) Synopsis() string { verb = "Install or uninstall" } - return fmt.Sprintf("%s autocompletion for Boundary's CLI", verb) + return fmt.Sprintf("%s autocompletion for Threshold's CLI", verb) } func (c *AutocompleteCommand) Help() string { @@ -47,9 +47,9 @@ func (c *AutocompleteCommand) Help() string { subcmd = " install" } return base.WrapForHelpText([]string{ - fmt.Sprintf("Usage: boundary config autocomplete%s [options] [args]", subcmd), + fmt.Sprintf("Usage: threshold config autocomplete%s [options] [args]", subcmd), "", - fmt.Sprintf(" This command %s autocompletion support for Boundary's CLI", verb), + fmt.Sprintf(" This command %s autocompletion support for Threshold's CLI", verb), }) } diff --git a/internal/cmd/commands/config/config.go b/internal/cmd/commands/config/config.go index 9fadf8605..a4598fb76 100644 --- a/internal/cmd/commands/config/config.go +++ b/internal/cmd/commands/config/config.go @@ -20,21 +20,21 @@ func (c *Command) Synopsis() string { func (c *Command) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary config [options] [args]", + "Usage: threshold config [options] [args]", "", - " This command groups subcommands for operators interacting with Boundary's config files. Here are a few examples of config commands:", + " This command groups subcommands for operators interacting with Threshold's config files. Here are a few examples of config commands:", "", " Encrypt sensitive values in a config file:", "", - " $ boundary config encrypt config.hcl", + " $ threshold config encrypt config.hcl", "", " Decrypt sensitive values in a config file:", "", - " $ boundary config decrypt config.hcl", + " $ threshold config decrypt config.hcl", "", " Read a stored token out:", "", - " $ boundary config get-token", + " $ threshold config get-token", "", " Please see the individual subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/config/encryptdecrypt.go b/internal/cmd/commands/config/encryptdecrypt.go index 383daf8f4..2aad6ce28 100644 --- a/internal/cmd/commands/config/encryptdecrypt.go +++ b/internal/cmd/commands/config/encryptdecrypt.go @@ -39,21 +39,21 @@ type EncryptDecryptCommand struct { } func (c *EncryptDecryptCommand) Synopsis() string { - return fmt.Sprintf("%s sensitive values in Boundary's configuration file", textproto.CanonicalMIMEHeaderKey(c.Func)) + return fmt.Sprintf("%s sensitive values in Threshold's configuration file", textproto.CanonicalMIMEHeaderKey(c.Func)) } func (c *EncryptDecryptCommand) Help() string { var args []string args = append(args, - "Usage: boundary config {{func}} [options] [args]", + "Usage: threshold config {{func}} [options] [args]", "", - " {{upperfunc}} sensitive values in a Boundary's configuration file. These values must be marked with {{{{func}}()}} as appropriate. Example:", + " {{upperfunc}} sensitive values in a Threshold's configuration file. These values must be marked with {{{{func}}()}} as appropriate. Example:", "", ` foo = "{{encrypt(bar)}}"`, "", " By default this will print out the new configuration. To overwrite into the same file use the -overwrite flag.", "", - " $ boundary config {{func}} -overwrite config.hcl", + " $ threshold config {{func}} -overwrite config.hcl", "", ` In order for this command to perform its task, a "kms" block must be defined within a configuration file. Example:`, "", diff --git a/internal/cmd/commands/config/token.go b/internal/cmd/commands/config/token.go index dd7391253..95f75032c 100644 --- a/internal/cmd/commands/config/token.go +++ b/internal/cmd/commands/config/token.go @@ -36,17 +36,17 @@ func (c *TokenCommand) Help() string { switch c.Func { case "get-token": args = append(args, - "Usage: boundary config get-token [options] [args]", + "Usage: threshold config get-token [options] [args]", "", - " Fetch a token stored by the Boundary CLI. Example:", + " Fetch a token stored by the Threshold CLI. Example:", "", - ` $ boundary config get-token`, + ` $ threshold config get-token`, "", - " This can be useful in various situations. For example, a line such as the following could be in a shell script shared by developers, such that each developer on their own machine executing the script ends up using their own Boundary token:", + " This can be useful in various situations. For example, a line such as the following could be in a shell script shared by developers, such that each developer on their own machine executing the script ends up using their own Threshold token:", "", - ` $ curl -H "Authorization: Bearer $(boundary config get-token)" -H "Content-Type: application/json" http://127.0.0.1:9200/v1/roles/r_1234567890`, + ` $ curl -H "Authorization: Bearer $(threshold config get-token)" -H "Content-Type: application/json" http://127.0.0.1:9200/v1/roles/r_1234567890`, "", - " Note that this command keeps parity with the behavior of other Boundary commands; if the BOUNDARY_TOKEN environment variable it set, it will override the value loaded from the system store. Not only does this keep parity, but it also allows examples such as the one above to work even if there is no stored token but if an environment variable is specified.", + " Note that this command keeps parity with the behavior of other Threshold commands; if the THRESHOLD_TOKEN environment variable it set, it will override the value loaded from the system store. Not only does this keep parity, but it also allows examples such as the one above to work even if there is no stored token but if an environment variable is specified.", "", ) } diff --git a/internal/cmd/commands/connect/cassandra.go b/internal/cmd/commands/connect/cassandra.go index 8d99221d8..b1da284ab 100644 --- a/internal/cmd/commands/connect/cassandra.go +++ b/internal/cmd/commands/connect/cassandra.go @@ -23,7 +23,7 @@ func cassandraOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "style", Target: &c.flagCassandraStyle, - EnvVar: "BOUNDARY_CONNECT_CASSANDRA_STYLE", + EnvVar: "THRESHOLD_CONNECT_CASSANDRA_STYLE", Completion: complete.PredictSet("cqlsh"), Default: "cqlsh", Usage: `Specifies how the CLI will attempt to invoke a Cassandra client. This will also set a suitable default for -exec if a value was not specified. Currently-understood values are "cqlsh".`, @@ -32,7 +32,7 @@ func cassandraOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "username", Target: &c.flagUsername, - EnvVar: "BOUNDARY_CONNECT_USERNAME", + EnvVar: "THRESHOLD_CONNECT_USERNAME", Completion: complete.PredictNothing, Usage: `Specifies the username to pass through to the client. May be overridden by credentials sourced from a credential store.`, }) @@ -40,7 +40,7 @@ func cassandraOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "keyspace", Target: &c.flagDbname, - EnvVar: "BOUNDARY_CONNECT_KEYSPACE", + EnvVar: "THRESHOLD_CONNECT_KEYSPACE", Completion: complete.PredictNothing, Usage: `Specifies the keyspace name to pass through to the client.`, }) diff --git a/internal/cmd/commands/connect/connect.go b/internal/cmd/commands/connect/connect.go index 412355d4c..0bdbdf1dd 100644 --- a/internal/cmd/commands/connect/connect.go +++ b/internal/cmd/commands/connect/connect.go @@ -55,7 +55,7 @@ var ( _ cli.Command = (*Command)(nil) _ cli.CommandAutocomplete = (*Command)(nil) - // rdpDefaultTimeout is the default inactivity timeout for boundary connect rdp + // rdpDefaultTimeout is the default inactivity timeout for threshold connect rdp // The default is zero (no timeout), however it is overridden for macOS clients only in connect_darwin.go rdpDefaultTimeout time.Duration = 0 ) @@ -117,7 +117,7 @@ type Command struct { func (c *Command) Synopsis() string { switch c.Func { case "connect": - return "Connect to a target through a Boundary worker" + return "Connect to a target through a Threshold worker" case "http": return httpSynopsis case "postgres": @@ -145,26 +145,26 @@ func (c *Command) Help() string { switch c.Func { case "connect": return base.WrapForHelpText([]string{ - "Usage: boundary connect [options] [args]", + "Usage: threshold connect [options] [args]", "", ` This command performs a target authorization (or consumes an existing authorization token) and launches a proxied connection.`, "", " Example:", "", - ` $ boundary connect -target-id ttcp_1234567890`, + ` $ threshold connect -target-id ttcp_1234567890`, "", "", }) + c.Flags().Help() default: return base.WrapForHelpText([]string{ - fmt.Sprintf("Usage: boundary connect %s [options] [args]", c.Func), + fmt.Sprintf("Usage: threshold connect %s [options] [args]", c.Func), "", fmt.Sprintf(` This command performs a target authorization (or consumes an existing authorization token) and launches a proxied %s connection.`, c.Func), "", " Example:", "", - fmt.Sprintf(` $ boundary connect %s -target-id ttcp_1234567890`, c.Func), + fmt.Sprintf(` $ threshold connect %s -target-id ttcp_1234567890`, c.Func), "", "", }) + c.Flags().Help() @@ -178,9 +178,9 @@ func (c *Command) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "authz-token", Target: &c.flagAuthzToken, - EnvVar: "BOUNDARY_CONNECT_AUTHZ_TOKEN", + EnvVar: "THRESHOLD_CONNECT_AUTHZ_TOKEN", Completion: complete.PredictNothing, - Usage: `Only needed if -target-id is not set. The authorization string returned from the Boundary controller via an "authorize-session" action against a target. If set to "-", the command will attempt to read in the authorization string from standard input.`, + Usage: `Only needed if -target-id is not set. The authorization string returned from the Threshold controller via an "authorize-session" action against a target. If set to "-", the command will attempt to read in the authorization string from standard input.`, }) f.StringVar(&base.StringVar{ @@ -198,7 +198,7 @@ func (c *Command) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "exec", Target: &c.flagExec, - EnvVar: "BOUNDARY_CONNECT_EXEC", + EnvVar: "THRESHOLD_CONNECT_EXEC", Completion: complete.PredictAnything, Usage: `If set, after connecting to the worker, the given binary will be executed. This should be a binary on your path, or an absolute path. If all command flags are followed by " -- " (space, two hyphens, space), then any arguments after that will be sent directly to the binary.`, }) @@ -212,7 +212,7 @@ func (c *Command) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "target-scope-id", Target: &c.FlagScopeId, - EnvVar: "BOUNDARY_CONNECT_TARGET_SCOPE_ID", + EnvVar: "THRESHOLD_CONNECT_TARGET_SCOPE_ID", Completion: complete.PredictAnything, Usage: "Target scope ID, if authorizing the session via scope parameters and target name. Mutually exclusive with -scope-name.", }) @@ -220,7 +220,7 @@ func (c *Command) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "target-scope-name", Target: &c.FlagScopeName, - EnvVar: "BOUNDARY_CONNECT_TARGET_SCOPE_NAME", + EnvVar: "THRESHOLD_CONNECT_TARGET_SCOPE_NAME", Completion: complete.PredictAnything, Usage: "Target scope name, if authorizing the session via scope parameters and target name. Mutually exclusive with -scope-id.", }) @@ -237,7 +237,7 @@ func (c *Command) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "listen-addr", Target: &c.flagListenAddr, - EnvVar: "BOUNDARY_CONNECT_LISTEN_ADDR", + EnvVar: "THRESHOLD_CONNECT_LISTEN_ADDR", Completion: complete.PredictAnything, Usage: `If set, the CLI will attempt to bind its listening address to the given value, which must be an IP address. If it cannot, the command will error. If not set, defaults to the most common IPv4 loopback address (127.0.0.1).`, }) @@ -245,7 +245,7 @@ func (c *Command) Flags() *base.FlagSets { f.Int64Var(&base.Int64Var{ Name: "listen-port", Target: &c.flagListenPort, - EnvVar: "BOUNDARY_CONNECT_LISTEN_PORT", + EnvVar: "THRESHOLD_CONNECT_LISTEN_PORT", Completion: complete.PredictAnything, Usage: `If set, the CLI will attempt to bind its listening port to the given value. If it cannot, the command will error.`, }) @@ -479,7 +479,7 @@ func (c *Command) Run(args []string) (retCode int) { Credentials: sa.Credentials, } - // the session was created specifically for this `boundary connect` + // the session was created specifically for this `threshold connect` // command, and should be closed as soon as the command has exited defer func() { var err error @@ -840,6 +840,10 @@ func (c *Command) handleExec(clientProxy *apiproxy.ClientProxy, passthroughArgs cmd := exec.Command(c.flagExec, args...) // Add original and network related envs here cmd.Env = append(os.Environ(), + fmt.Sprintf("THRESHOLD_PROXIED_PORT=%s", port), + fmt.Sprintf("THRESHOLD_PROXIED_IP=%s", host), + fmt.Sprintf("THRESHOLD_PROXIED_ADDR=%s", addr), + // Legacy names, kept so existing -exec scripts keep working. fmt.Sprintf("BOUNDARY_PROXIED_PORT=%s", port), fmt.Sprintf("BOUNDARY_PROXIED_IP=%s", host), fmt.Sprintf("BOUNDARY_PROXIED_ADDR=%s", addr), diff --git a/internal/cmd/commands/connect/http.go b/internal/cmd/commands/connect/http.go index 8aed5a38e..93521ac46 100644 --- a/internal/cmd/commands/connect/http.go +++ b/internal/cmd/commands/connect/http.go @@ -22,7 +22,7 @@ func httpOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "style", Target: &c.flagHttpStyle, - EnvVar: "BOUNDARY_CONNECT_HTTP_STYLE", + EnvVar: "THRESHOLD_CONNECT_HTTP_STYLE", Completion: complete.PredictSet("curl"), Default: "curl", Usage: `Specifies how the CLI will attempt to invoke an HTTP client. This will also set a suitable default for -exec if a value was not specified. Currently-understood values are "curl".`, @@ -31,7 +31,7 @@ func httpOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "host", Target: &c.flagHttpHost, - EnvVar: "BOUNDARY_CONNECT_HTTP_HOST", + EnvVar: "THRESHOLD_CONNECT_HTTP_HOST", Completion: complete.PredictNothing, Usage: `Specifies the host value to use, overriding the endpoint address from the session information. The specified hostname will be passed through to the client (if supported) for use in the Host header and TLS SNI value.`, }) @@ -39,7 +39,7 @@ func httpOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "path", Target: &c.flagHttpPath, - EnvVar: "BOUNDARY_CONNECT_HTTP_PATH", + EnvVar: "THRESHOLD_CONNECT_HTTP_PATH", Completion: complete.PredictNothing, Usage: `Specifies a path that will be appended to the generated URL.`, }) @@ -47,7 +47,7 @@ func httpOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "method", Target: &c.flagHttpMethod, - EnvVar: "BOUNDARY_CONNECT_HTTP_METHOD", + EnvVar: "THRESHOLD_CONNECT_HTTP_METHOD", Completion: complete.PredictNothing, Usage: `Specifies the method to use. If not set, will use the client's default.`, }) @@ -56,7 +56,7 @@ func httpOptions(c *Command, set *base.FlagSets) { Name: "scheme", Target: &c.flagHttpScheme, Default: "https", - EnvVar: "BOUNDARY_CONNECT_HTTP_SCHEME", + EnvVar: "THRESHOLD_CONNECT_HTTP_SCHEME", Completion: complete.PredictNothing, Usage: `Specifies the scheme to use.`, }) diff --git a/internal/cmd/commands/connect/kube.go b/internal/cmd/commands/connect/kube.go index 4c9dd9629..3a7685773 100644 --- a/internal/cmd/commands/connect/kube.go +++ b/internal/cmd/commands/connect/kube.go @@ -22,7 +22,7 @@ func kubeOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "style", Target: &c.flagKubeStyle, - EnvVar: fmt.Sprintf("BOUNDARY_CONNECT_%s_STYLE", strings.ToUpper(c.Func)), + EnvVar: fmt.Sprintf("THRESHOLD_CONNECT_%s_STYLE", strings.ToUpper(c.Func)), Completion: complete.PredictSet("kubectl"), Default: "kubectl", Usage: `Specifies how the CLI will attempt to invoke a Kubernetes client. This will also set a suitable default for -exec if a value was not specified. Currently-understood values are "kubectl".`, @@ -31,7 +31,7 @@ func kubeOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "host", Target: &c.flagKubeHost, - EnvVar: fmt.Sprintf("BOUNDARY_CONNECT_%s_HOST", strings.ToUpper(c.Func)), + EnvVar: fmt.Sprintf("THRESHOLD_CONNECT_%s_HOST", strings.ToUpper(c.Func)), Completion: complete.PredictNothing, Usage: `Specifies the host value to use, overriding the endpoint address from the session information. The specified hostname will be passed through to the client (if supported) for use in the TLS SNI value.`, }) @@ -40,7 +40,7 @@ func kubeOptions(c *Command, set *base.FlagSets) { Name: "scheme", Target: &c.flagKubeScheme, Default: "https", - EnvVar: fmt.Sprintf("BOUNDARY_CONNECT_%s_SCHEME", strings.ToUpper(c.Func)), + EnvVar: fmt.Sprintf("THRESHOLD_CONNECT_%s_SCHEME", strings.ToUpper(c.Func)), Completion: complete.PredictNothing, Usage: `Specifies the scheme to use.`, }) diff --git a/internal/cmd/commands/connect/mongo.go b/internal/cmd/commands/connect/mongo.go index 8b8e0c843..28cf1f417 100644 --- a/internal/cmd/commands/connect/mongo.go +++ b/internal/cmd/commands/connect/mongo.go @@ -22,7 +22,7 @@ func mongoOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "style", Target: &c.flagMongoStyle, - EnvVar: "BOUNDARY_CONNECT_MONGO_STYLE", + EnvVar: "THRESHOLD_CONNECT_MONGO_STYLE", Completion: complete.PredictSet("mongosh"), Default: "mongosh", Usage: `Specifies how the CLI will attempt to invoke a MongoDB client. Currently only "mongosh" is supported.`, @@ -31,7 +31,7 @@ func mongoOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "username", Target: &c.flagUsername, - EnvVar: "BOUNDARY_CONNECT_USERNAME", + EnvVar: "THRESHOLD_CONNECT_USERNAME", Completion: complete.PredictNothing, Usage: `Specifies the username to pass through to the client. May be overridden by credentials sourced from a credential store.`, }) @@ -39,7 +39,7 @@ func mongoOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "dbname", Target: &c.flagDbname, - EnvVar: "BOUNDARY_CONNECT_DBNAME", + EnvVar: "THRESHOLD_CONNECT_DBNAME", Completion: complete.PredictNothing, Usage: `Specifies the database name to pass through to the client.`, }) @@ -47,7 +47,7 @@ func mongoOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "authentication-database", Target: &c.flagMongoDbAuthenticationDatabase, - EnvVar: "BOUNDARY_CONNECT_MONGO_AUTHENTICATION_DATABASE", + EnvVar: "THRESHOLD_CONNECT_MONGO_AUTHENTICATION_DATABASE", Completion: complete.PredictNothing, Default: "", Usage: `Specifies the authentication database for MongoDB. If omitted, mongosh defaults authSource to the database name (dbname); if none is specified, it defaults to "admin".`, diff --git a/internal/cmd/commands/connect/mysql.go b/internal/cmd/commands/connect/mysql.go index e61ed334c..1f8d0db17 100644 --- a/internal/cmd/commands/connect/mysql.go +++ b/internal/cmd/commands/connect/mysql.go @@ -23,7 +23,7 @@ func mysqlOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "style", Target: &c.flagMySQLStyle, - EnvVar: "BOUNDARY_CONNECT_MYSQL_STYLE", + EnvVar: "THRESHOLD_CONNECT_MYSQL_STYLE", Completion: complete.PredictSet("mysql"), Default: "mysql", Usage: `Specifies how the CLI will attempt to invoke a MySQL client. This will also set a suitable default for -exec if a value was not specified. Currently-understood values are "mysql".`, @@ -32,7 +32,7 @@ func mysqlOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "username", Target: &c.flagUsername, - EnvVar: "BOUNDARY_CONNECT_USERNAME", + EnvVar: "THRESHOLD_CONNECT_USERNAME", Completion: complete.PredictNothing, Usage: `Specifies the username to pass through to the client. May be overridden by credentials sourced from a credential store.`, }) @@ -40,7 +40,7 @@ func mysqlOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "dbname", Target: &c.flagDbname, - EnvVar: "BOUNDARY_CONNECT_DBNAME", + EnvVar: "THRESHOLD_CONNECT_DBNAME", Completion: complete.PredictNothing, Usage: `Specifies the database name to pass through to the client.`, }) diff --git a/internal/cmd/commands/connect/postgres.go b/internal/cmd/commands/connect/postgres.go index b2488d6c8..af2a6e80a 100644 --- a/internal/cmd/commands/connect/postgres.go +++ b/internal/cmd/commands/connect/postgres.go @@ -23,7 +23,7 @@ func postgresOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "style", Target: &c.flagPostgresStyle, - EnvVar: "BOUNDARY_CONNECT_POSTGRES_STYLE", + EnvVar: "THRESHOLD_CONNECT_POSTGRES_STYLE", Completion: complete.PredictSet("psql"), Default: "psql", Usage: `Specifies how the CLI will attempt to invoke a Postgres client. This will also set a suitable default for -exec if a value was not specified. Currently-understood values are "psql".`, @@ -32,7 +32,7 @@ func postgresOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "username", Target: &c.flagUsername, - EnvVar: "BOUNDARY_CONNECT_USERNAME", + EnvVar: "THRESHOLD_CONNECT_USERNAME", Completion: complete.PredictNothing, Usage: `Specifies the username to pass through to the client. May be overridden by credentials sourced from a credential store.`, }) @@ -40,7 +40,7 @@ func postgresOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "dbname", Target: &c.flagDbname, - EnvVar: "BOUNDARY_CONNECT_DBNAME", + EnvVar: "THRESHOLD_CONNECT_DBNAME", Completion: complete.PredictNothing, Usage: `Specifies the database name to pass through to the client.`, }) diff --git a/internal/cmd/commands/connect/rdp.go b/internal/cmd/commands/connect/rdp.go index d708c1ca7..11cc3eba7 100644 --- a/internal/cmd/commands/connect/rdp.go +++ b/internal/cmd/commands/connect/rdp.go @@ -23,7 +23,7 @@ func rdpOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "style", Target: &c.flagRdpStyle, - EnvVar: "BOUNDARY_CONNECT_RDP_STYLE", + EnvVar: "THRESHOLD_CONNECT_RDP_STYLE", Completion: complete.PredictSet("mstsc", "open"), Usage: `Specifies how the CLI will attempt to invoke an RDP client. This will also set a suitable default for -exec if a value was not specified. Currently-understood values are "mstsc", which is the default on Windows and launches the Windows client, and "open", which is the default on Mac and launches via an rdp:// URL.`, }) diff --git a/internal/cmd/commands/connect/redis.go b/internal/cmd/commands/connect/redis.go index ff9b48d29..03ca54673 100644 --- a/internal/cmd/commands/connect/redis.go +++ b/internal/cmd/commands/connect/redis.go @@ -22,7 +22,7 @@ func redisOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "style", Target: &c.flagRedisStyle, - EnvVar: "BOUNDARY_CONNECT_REDIS_STYLE", + EnvVar: "THRESHOLD_CONNECT_REDIS_STYLE", Completion: complete.PredictSet("redis-cli"), Default: "redis-cli", Usage: `Specifies how the CLI will attempt to invoke a Redis client. This will also set a suitable default for -exec if a value was not specified. Currently-understood values are "redis-cli".`, @@ -31,7 +31,7 @@ func redisOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "username", Target: &c.flagUsername, - EnvVar: "BOUNDARY_CONNECT_USERNAME", + EnvVar: "THRESHOLD_CONNECT_USERNAME", Completion: complete.PredictNothing, Usage: `Specifies the username to pass through to the client. May be overridden by credentials sourced from a credential store.`, }) diff --git a/internal/cmd/commands/connect/ssh.go b/internal/cmd/commands/connect/ssh.go index 205753c22..c6e0373f9 100644 --- a/internal/cmd/commands/connect/ssh.go +++ b/internal/cmd/commands/connect/ssh.go @@ -25,7 +25,7 @@ func sshOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "style", Target: &c.flagSshStyle, - EnvVar: "BOUNDARY_CONNECT_SSH_STYLE", + EnvVar: "THRESHOLD_CONNECT_SSH_STYLE", Completion: complete.PredictSet("ssh", "putty", "sshpass"), Default: "ssh", Usage: `Specifies how the CLI will attempt to invoke an SSH client. This will also set a suitable default for -exec if a value was not specified. Currently-understood values are "ssh" and "putty".`, @@ -40,7 +40,7 @@ func sshOptions(c *Command, set *base.FlagSets) { f.StringVar(&base.StringVar{ Name: "username", Target: &c.flagUsername, - EnvVar: "BOUNDARY_CONNECT_USERNAME", + EnvVar: "THRESHOLD_CONNECT_USERNAME", Completion: complete.PredictNothing, Usage: `Specifies the username to pass through to the client`, }) @@ -163,7 +163,7 @@ func (s *sshFlags) buildArgs(c *Command, port, ip, _ string, creds apiproxy.Cred return nil }) // SSH requires the private key file to end with a newline. - // When ingesting an ssh_private_key from a file:// Boundary calls strings.TrimSpace + // When ingesting an ssh_private_key from a file:// Threshold calls strings.TrimSpace // which will also trim newlines. if !strings.HasSuffix(privateKey, "\n") { privateKey = fmt.Sprintln(privateKey) diff --git a/internal/cmd/commands/credentiallibrariescmd/credentiallibraries.gen.go b/internal/cmd/commands/credentiallibrariescmd/credentiallibraries.gen.go index 615ac300b..773e6850a 100644 --- a/internal/cmd/commands/credentiallibrariescmd/credentiallibraries.gen.go +++ b/internal/cmd/commands/credentiallibrariescmd/credentiallibraries.gen.go @@ -151,7 +151,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagCredentialStoreId == "" { - c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or BOUNDARY_CREDENTIAL_STORE_ID")) + c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or THRESHOLD_CREDENTIAL_STORE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentiallibrariescmd/funcs.go b/internal/cmd/commands/credentiallibrariescmd/funcs.go index a8c88f8bb..98e285741 100644 --- a/internal/cmd/commands/credentiallibrariescmd/funcs.go +++ b/internal/cmd/commands/credentiallibrariescmd/funcs.go @@ -17,37 +17,37 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary credential-libraries [sub command] [options] [args]", + "Usage: threshold credential-libraries [sub command] [options] [args]", "", - " This command allows operations on Boundary credential library resources. Example:", + " This command allows operations on Threshold credential library resources. Example:", "", " Read a credential library:", "", - ` $ boundary credential-libraries read -id clvlt_1234567890`, + ` $ threshold credential-libraries read -id clvlt_1234567890`, "", " Please see the credential-libraries subcommand help for detailed usage information.", }) case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-libraries create [type] [sub command] [options] [args]", + "Usage: threshold credential-libraries create [type] [sub command] [options] [args]", "", - " This command allows create operations on Boundary credential library resources. Example:", + " This command allows create operations on Threshold credential library resources. Example:", "", " Create a credential library:", "", - ` $ boundary credential-libraries create vault -credential-store-id csvlt_1234567890 -vault-path "/some/path"`, + ` $ threshold credential-libraries create vault -credential-store-id csvlt_1234567890 -vault-path "/some/path"`, "", " Please see the typed subcommand help for detailed usage information.", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-libraries update [type] [sub command] [options] [args]", + "Usage: threshold credential-libraries update [type] [sub command] [options] [args]", "", - " This command allows update operations on Boundary credential library resources. Example:", + " This command allows update operations on Threshold credential library resources. Example:", "", " Update a vault-type credential library:", "", - ` $ boundary credential-libraries update vault -id clvlt_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credential-libraries update vault -id clvlt_1234567890 -name devops -description "For DevOps usage"`, "", " Please see the typed subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/credentiallibrariescmd/vault-generic_credentiallibraries.gen.go b/internal/cmd/commands/credentiallibrariescmd/vault-generic_credentiallibraries.gen.go index 83626154e..4bc21a2c3 100644 --- a/internal/cmd/commands/credentiallibrariescmd/vault-generic_credentiallibraries.gen.go +++ b/internal/cmd/commands/credentiallibrariescmd/vault-generic_credentiallibraries.gen.go @@ -137,7 +137,7 @@ func (c *VaultGenericCommand) Run(args []string) int { case "create": if c.FlagCredentialStoreId == "" { - c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or BOUNDARY_CREDENTIAL_STORE_ID")) + c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or THRESHOLD_CREDENTIAL_STORE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentiallibrariescmd/vault-generic_funcs.go b/internal/cmd/commands/credentiallibrariescmd/vault-generic_funcs.go index 17115126a..8dd0f35fd 100644 --- a/internal/cmd/commands/credentiallibrariescmd/vault-generic_funcs.go +++ b/internal/cmd/commands/credentiallibrariescmd/vault-generic_funcs.go @@ -153,22 +153,22 @@ func (c *VaultGenericCommand) extraVaultGenericHelpFunc(_ map[string]func() stri switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-libraries create vault -credential-store-id [options] [args]", + "Usage: threshold credential-libraries create vault -credential-store-id [options] [args]", "", " Create a vault-generic-type credential library. Example:", "", - ` $ boundary credential-libraries create vault-generic -credential-store-id csvlt_1234567890 -vault-path "/some/path"`, + ` $ threshold credential-libraries create vault-generic -credential-store-id csvlt_1234567890 -vault-path "/some/path"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-libraries update vault [options] [args]", + "Usage: threshold credential-libraries update vault [options] [args]", "", " Update a vault-generic-type credential library given its ID. Example:", "", - ` $ boundary credential-libraries update vault-generic -id clvlt_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credential-libraries update vault-generic -id clvlt_1234567890 -name devops -description "For DevOps usage"`, "", "", }) diff --git a/internal/cmd/commands/credentiallibrariescmd/vault-ldap_credentiallibraries.gen.go b/internal/cmd/commands/credentiallibrariescmd/vault-ldap_credentiallibraries.gen.go index b81ff565d..9db995d2f 100644 --- a/internal/cmd/commands/credentiallibrariescmd/vault-ldap_credentiallibraries.gen.go +++ b/internal/cmd/commands/credentiallibrariescmd/vault-ldap_credentiallibraries.gen.go @@ -137,7 +137,7 @@ func (c *VaultLdapCommand) Run(args []string) int { case "create": if c.FlagCredentialStoreId == "" { - c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or BOUNDARY_CREDENTIAL_STORE_ID")) + c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or THRESHOLD_CREDENTIAL_STORE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentiallibrariescmd/vault-ldap_funcs.go b/internal/cmd/commands/credentiallibrariescmd/vault-ldap_funcs.go index cd5e452d3..90032501f 100644 --- a/internal/cmd/commands/credentiallibrariescmd/vault-ldap_funcs.go +++ b/internal/cmd/commands/credentiallibrariescmd/vault-ldap_funcs.go @@ -59,22 +59,22 @@ func (c *VaultLdapCommand) extraVaultLdapHelpFunc(_ map[string]func() string) st switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-libraries create vault-ldap -credential-store-id [options] [args]", + "Usage: threshold credential-libraries create vault-ldap -credential-store-id [options] [args]", "", " Create a vault-ldap-type credential library. Example:", "", - ` $ boundary credential-libraries create vault-ldap -credential-store-id csvlt_1234567890 -vault-path "/ldap/static-cred/einstein"`, + ` $ threshold credential-libraries create vault-ldap -credential-store-id csvlt_1234567890 -vault-path "/ldap/static-cred/einstein"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-libraries update vault-ldap [options] [args]", + "Usage: threshold credential-libraries update vault-ldap [options] [args]", "", " Update a vault-ldap-type credential library given its ID. Example:", "", - ` $ boundary credential-libraries update vault-ldap -id clvllt_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credential-libraries update vault-ldap -id clvllt_1234567890 -name devops -description "For DevOps usage"`, "", "", }) diff --git a/internal/cmd/commands/credentiallibrariescmd/vault-ssh-certificate_credentiallibraries.gen.go b/internal/cmd/commands/credentiallibrariescmd/vault-ssh-certificate_credentiallibraries.gen.go index 704717f03..f33df4a9f 100644 --- a/internal/cmd/commands/credentiallibrariescmd/vault-ssh-certificate_credentiallibraries.gen.go +++ b/internal/cmd/commands/credentiallibrariescmd/vault-ssh-certificate_credentiallibraries.gen.go @@ -137,7 +137,7 @@ func (c *VaultSshCertificateCommand) Run(args []string) int { case "create": if c.FlagCredentialStoreId == "" { - c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or BOUNDARY_CREDENTIAL_STORE_ID")) + c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or THRESHOLD_CREDENTIAL_STORE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentiallibrariescmd/vault-ssh-certificate_funcs.go b/internal/cmd/commands/credentiallibrariescmd/vault-ssh-certificate_funcs.go index c7691e8cf..9c639686f 100644 --- a/internal/cmd/commands/credentiallibrariescmd/vault-ssh-certificate_funcs.go +++ b/internal/cmd/commands/credentiallibrariescmd/vault-ssh-certificate_funcs.go @@ -269,22 +269,22 @@ func (c *VaultSshCertificateCommand) extraVaultSshCertificateHelpFunc(_ map[stri switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-libraries create vault-ssh-certificate -credential-store-id [options] [args]", + "Usage: threshold credential-libraries create vault-ssh-certificate -credential-store-id [options] [args]", "", " Create a vault-ssh-certificate-type credential library. Example:", "", - ` $ boundary credential-libraries create vault-ssh-certificate -credential-store-id csvlt_1234567890 -vault-path "/ssh/sign/role" -username user`, + ` $ threshold credential-libraries create vault-ssh-certificate -credential-store-id csvlt_1234567890 -vault-path "/ssh/sign/role" -username user`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-libraries update vault-ssh-certificate [options] [args]", + "Usage: threshold credential-libraries update vault-ssh-certificate [options] [args]", "", " Update a vault-ssh-certificate-type credential library given its ID. Example:", "", - ` $ boundary credential-libraries update vault-ssh-certificate -id clvsclt_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credential-libraries update vault-ssh-certificate -id clvsclt_1234567890 -name devops -description "For DevOps usage"`, "", "", }) diff --git a/internal/cmd/commands/credentiallibrariescmd/vault_credentiallibraries.gen.go b/internal/cmd/commands/credentiallibrariescmd/vault_credentiallibraries.gen.go index 9e10284c0..5f7afa9b2 100644 --- a/internal/cmd/commands/credentiallibrariescmd/vault_credentiallibraries.gen.go +++ b/internal/cmd/commands/credentiallibrariescmd/vault_credentiallibraries.gen.go @@ -137,7 +137,7 @@ func (c *VaultCommand) Run(args []string) int { case "create": if c.FlagCredentialStoreId == "" { - c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or BOUNDARY_CREDENTIAL_STORE_ID")) + c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or THRESHOLD_CREDENTIAL_STORE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentiallibrariescmd/vault_funcs.go b/internal/cmd/commands/credentiallibrariescmd/vault_funcs.go index 1aa587216..219facc02 100644 --- a/internal/cmd/commands/credentiallibrariescmd/vault_funcs.go +++ b/internal/cmd/commands/credentiallibrariescmd/vault_funcs.go @@ -124,24 +124,24 @@ func (c *VaultCommand) extraVaultHelpFunc(_ map[string]func() string) string { switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Deprecated: use 'boundary credential-libraries create vault-generic' instead.", - "Usage: boundary credential-libraries create vault -credential-store-id [options] [args]", + "Deprecated: use 'threshold credential-libraries create vault-generic' instead.", + "Usage: threshold credential-libraries create vault -credential-store-id [options] [args]", "", " Create a vault-type credential library. Example:", "", - ` $ boundary credential-libraries create vault -credential-store-id csvlt_1234567890 -vault-path "/some/path"`, + ` $ threshold credential-libraries create vault -credential-store-id csvlt_1234567890 -vault-path "/some/path"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Deprecated: use 'boundary credential-libraries update vault-generic' instead.", - "Usage: boundary credential-libraries update vault [options] [args]", + "Deprecated: use 'threshold credential-libraries update vault-generic' instead.", + "Usage: threshold credential-libraries update vault [options] [args]", "", " Update a vault-type credential library given its ID. Example:", "", - ` $ boundary credential-libraries update vault -id clvlt_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credential-libraries update vault -id clvlt_1234567890 -name devops -description "For DevOps usage"`, "", "", }) diff --git a/internal/cmd/commands/credentialscmd/credentials.gen.go b/internal/cmd/commands/credentialscmd/credentials.gen.go index 0a98742f9..3739746cb 100644 --- a/internal/cmd/commands/credentialscmd/credentials.gen.go +++ b/internal/cmd/commands/credentialscmd/credentials.gen.go @@ -151,7 +151,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagCredentialStoreId == "" { - c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or BOUNDARY_CREDENTIAL_STORE_ID")) + c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or THRESHOLD_CREDENTIAL_STORE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentialscmd/funcs.go b/internal/cmd/commands/credentialscmd/funcs.go index bf0efa56d..b4e37f835 100644 --- a/internal/cmd/commands/credentialscmd/funcs.go +++ b/internal/cmd/commands/credentialscmd/funcs.go @@ -26,37 +26,37 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary credentials [sub command] [options] [args]", + "Usage: threshold credentials [sub command] [options] [args]", "", - " This command allows operations on Boundary credential resources. Example:", + " This command allows operations on Threshold credential resources. Example:", "", " Read a credential:", "", - ` $ boundary credentials read -id cred_1234567890`, + ` $ threshold credentials read -id cred_1234567890`, "", " Please see the credentials subcommand help for detailed usage information.", }) case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credentials create [type] [sub command] [options] [args]", + "Usage: threshold credentials create [type] [sub command] [options] [args]", "", - " This command allows create operations on Boundary credential resources. Example:", + " This command allows create operations on Threshold credential resources. Example:", "", " Create a credential:", "", - ` $ boundary credentials create username-password -credential-store-id cs_1234567890 -username user -password pass`, + ` $ threshold credentials create username-password -credential-store-id cs_1234567890 -username user -password pass`, "", " Please see the typed subcommand help for detailed usage information.", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credentials update [type] [sub command] [options] [args]", + "Usage: threshold credentials update [type] [sub command] [options] [args]", "", - " This command allows update operations on Boundary credential resources. Example:", + " This command allows update operations on Threshold credential resources. Example:", "", " Update a username/password credential:", "", - ` $ boundary credentials update username-password -id cred_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credentials update username-password -id cred_1234567890 -name devops -description "For DevOps usage"`, "", " Please see the typed subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/credentialscmd/json_credentials.gen.go b/internal/cmd/commands/credentialscmd/json_credentials.gen.go index 3c3604b84..74b01560c 100644 --- a/internal/cmd/commands/credentialscmd/json_credentials.gen.go +++ b/internal/cmd/commands/credentialscmd/json_credentials.gen.go @@ -151,7 +151,7 @@ func (c *JsonCommand) Run(args []string) int { case "create": if c.FlagCredentialStoreId == "" { - c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or BOUNDARY_CREDENTIAL_STORE_ID")) + c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or THRESHOLD_CREDENTIAL_STORE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentialscmd/json_credentials_funcs.go b/internal/cmd/commands/credentialscmd/json_credentials_funcs.go index 41107b9d1..a5ec8f9e3 100644 --- a/internal/cmd/commands/credentialscmd/json_credentials_funcs.go +++ b/internal/cmd/commands/credentialscmd/json_credentials_funcs.go @@ -12,22 +12,22 @@ func (c *JsonCommand) extraJsonHelpFunc(_ map[string]func() string) string { switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credentials create json -credential-store-id [options] [args]", + "Usage: threshold credentials create json -credential-store-id [options] [args]", "", " Create a json credential. Example:", "", - ` $ boundary credentials create json -credential-store-id csst_1234567890 -object file:///home/user/secret`, + ` $ threshold credentials create json -credential-store-id csst_1234567890 -object file:///home/user/secret`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credentials update json [options] [args]", + "Usage: threshold credentials update json [options] [args]", "", " Update a json credential given its ID. Example:", "", - ` $ boundary credentials update json -id csst_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credentials update json -id csst_1234567890 -name devops -description "For DevOps usage"`, "", "", }) diff --git a/internal/cmd/commands/credentialscmd/password_credentials.gen.go b/internal/cmd/commands/credentialscmd/password_credentials.gen.go index 24e4433c4..0661e20a7 100644 --- a/internal/cmd/commands/credentialscmd/password_credentials.gen.go +++ b/internal/cmd/commands/credentialscmd/password_credentials.gen.go @@ -137,7 +137,7 @@ func (c *PasswordCommand) Run(args []string) int { case "create": if c.FlagCredentialStoreId == "" { - c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or BOUNDARY_CREDENTIAL_STORE_ID")) + c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or THRESHOLD_CREDENTIAL_STORE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentialscmd/password_funcs.go b/internal/cmd/commands/credentialscmd/password_funcs.go index 0521d59d0..ff6c0fb83 100644 --- a/internal/cmd/commands/credentialscmd/password_funcs.go +++ b/internal/cmd/commands/credentialscmd/password_funcs.go @@ -72,22 +72,22 @@ func (c *PasswordCommand) extraPasswordHelpFunc(_ map[string]func() string) stri switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credentials create password -credential-store-id [options] [args]", + "Usage: threshold credentials create password -credential-store-id [options] [args]", "", " Create a password credential. Example:", "", - ` $ boundary credentials create password -credential-store-id csvlt_1234567890 -password pass`, + ` $ threshold credentials create password -credential-store-id csvlt_1234567890 -password pass`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credentials update password [options] [args]", + "Usage: threshold credentials update password [options] [args]", "", " Update a password credential given its ID. Example:", "", - ` $ boundary credentials update password -id clvlt_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credentials update password -id clvlt_1234567890 -name devops -description "For DevOps usage"`, "", "", }) diff --git a/internal/cmd/commands/credentialscmd/ssh-private-key_credentials.gen.go b/internal/cmd/commands/credentialscmd/ssh-private-key_credentials.gen.go index 01f54a900..9db768dca 100644 --- a/internal/cmd/commands/credentialscmd/ssh-private-key_credentials.gen.go +++ b/internal/cmd/commands/credentialscmd/ssh-private-key_credentials.gen.go @@ -137,7 +137,7 @@ func (c *SshPrivateKeyCommand) Run(args []string) int { case "create": if c.FlagCredentialStoreId == "" { - c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or BOUNDARY_CREDENTIAL_STORE_ID")) + c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or THRESHOLD_CREDENTIAL_STORE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentialscmd/ssh-private-key_funcs.go b/internal/cmd/commands/credentialscmd/ssh-private-key_funcs.go index 2e342345f..776db6170 100644 --- a/internal/cmd/commands/credentialscmd/ssh-private-key_funcs.go +++ b/internal/cmd/commands/credentialscmd/ssh-private-key_funcs.go @@ -154,22 +154,22 @@ func (c *SshPrivateKeyCommand) extraSshPrivateKeyHelpFunc(_ map[string]func() st switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credentials create ssh-private-key -credential-store-id [options] [args]", + "Usage: threshold credentials create ssh-private-key -credential-store-id [options] [args]", "", " Create an SSH private key credential. Example:", "", - ` $ boundary credentials create ssh-private-key -credential-store-id csvlt_1234567890 -username user -private-key file:///home/user/.ssh/id_ed25519`, + ` $ threshold credentials create ssh-private-key -credential-store-id csvlt_1234567890 -username user -private-key file:///home/user/.ssh/id_ed25519`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credentials update ssh-private-key [options] [args]", + "Usage: threshold credentials update ssh-private-key [options] [args]", "", " Update an SSH private key credential given its ID. Example:", "", - ` $ boundary credentials update ssh-private-key -id clvlt_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credentials update ssh-private-key -id clvlt_1234567890 -name devops -description "For DevOps usage"`, "", "", }) diff --git a/internal/cmd/commands/credentialscmd/username-password-domain_credentials.gen.go b/internal/cmd/commands/credentialscmd/username-password-domain_credentials.gen.go index 838caa5ed..cc9fe2a24 100644 --- a/internal/cmd/commands/credentialscmd/username-password-domain_credentials.gen.go +++ b/internal/cmd/commands/credentialscmd/username-password-domain_credentials.gen.go @@ -137,7 +137,7 @@ func (c *UsernamePasswordDomainCommand) Run(args []string) int { case "create": if c.FlagCredentialStoreId == "" { - c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or BOUNDARY_CREDENTIAL_STORE_ID")) + c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or THRESHOLD_CREDENTIAL_STORE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentialscmd/username-password-domain_funcs.go b/internal/cmd/commands/credentialscmd/username-password-domain_funcs.go index 4f68316fe..41dbbbeea 100644 --- a/internal/cmd/commands/credentialscmd/username-password-domain_funcs.go +++ b/internal/cmd/commands/credentialscmd/username-password-domain_funcs.go @@ -106,22 +106,22 @@ func (c *UsernamePasswordDomainCommand) extraUsernamePasswordDomainHelpFunc(_ ma switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credentials create username-password-domain -credential-store-id [options] [args]", + "Usage: threshold credentials create username-password-domain -credential-store-id [options] [args]", "", " Create a username password domain credential. Example:", "", - ` $ boundary credentials create username-password-domain -credential-store-id csvlt_1234567890 -username user -password env://PASSWORD -domain domain`, + ` $ threshold credentials create username-password-domain -credential-store-id csvlt_1234567890 -username user -password env://PASSWORD -domain domain`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credentials update username-password-domain [options] [args]", + "Usage: threshold credentials update username-password-domain [options] [args]", "", " Update a username password domain credential given its ID. Example:", "", - ` $ boundary credentials update username-password-domain -id clvlt_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credentials update username-password-domain -id clvlt_1234567890 -name devops -description "For DevOps usage"`, "", "", }) diff --git a/internal/cmd/commands/credentialscmd/username-password_credentials.gen.go b/internal/cmd/commands/credentialscmd/username-password_credentials.gen.go index 2e649bd6f..ab74a2163 100644 --- a/internal/cmd/commands/credentialscmd/username-password_credentials.gen.go +++ b/internal/cmd/commands/credentialscmd/username-password_credentials.gen.go @@ -137,7 +137,7 @@ func (c *UsernamePasswordCommand) Run(args []string) int { case "create": if c.FlagCredentialStoreId == "" { - c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or BOUNDARY_CREDENTIAL_STORE_ID")) + c.PrintCliError(errors.New("CredentialStore ID must be passed in via -credential-store-id or THRESHOLD_CREDENTIAL_STORE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentialscmd/username-password_funcs.go b/internal/cmd/commands/credentialscmd/username-password_funcs.go index 76255769d..1df4e5b4e 100644 --- a/internal/cmd/commands/credentialscmd/username-password_funcs.go +++ b/internal/cmd/commands/credentialscmd/username-password_funcs.go @@ -85,22 +85,22 @@ func (c *UsernamePasswordCommand) extraUsernamePasswordHelpFunc(_ map[string]fun switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credentials create username-password -credential-store-id [options] [args]", + "Usage: threshold credentials create username-password -credential-store-id [options] [args]", "", " Create a username password credential. Example:", "", - ` $ boundary credentials create username-password -credential-store-id csvlt_1234567890 -username user -password pass`, + ` $ threshold credentials create username-password -credential-store-id csvlt_1234567890 -username user -password pass`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credentials update username-password [options] [args]", + "Usage: threshold credentials update username-password [options] [args]", "", " Update a username password credential given its ID. Example:", "", - ` $ boundary credentials update username-password -id clvlt_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credentials update username-password -id clvlt_1234567890 -name devops -description "For DevOps usage"`, "", "", }) diff --git a/internal/cmd/commands/credentialstorescmd/credentialstores.gen.go b/internal/cmd/commands/credentialstorescmd/credentialstores.gen.go index 022e4561b..ebe922030 100644 --- a/internal/cmd/commands/credentialstorescmd/credentialstores.gen.go +++ b/internal/cmd/commands/credentialstorescmd/credentialstores.gen.go @@ -151,7 +151,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentialstorescmd/funcs.go b/internal/cmd/commands/credentialstorescmd/funcs.go index 5017e1190..dedcb072e 100644 --- a/internal/cmd/commands/credentialstorescmd/funcs.go +++ b/internal/cmd/commands/credentialstorescmd/funcs.go @@ -18,45 +18,45 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary credential-stores [sub command] [options] [args]", + "Usage: threshold credential-stores [sub command] [options] [args]", "", - " This command allows operations on Boundary credential store resources. Example:", + " This command allows operations on Threshold credential store resources. Example:", "", " Read a credential store:", "", - ` $ boundary credential-stores read -id csvlt_1234567890`, + ` $ threshold credential-stores read -id csvlt_1234567890`, "", " Please see the credential-stores subcommand help for detailed usage information.", }) case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-stores create [type] [sub command] [options] [args]", + "Usage: threshold credential-stores create [type] [sub command] [options] [args]", "", - " This command allows create operations on Boundary credential store resources. Example:", + " This command allows create operations on Threshold credential store resources. Example:", "", " Create a vault-type credential store:", "", - ` $ boundary credential-stores create vault -scope-id p_1234567890 -vault-address "http://localhost:8200" -vault-token "s.s0m3t0k3n"`, + ` $ threshold credential-stores create vault -scope-id p_1234567890 -vault-address "http://localhost:8200" -vault-token "s.s0m3t0k3n"`, "", " Create a static-type credential store:", "", - ` $ boundary credential-stores create static -scope-id p_1234567890`, + ` $ threshold credential-stores create static -scope-id p_1234567890`, "", " Please see the typed subcommand help for detailed usage information.", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-stores update [type] [sub command] [options] [args]", + "Usage: threshold credential-stores update [type] [sub command] [options] [args]", "", - " This command allows update operations on Boundary credential store resources. Example:", + " This command allows update operations on Threshold credential store resources. Example:", "", " Update a vault-type credential store:", "", - ` $ boundary credential-stores update vault -id csvlt_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credential-stores update vault -id csvlt_1234567890 -name devops -description "For DevOps usage"`, "", " Update a static-type credential store:", "", - ` $ boundary credential-stores update static -id cs_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credential-stores update static -id cs_1234567890 -name devops -description "For DevOps usage"`, "", " Please see the typed subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/credentialstorescmd/static_credentialstores.gen.go b/internal/cmd/commands/credentialstorescmd/static_credentialstores.gen.go index 2111597fd..c0448670d 100644 --- a/internal/cmd/commands/credentialstorescmd/static_credentialstores.gen.go +++ b/internal/cmd/commands/credentialstorescmd/static_credentialstores.gen.go @@ -135,7 +135,7 @@ func (c *StaticCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentialstorescmd/static_funcs.go b/internal/cmd/commands/credentialstorescmd/static_funcs.go index bf2f61351..331483a9d 100644 --- a/internal/cmd/commands/credentialstorescmd/static_funcs.go +++ b/internal/cmd/commands/credentialstorescmd/static_funcs.go @@ -12,22 +12,22 @@ func (c *StaticCommand) extraStaticHelpFunc(helpMap map[string]func() string) st switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-stores create static [options] [args]", + "Usage: threshold credential-stores create static [options] [args]", "", " Create a static-type credential store. Example:", "", - ` $ boundary credential-stores create static -scope-id p_1234567890`, + ` $ threshold credential-stores create static -scope-id p_1234567890`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-stores update static [options] [args]", + "Usage: threshold credential-stores update static [options] [args]", "", " Update a static-type credential store given its ID. Example:", "", - ` $ boundary credential-stores update static -name devops -description "For DevOps usage"`, + ` $ threshold credential-stores update static -name devops -description "For DevOps usage"`, "", "", }) diff --git a/internal/cmd/commands/credentialstorescmd/vault_credentialstores.gen.go b/internal/cmd/commands/credentialstorescmd/vault_credentialstores.gen.go index f573da1cd..77346bf35 100644 --- a/internal/cmd/commands/credentialstorescmd/vault_credentialstores.gen.go +++ b/internal/cmd/commands/credentialstorescmd/vault_credentialstores.gen.go @@ -137,7 +137,7 @@ func (c *VaultCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/credentialstorescmd/vault_funcs.go b/internal/cmd/commands/credentialstorescmd/vault_funcs.go index b7f93bb56..ccc8f6cd1 100644 --- a/internal/cmd/commands/credentialstorescmd/vault_funcs.go +++ b/internal/cmd/commands/credentialstorescmd/vault_funcs.go @@ -99,19 +99,19 @@ func extraVaultFlagsFuncImpl(c *VaultCommand, set *base.FlagSets, _ *base.FlagSe f.StringVar(&base.StringVar{ Name: vaultTokenFlagName, Target: &c.flagVaultToken, - Usage: "The vault token to use when boundary connects to vault for this store.", + Usage: "The vault token to use when threshold connects to vault for this store.", }) case clientCertificateFlagName: f.StringVar(&base.StringVar{ Name: clientCertificateFlagName, Target: &c.flagClientCert, - Usage: "The client certificate to use when boundary connects to vault for this store. This can be the value itself, refer to a file on disk (file://) from which the value will be read, or an env var (env://) from which the value will be read.", + Usage: "The client certificate to use when threshold connects to vault for this store. This can be the value itself, refer to a file on disk (file://) from which the value will be read, or an env var (env://) from which the value will be read.", }) case clientCertificateKeyFlagName: f.StringVar(&base.StringVar{ Name: clientCertificateKeyFlagName, Target: &c.flagClientCertKey, - Usage: `The client certificate's private key to use when boundary connects to vault for this store. This can be the value itself, refer to a file on disk (file://) from which the value will be read, or an env var (env://) from which the value will be read.`, + Usage: `The client certificate's private key to use when threshold connects to vault for this store. This can be the value itself, refer to a file on disk (file://) from which the value will be read, or an env var (env://) from which the value will be read.`, }) case workerFilterFlagName: f.StringVar(&base.StringVar{ @@ -188,22 +188,22 @@ func (c *VaultCommand) extraVaultHelpFunc(helpMap map[string]func() string) stri switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-stores create vault [options] [args]", + "Usage: threshold credential-stores create vault [options] [args]", "", " Create a vault-type credential store. Example:", "", - ` $ boundary credential-stores create vault -vault-address "http://localhost:8200" -vault-token "s.s0m3t0k3n"`, + ` $ threshold credential-stores create vault -vault-address "http://localhost:8200" -vault-token "s.s0m3t0k3n"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary credential-stores update vault [options] [args]", + "Usage: threshold credential-stores update vault [options] [args]", "", " Update a vault-type credential store given its ID. Example:", "", - ` $ boundary credential-stores update vault -id csvlt_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold credential-stores update vault -id csvlt_1234567890 -name devops -description "For DevOps usage"`, "", "", }) diff --git a/internal/cmd/commands/database/database.go b/internal/cmd/commands/database/database.go index 0f150ad45..a53987042 100644 --- a/internal/cmd/commands/database/database.go +++ b/internal/cmd/commands/database/database.go @@ -19,18 +19,18 @@ type Command struct { } func (c *Command) Synopsis() string { - return "Manage Boundary's database" + return "Manage Threshold's database" } func (c *Command) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary database [sub command] [options] [args]", + "Usage: threshold database [sub command] [options] [args]", "", - " This command allows operations on Boundary's database. Example:", + " This command allows operations on Threshold's database. Example:", "", " Initialize the database:", "", - ` $ boundary database init`, + ` $ threshold database init`, "", " Please see the database subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/database/funcs.go b/internal/cmd/commands/database/funcs.go index 94f3995ba..442bbb8db 100644 --- a/internal/cmd/commands/database/funcs.go +++ b/internal/cmd/commands/database/funcs.go @@ -61,11 +61,11 @@ func migrateDatabase(ctx context.Context, ui cli.Ui, dialect, u string, initiali return unlock, 2 } if initialized && !st.Initialized { - ui.Output(base.WrapAtLength("Database has not been initialized. Please use 'boundary database init' to initialize the boundary database.")) + ui.Output(base.WrapAtLength("Database has not been initialized. Please use 'threshold database init' to initialize the threshold database.")) return unlock, -1 } if !initialized && st.Initialized { - ui.Output(base.WrapAtLength("Database has already been initialized. Please use 'boundary database migrate' for any upgrade needs.")) + ui.Output(base.WrapAtLength("Database has already been initialized. Please use 'threshold database migrate' for any upgrade needs.")) return unlock, -1 } repairLogs, err := man.ApplyMigrations(ctx) @@ -73,7 +73,7 @@ func migrateDatabase(ctx context.Context, ui cli.Ui, dialect, u string, initiali ui.Error(fmt.Errorf("Error running database migrations: %w", err).Error()) if checkErr, ok := err.(schema.MigrationCheckError); ok { ui.Error(fmt.Errorf("%s", strings.Join(checkErr.Problems, "\n")).Error()) - ui.Error(fmt.Sprintf("To automatically repair, use 'boundary database migrate -repair=%s:%d'. This will: %s", checkErr.Edition, checkErr.Version, checkErr.RepairDescription)) + ui.Error(fmt.Sprintf("To automatically repair, use 'threshold database migrate -repair=%s:%d'. This will: %s", checkErr.Edition, checkErr.Version, checkErr.RepairDescription)) } return unlock, 2 } diff --git a/internal/cmd/commands/database/funcs_test.go b/internal/cmd/commands/database/funcs_test.go index a621e0749..34b0ec34e 100644 --- a/internal/cmd/commands/database/funcs_test.go +++ b/internal/cmd/commands/database/funcs_test.go @@ -90,7 +90,7 @@ func TestMigrateDatabase(t *testing.T) { return u }, expectedCode: -1, - expectedOutput: "Database has already been initialized. Please use 'boundary database migrate'\nfor any upgrade needs.\n", + expectedOutput: "Database has already been initialized. Please use 'threshold database migrate'\nfor any upgrade needs.\n", }, { name: "old_version_table_used_intialized", @@ -130,7 +130,7 @@ func TestMigrateDatabase(t *testing.T) { return u }, expectedCode: -1, - expectedOutput: "Database has already been initialized. Please use 'boundary database migrate'\nfor any upgrade needs.\n", + expectedOutput: "Database has already been initialized. Please use 'threshold database migrate'\nfor any upgrade needs.\n", }, { name: "bad_url_initialized", diff --git a/internal/cmd/commands/database/init.go b/internal/cmd/commands/database/init.go index b693ee199..48cd88310 100644 --- a/internal/cmd/commands/database/init.go +++ b/internal/cmd/commands/database/init.go @@ -49,16 +49,16 @@ type InitCommand struct { } func (c *InitCommand) Synopsis() string { - return "Initialize Boundary's database" + return "Initialize Threshold's database" } func (c *InitCommand) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary database init [options]", + "Usage: threshold database init [options]", "", - " Initialize Boundary's database:", + " Initialize Threshold's database:", "", - " $ boundary database init -config=/etc/boundary/controller.hcl", + " $ threshold database init -config=/etc/threshold/controller.hcl", "", " Unless told not to via flags, some initial resources will be created, in the following order and in the indicated scopes:", "", @@ -99,13 +99,13 @@ func (c *InitCommand) Flags() *base.FlagSets { complete.PredictFiles("*.hcl"), complete.PredictFiles("*.json"), ), - Usage: `Path to a configuration file containing a "kms" block marked for "config" purpose, to perform decryption of the main configuration file. If not set, will look for such a block in the main configuration file, which has some drawbacks; see the help output for "boundary config encrypt -h" for details.`, + Usage: `Path to a configuration file containing a "kms" block marked for "config" purpose, to perform decryption of the main configuration file. If not set, will look for such a block in the main configuration file, which has some drawbacks; see the help output for "threshold config encrypt -h" for details.`, }) f.StringVar(&base.StringVar{ Name: flagLogLevelName, Target: &c.initFlags.flagLogLevel, - EnvVar: "BOUNDARY_LOG_LEVEL", + EnvVar: "THRESHOLD_LOG_LEVEL", Completion: complete.PredictSet("trace", "debug", "info", "warn", "err"), Usage: "Log verbosity level. Supported values (in order of more detail to less) are " + "\"trace\", \"debug\", \"info\", \"warn\", and \"err\".", @@ -221,14 +221,14 @@ func (c *InitCommand) Run(args []string) (retCode int) { } // If mlockall(2) isn't supported, show a warning. We disable this in dev - // because it is quite scary to see when first using Boundary. We also disable + // because it is quite scary to see when first using Threshold. We also disable // this if the user has explicitly disabled mlock in configuration. if !c.Config.DisableMlock && !mlock.Supported() { c.UI.Warn(base.WrapAtLength( "WARNING! mlock is not supported on this system! An mlockall(2)-like " + "syscall to prevent memory from being swapped to disk is not " + - "supported on this system. For better security, only run Boundary on " + - "systems where this call is supported. If you are running Boundary" + + "supported on this system. For better security, only run Threshold on " + + "systems where this call is supported. If you are running Threshold" + "in a Docker container, provide the IPC_LOCK cap to the container.")) } diff --git a/internal/cmd/commands/database/migrate.go b/internal/cmd/commands/database/migrate.go index 3bd22bc44..656d2da21 100644 --- a/internal/cmd/commands/database/migrate.go +++ b/internal/cmd/commands/database/migrate.go @@ -55,16 +55,16 @@ type MigrateCommand struct { } func (c *MigrateCommand) Synopsis() string { - return "Migrate Boundary's database to the most recent schema supported by this binary." + return "Migrate Threshold's database to the most recent schema supported by this binary." } func (c *MigrateCommand) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary database migrate [options]", + "Usage: threshold database migrate [options]", "", - " Migrate Boundary's database:", + " Migrate Threshold's database:", "", - " $ boundary database migrate -config=/etc/boundary/controller.hcl", + " $ threshold database migrate -config=/etc/threshold/controller.hcl", "", " For a full list of examples, please see the documentation.", }) + c.Flags().Help() @@ -92,13 +92,13 @@ func (c *MigrateCommand) Flags() *base.FlagSets { complete.PredictFiles("*.hcl"), complete.PredictFiles("*.json"), ), - Usage: `Path to a configuration file containing a "kms" block marked for "config" purpose, to perform decryption of the main configuration file. If not set, will look for such a block in the main configuration file, which has some drawbacks; see the help output for "boundary config encrypt -h" for details.`, + Usage: `Path to a configuration file containing a "kms" block marked for "config" purpose, to perform decryption of the main configuration file. If not set, will look for such a block in the main configuration file, which has some drawbacks; see the help output for "threshold config encrypt -h" for details.`, }) f.StringVar(&base.StringVar{ Name: "log-level", Target: &c.flagLogLevel, - EnvVar: "BOUNDARY_LOG_LEVEL", + EnvVar: "THRESHOLD_LOG_LEVEL", Completion: complete.PredictSet("trace", "debug", "info", "warn", "err"), Usage: "Log verbosity level. Supported values (in order of more detail to less) are " + "\"trace\", \"debug\", \"info\", \"warn\", and \"err\".", @@ -199,7 +199,7 @@ func (c *MigrateCommand) Run(args []string) (retCode int) { "encountered an error. The ability to run plugins will eventually " + "become mandatory (for instance, for KMS implementations), so we are " + "ensuring that it's feasible on a given system before migrating the " + - "database to the new version of Boundary that requires this capability. " + + "database to the new version of Threshold that requires this capability. " + "If your temporary directory is not writable and/or you cannot execute " + "binaries in that directory, try setting the field " + `"execution_dir" in the "plugins" block in the configuration file:`)) @@ -221,14 +221,14 @@ plugins { } // If mlockall(2) isn't supported, show a warning. We disable this in dev - // because it is quite scary to see when first using Boundary. We also disable + // because it is quite scary to see when first using Threshold. We also disable // this if the user has explicitly disabled mlock in configuration. if !c.Config.DisableMlock && !mlock.Supported() { c.UI.Warn(base.WrapAtLength( "WARNING! mlock is not supported on this system! An mlockall(2)-like " + "syscall to prevent memory from being swapped to disk is not " + - "supported on this system. For better security, only run Boundary on " + - "systems where this call is supported. If you are running Boundary " + + "supported on this system. For better security, only run Threshold on " + + "systems where this call is supported. If you are running Threshold " + "in a Docker container, provide the IPC_LOCK cap to the container.")) } diff --git a/internal/cmd/commands/dev/dev.go b/internal/cmd/commands/dev/dev.go index f75789d99..f48dbfd3a 100644 --- a/internal/cmd/commands/dev/dev.go +++ b/internal/cmd/commands/dev/dev.go @@ -120,16 +120,16 @@ type Command struct { } func (c *Command) Synopsis() string { - return "Start a Boundary dev environment" + return "Start a Threshold dev environment" } func (c *Command) Help() string { helpText := ` -Usage: boundary dev [options] +Usage: threshold dev [options] Start a dev environment: - $ boundary dev + $ threshold dev For a full list of examples, please see the documentation. @@ -145,7 +145,7 @@ func (c *Command) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "log-level", Target: &c.flagLogLevel, - EnvVar: "BOUNDARY_LOG_LEVEL", + EnvVar: "THRESHOLD_LOG_LEVEL", Completion: complete.PredictSet("trace", "debug", "info", "warn", "err"), Usage: "Log verbosity level. Supported values (in order of more detail to less) are " + "\"trace\", \"debug\", \"info\", \"warn\", and \"err\".", @@ -162,23 +162,23 @@ func (c *Command) Flags() *base.FlagSets { Name: "id-suffix", Target: &c.flagIdSuffix, Default: "1234567890", - EnvVar: "BOUNDARY_DEV_ID_SUFFIX", - Usage: `If set, auto-created resources will use this value for their identifier (along with their resource-specific prefix). Must be 10 alphanumeric characters. As an example, if this is set to "1234567890", the generated password auth method ID will be "ampw_1234567890", the generated TCP target ID will be "ttcp_1234567890", and so on. Must be different from -secondary-id-suffix (BOUNDARY_DEV_SECONDARY_ID_SUFFIX).`, + EnvVar: "THRESHOLD_DEV_ID_SUFFIX", + Usage: `If set, auto-created resources will use this value for their identifier (along with their resource-specific prefix). Must be 10 alphanumeric characters. As an example, if this is set to "1234567890", the generated password auth method ID will be "ampw_1234567890", the generated TCP target ID will be "ttcp_1234567890", and so on. Must be different from -secondary-id-suffix (THRESHOLD_DEV_SECONDARY_ID_SUFFIX).`, }) f.StringVar(&base.StringVar{ Name: "secondary-id-suffix", Target: &c.flagSecondaryIdSuffix, Default: "0987654321", - EnvVar: "BOUNDARY_DEV_SECONDARY_ID_SUFFIX", - Usage: `If set, secondary auto-created resources will use this value for their identifier (along with their resource-specific prefix). Must be 10 alphanumeric characters. Currently only used for the target resource. Must be different from -id-suffix (BOUNDARY_DEV_ID_SUFFIX).`, + EnvVar: "THRESHOLD_DEV_SECONDARY_ID_SUFFIX", + Usage: `If set, secondary auto-created resources will use this value for their identifier (along with their resource-specific prefix). Must be 10 alphanumeric characters. Currently only used for the target resource. Must be different from -id-suffix (THRESHOLD_DEV_ID_SUFFIX).`, }) f.StringVar(&base.StringVar{ Name: "password", Target: &c.flagPassword, Default: "password", - EnvVar: "BOUNDARY_DEV_PASSWORD", + EnvVar: "THRESHOLD_DEV_PASSWORD", Usage: "Initial admin login password. If set to the empty string, one will be autogenerated.", }) @@ -186,7 +186,7 @@ func (c *Command) Flags() *base.FlagSets { Name: "login-name", Target: &c.flagLoginName, Default: "admin", - EnvVar: "BOUNDARY_DEV_LOGIN_NAME", + EnvVar: "THRESHOLD_DEV_LOGIN_NAME", Usage: "Initial admin login name. If set to the empty string, one will be autogenerated.", }) @@ -194,7 +194,7 @@ func (c *Command) Flags() *base.FlagSets { Name: "unprivileged-password", Target: &c.flagUnprivilegedPassword, Default: "password", - EnvVar: "BOUNDARY_DEV_UNPRIVILEGED_PASSWORD", + EnvVar: "THRESHOLD_DEV_UNPRIVILEGED_PASSWORD", Usage: "Initial unprivileged user login password. If set to the empty string, one will be autogenerated.", }) @@ -202,14 +202,14 @@ func (c *Command) Flags() *base.FlagSets { Name: "unprivileged-login-name", Target: &c.flagUnprivilegedLoginName, Default: "user", - EnvVar: "BOUNDARY_DEV_UNPRIVILEGED_LOGIN_NAME", + EnvVar: "THRESHOLD_DEV_UNPRIVILEGED_LOGIN_NAME", Usage: "Initial unprivileged user name. If set to the empty string, one will be autogenerated.", }) f.StringVar(&base.StringVar{ Name: "api-listen-address", Target: &c.flagControllerApiListenAddr, - EnvVar: "BOUNDARY_DEV_CONTROLLER_API_LISTEN_ADDRESS", + EnvVar: "THRESHOLD_DEV_CONTROLLER_API_LISTEN_ADDRESS", Usage: "Address to bind to for controller \"api\" purpose. If this begins with a forward slash, it will be assumed to be a Unix domain socket path.", }) @@ -217,7 +217,7 @@ func (c *Command) Flags() *base.FlagSets { Name: "host-address", Default: "localhost", Target: &c.flagHostAddress, - EnvVar: "BOUNDARY_DEV_HOST_ADDRESS", + EnvVar: "THRESHOLD_DEV_HOST_ADDRESS", Usage: "Address to use for the default host that is created. Must be a bare host or IP address, no port.", }) @@ -225,7 +225,7 @@ func (c *Command) Flags() *base.FlagSets { Name: "target-default-port", Default: 22, Target: &c.flagTargetDefaultPort, - EnvVar: "BOUNDARY_DEV_TARGET_DEFAULT_PORT", + EnvVar: "THRESHOLD_DEV_TARGET_DEFAULT_PORT", Usage: "Default port to use for the default target that is created.", }) @@ -233,34 +233,34 @@ func (c *Command) Flags() *base.FlagSets { Name: "target-session-connection-limit", Target: &c.flagTargetSessionConnectionLimit, Default: -1, - EnvVar: "BOUNDARY_DEV_TARGET_SESSION_CONNECTION_LIMIT", + EnvVar: "THRESHOLD_DEV_TARGET_SESSION_CONNECTION_LIMIT", Usage: "Maximum number of connections per session to set on the default target. -1 means unlimited.", }) f.Int64Var(&base.Int64Var{ Name: "target-session-max-seconds", Target: &c.flagTargetSessionMaxSeconds, - EnvVar: "BOUNDARY_DEV_TARGET_SESSION_MAX_SECONDS", + EnvVar: "THRESHOLD_DEV_TARGET_SESSION_MAX_SECONDS", Usage: "Max seconds to use for sessions on the default target.", }) f.StringVar(&base.StringVar{ Name: "cluster-listen-address", Target: &c.flagControllerClusterListenAddr, - EnvVar: "BOUNDARY_DEV_CONTROLLER_CLUSTER_LISTEN_ADDRESS", + EnvVar: "THRESHOLD_DEV_CONTROLLER_CLUSTER_LISTEN_ADDRESS", Usage: "Address to bind to for controller \"cluster\" purpose. If this begins with a forward slash, it will be assumed to be a Unix domain socket path.", }) f.StringVar(&base.StringVar{ Name: "controller-public-cluster-address", Target: &c.flagControllerPublicClusterAddr, - EnvVar: "BOUNDARY_DEV_CONTROLLER_PUBLIC_CLUSTER_ADDRESS", + EnvVar: "THRESHOLD_DEV_CONTROLLER_PUBLIC_CLUSTER_ADDRESS", Usage: "Public address at which the controller is reachable for cluster tasks (like worker connections).", }) f.StringVar(&base.StringVar{ Name: "ops-listen-address", Target: &c.flagOpsListenAddr, - EnvVar: "BOUNDARY_DEV_OPS_LISTEN_ADDRESS", + EnvVar: "THRESHOLD_DEV_OPS_LISTEN_ADDRESS", Usage: "Address to bind to for \"ops\" purpose. If this begins with a forward slash, it will be assumed to be a Unix domain socket path.", }) @@ -280,28 +280,28 @@ func (c *Command) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "proxy-listen-address", Target: &c.flagWorkerProxyListenAddr, - EnvVar: "BOUNDARY_DEV_WORKER_PROXY_LISTEN_ADDRESS", + EnvVar: "THRESHOLD_DEV_WORKER_PROXY_LISTEN_ADDRESS", Usage: "Address to bind to for worker \"proxy\" purpose.", }) f.StringVar(&base.StringVar{ Name: "worker-public-address", Target: &c.flagWorkerPublicAddr, - EnvVar: "BOUNDARY_DEV_WORKER_PUBLIC_ADDRESS", + EnvVar: "THRESHOLD_DEV_WORKER_PUBLIC_ADDRESS", Usage: "Public address at which the worker is reachable for session proxying.", }) f.StringVar(&base.StringVar{ Name: "worker-auth-key", Target: &c.flagWorkerAuthKey, - EnvVar: "BOUNDARY_DEV_WORKER_AUTH_KEY", + EnvVar: "THRESHOLD_DEV_WORKER_AUTH_KEY", Usage: "If set, a valid base64-encoded AES key to be used for worker-auth purposes", }) f.StringVar(&base.StringVar{ Name: "bsr-key", Target: &c.flagBsrKey, - EnvVar: "BOUNDARY_DEV_BSR_KEY", + EnvVar: "THRESHOLD_DEV_BSR_KEY", Usage: "If set, a valid base64-encoded AES key to be used for bsr purposes", }) @@ -320,14 +320,14 @@ func (c *Command) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "ui-passthrough-dir", Target: &c.flagUiPassthroughDir, - EnvVar: "BOUNDARY_DEV_UI_PASSTHROUGH_DIR", + EnvVar: "THRESHOLD_DEV_UI_PASSTHROUGH_DIR", Usage: "Enables a passthrough directory in the webserver at /", }) f.StringVar(&base.StringVar{ Name: "recovery-key", Target: &c.flagRecoveryKey, - EnvVar: "BOUNDARY_DEV_RECOVERY_KEY", + EnvVar: "THRESHOLD_DEV_RECOVERY_KEY", Usage: "Specifies the base64'd 256-bit AES key to use for recovery operations", }) @@ -385,8 +385,8 @@ func (c *Command) Flags() *base.FlagSets { f.StringVar(&base.StringVar{ Name: "plugin-execution-dir", Target: &c.flagPluginExecutionDir, - EnvVar: "BOUNDARY_DEV_PLUGIN_EXECUTION_DIR", - Usage: "Specifies where Boundary should write plugins that it is executing; if not set defaults to system temp directory.", + EnvVar: "THRESHOLD_DEV_PLUGIN_EXECUTION_DIR", + Usage: "Specifies where Threshold should write plugins that it is executing; if not set defaults to system temp directory.", }) f.BoolVar(&base.BoolVar{ Name: "skip-plugins", @@ -1059,10 +1059,10 @@ func (c *Command) Run(args []string) int { } if !c.flagControllerOnly { - c.UI.Output("==> Boundary dev environment graceful shutdown triggered, interrupt again to enter shutdown") + c.UI.Output("==> Threshold dev environment graceful shutdown triggered, interrupt again to enter shutdown") workerGracefulShutdownFunc() } else { - c.UI.Output("==> Boundary dev shutdown triggered, interrupt again to force") + c.UI.Output("==> Threshold dev shutdown triggered, interrupt again to force") } controllerOnce.Do(controllerShutdownFunc) @@ -1096,7 +1096,7 @@ func (c *Command) Run(args []string) int { for !errorEncountered.Load() && !shutdownCompleted.Load() { select { case <-c.ServerSideShutdownCh: - c.UI.Output("==> Boundary dev environment self-terminating") + c.UI.Output("==> Threshold dev environment self-terminating") shutdownTriggerCount++ runShutdownLogic() @@ -1105,7 +1105,7 @@ func (c *Command) Run(args []string) int { runShutdownLogic() case <-c.SighupCh: - c.UI.Output("==> Boundary dev environment does not support configuration reloading, taking no action") + c.UI.Output("==> Threshold dev environment does not support configuration reloading, taking no action") case <-c.SigUSR2Ch: buf := make([]byte, 32*1024*1024) diff --git a/internal/cmd/commands/genericcmd/generic.go b/internal/cmd/commands/genericcmd/generic.go index 24e5eebfb..cfed6976e 100644 --- a/internal/cmd/commands/genericcmd/generic.go +++ b/internal/cmd/commands/genericcmd/generic.go @@ -28,7 +28,7 @@ func (c *Command) Help() string { aAn = "an" } return base.WrapForHelpText([]string{ - fmt.Sprintf("Usage: boundary %s [resource ID] [args]", c.Func), + fmt.Sprintf("Usage: threshold %s [resource ID] [args]", c.Func), "", fmt.Sprintf(" This command runs %s %s command against the given resource ID. Arguments are the same as the type-specific command.", aAn, c.Func), "", diff --git a/internal/cmd/commands/groupscmd/funcs.go b/internal/cmd/commands/groupscmd/funcs.go index bd2293986..23cd02200 100644 --- a/internal/cmd/commands/groupscmd/funcs.go +++ b/internal/cmd/commands/groupscmd/funcs.go @@ -61,33 +61,33 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { case "add-members": return base.WrapForHelpText([]string{ - "Usage: boundary groups add-members [options] [args]", + "Usage: threshold groups add-members [options] [args]", "", ` Adds members (users) to a group given its ID. The "member" flag can be specified multiple times. Example:`, "", - ` $ boundary groups add-members -id g_1234567890 -member u_1234567890`, + ` $ threshold groups add-members -id g_1234567890 -member u_1234567890`, "", "", }) case "set-members": return base.WrapForHelpText([]string{ - "Usage: boundary groups set-members [options] [args]", + "Usage: threshold groups set-members [options] [args]", "", ` Sets the complete set of members (users) on a group given its ID. The "member" flag can be specified multiple times. Example:`, "", - ` $ boundary groups set-principals -id g_1234567890 -member u_anon -member u_1234567890`, + ` $ threshold groups set-principals -id g_1234567890 -member u_anon -member u_1234567890`, "", "", }) case "remove-members": return base.WrapForHelpText([]string{ - "Usage: boundary groups remove-members [options] [args]", + "Usage: threshold groups remove-members [options] [args]", "", ` Removes members (users) from a group given its ID. The "member" flag can be specified multiple times. Example:`, "", - ` $ boundary groups remove-members -id g_1234567890 -member u_1234567890`, + ` $ threshold groups remove-members -id g_1234567890 -member u_1234567890`, "", "", }) diff --git a/internal/cmd/commands/groupscmd/groups.gen.go b/internal/cmd/commands/groupscmd/groups.gen.go index c5bbacc2e..365488de9 100644 --- a/internal/cmd/commands/groupscmd/groups.gen.go +++ b/internal/cmd/commands/groupscmd/groups.gen.go @@ -157,13 +157,13 @@ func (c *Command) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/hostcatalogscmd/funcs.go b/internal/cmd/commands/hostcatalogscmd/funcs.go index 68f7640e2..778c4810b 100644 --- a/internal/cmd/commands/hostcatalogscmd/funcs.go +++ b/internal/cmd/commands/hostcatalogscmd/funcs.go @@ -18,37 +18,37 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary host-catalogs [sub command] [options] [args]", + "Usage: threshold host-catalogs [sub command] [options] [args]", "", - " This command allows operations on Boundary host catalog resources. Example:", + " This command allows operations on Threshold host catalog resources. Example:", "", " Read a host catalog:", "", - ` $ boundary host-catalogs read -id hcst_1234567890`, + ` $ threshold host-catalogs read -id hcst_1234567890`, "", " Please see the host-catalogs subcommand help for detailed usage information.", }) case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-catalogs create [type] [sub command] [options] [args]", + "Usage: threshold host-catalogs create [type] [sub command] [options] [args]", "", - " This command allows create operations on Boundary host catalog resources. Example:", + " This command allows create operations on Threshold host catalog resources. Example:", "", " Create a static-type host catalog:", "", - ` $ boundary host-catalogs create static -name prodops -description "For ProdOps usage"`, + ` $ threshold host-catalogs create static -name prodops -description "For ProdOps usage"`, "", " Please see the typed subcommand help for detailed usage information.", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-catalogs update [type] [sub command] [options] [args]", + "Usage: threshold host-catalogs update [type] [sub command] [options] [args]", "", - " This command allows update operations on Boundary host catalog resources. Example:", + " This command allows update operations on Threshold host catalog resources. Example:", "", " Update a static-type host catalog:", "", - ` $ boundary host-catalogs update static -id hcst_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold host-catalogs update static -id hcst_1234567890 -name devops -description "For DevOps usage"`, "", " Please see the typed subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/hostcatalogscmd/hostcatalogs.gen.go b/internal/cmd/commands/hostcatalogscmd/hostcatalogs.gen.go index 198abf53d..da658ef14 100644 --- a/internal/cmd/commands/hostcatalogscmd/hostcatalogs.gen.go +++ b/internal/cmd/commands/hostcatalogscmd/hostcatalogs.gen.go @@ -151,7 +151,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/hostcatalogscmd/plugin_funcs.go b/internal/cmd/commands/hostcatalogscmd/plugin_funcs.go index fbe85d0f4..2b85cdb0c 100644 --- a/internal/cmd/commands/hostcatalogscmd/plugin_funcs.go +++ b/internal/cmd/commands/hostcatalogscmd/plugin_funcs.go @@ -71,22 +71,22 @@ func (c *PluginCommand) extraPluginHelpFunc(helpMap map[string]func() string) st switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-catalogs create plugin [options] [args]", + "Usage: threshold host-catalogs create plugin [options] [args]", "", " Create a plugin-type host catalog. Example:", "", - ` $ boundary host-catalogs create plugin -scope-id p_1234567890 -name prodops -description "Plugin host-catalog for ProdOps"`, + ` $ threshold host-catalogs create plugin -scope-id p_1234567890 -name prodops -description "Plugin host-catalog for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-catalogs update plugin [options] [args]", + "Usage: threshold host-catalogs update plugin [options] [args]", "", " Update a plugin-type host catalog given its ID. Example:", "", - ` $ boundary host-catalogs update plugin -id hc_1234567890 -name "devops" -description "Plugin host-catalog for DevOps"`, + ` $ threshold host-catalogs update plugin -id hc_1234567890 -name "devops" -description "Plugin host-catalog for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/hostcatalogscmd/plugin_hostcatalogs.gen.go b/internal/cmd/commands/hostcatalogscmd/plugin_hostcatalogs.gen.go index 69c1e265c..ea3b330f2 100644 --- a/internal/cmd/commands/hostcatalogscmd/plugin_hostcatalogs.gen.go +++ b/internal/cmd/commands/hostcatalogscmd/plugin_hostcatalogs.gen.go @@ -169,7 +169,7 @@ func (c *PluginCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/hostcatalogscmd/static_funcs.go b/internal/cmd/commands/hostcatalogscmd/static_funcs.go index 1e0a38272..611c4cfe3 100644 --- a/internal/cmd/commands/hostcatalogscmd/static_funcs.go +++ b/internal/cmd/commands/hostcatalogscmd/static_funcs.go @@ -12,22 +12,22 @@ func (c *StaticCommand) extraStaticHelpFunc(helpMap map[string]func() string) st switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-catalogs create static [options] [args]", + "Usage: threshold host-catalogs create static [options] [args]", "", " Create a static-type host catalog. Example:", "", - ` $ boundary host-catalogs create static -scope-id p_1234567890 -name prodops -description "Static host-catalog for ProdOps"`, + ` $ threshold host-catalogs create static -scope-id p_1234567890 -name prodops -description "Static host-catalog for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-catalogs update static [options] [args]", + "Usage: threshold host-catalogs update static [options] [args]", "", " Update a static-type host catalog given its ID. Example:", "", - ` $ boundary host-catalogs update static -id hcst_1234567890 -name "devops" -description "Static host-catalog for DevOps"`, + ` $ threshold host-catalogs update static -id hcst_1234567890 -name "devops" -description "Static host-catalog for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/hostcatalogscmd/static_hostcatalogs.gen.go b/internal/cmd/commands/hostcatalogscmd/static_hostcatalogs.gen.go index 841202bde..5b86d48ff 100644 --- a/internal/cmd/commands/hostcatalogscmd/static_hostcatalogs.gen.go +++ b/internal/cmd/commands/hostcatalogscmd/static_hostcatalogs.gen.go @@ -135,7 +135,7 @@ func (c *StaticCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/hostscmd/funcs.go b/internal/cmd/commands/hostscmd/funcs.go index a6425dba5..be4edddf3 100644 --- a/internal/cmd/commands/hostscmd/funcs.go +++ b/internal/cmd/commands/hostscmd/funcs.go @@ -17,37 +17,37 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary hosts [sub command] [options] [args]", + "Usage: threshold hosts [sub command] [options] [args]", "", - " This command allows operations on Boundary host resources. Example:", + " This command allows operations on Threshold host resources. Example:", "", " Read a host:", "", - ` $ boundary hosts read -id hst_1234567890`, + ` $ threshold hosts read -id hst_1234567890`, "", " Please see the hosts subcommand help for detailed usage information.", }) case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary hosts create [type] [sub command] [options] [args]", + "Usage: threshold hosts create [type] [sub command] [options] [args]", "", - " This command allows create operations on Boundary host resources. Example:", + " This command allows create operations on Threshold host resources. Example:", "", " Create a static-type host:", "", - ` $ boundary hosts create static -name prodops -description "For ProdOps usage"`, + ` $ threshold hosts create static -name prodops -description "For ProdOps usage"`, "", " Please see the typed subcommand help for detailed usage information.", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary hosts update [type] [sub command] [options] [args]", + "Usage: threshold hosts update [type] [sub command] [options] [args]", "", - " This command allows update operations on Boundary host resources. Example:", + " This command allows update operations on Threshold host resources. Example:", "", " Update a static-type host:", "", - ` $ boundary hosts update static -id hst_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold hosts update static -id hst_1234567890 -name devops -description "For DevOps usage"`, "", " Please see the typed subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/hostscmd/hosts.gen.go b/internal/cmd/commands/hostscmd/hosts.gen.go index 8186276d7..b05a4eac1 100644 --- a/internal/cmd/commands/hostscmd/hosts.gen.go +++ b/internal/cmd/commands/hostscmd/hosts.gen.go @@ -151,7 +151,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagHostCatalogId == "" { - c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or BOUNDARY_HOST_CATALOG_ID")) + c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or THRESHOLD_HOST_CATALOG_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/hostscmd/static_funcs.go b/internal/cmd/commands/hostscmd/static_funcs.go index 97568189e..b13039ec5 100644 --- a/internal/cmd/commands/hostscmd/static_funcs.go +++ b/internal/cmd/commands/hostscmd/static_funcs.go @@ -30,22 +30,22 @@ func (c *StaticCommand) extraStaticHelpFunc(helpMap map[string]func() string) st switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary hosts create static [options] [args]", + "Usage: threshold hosts create static [options] [args]", "", " Create a static-type host. Example:", "", - ` $ boundary hosts create static -name prodops -description "Static host for ProdOps" -address "127.0.0.1"`, + ` $ threshold hosts create static -name prodops -description "Static host for ProdOps" -address "127.0.0.1"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary hosts update static [options] [args]", + "Usage: threshold hosts update static [options] [args]", "", " Update a static-type host given its ID. Example:", "", - ` $ boundary hosts update static -id hst_1234567890 -name "devops" -description "Static host for DevOps" -address "10.20.30.40"`, + ` $ threshold hosts update static -id hst_1234567890 -name "devops" -description "Static host for DevOps" -address "10.20.30.40"`, "", "", }) diff --git a/internal/cmd/commands/hostscmd/static_hosts.gen.go b/internal/cmd/commands/hostscmd/static_hosts.gen.go index 63f3933da..1459a1290 100644 --- a/internal/cmd/commands/hostscmd/static_hosts.gen.go +++ b/internal/cmd/commands/hostscmd/static_hosts.gen.go @@ -137,7 +137,7 @@ func (c *StaticCommand) Run(args []string) int { case "create": if c.FlagHostCatalogId == "" { - c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or BOUNDARY_HOST_CATALOG_ID")) + c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or THRESHOLD_HOST_CATALOG_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/hostsetscmd/funcs.go b/internal/cmd/commands/hostsetscmd/funcs.go index 4f7effac8..ee0e146bc 100644 --- a/internal/cmd/commands/hostsetscmd/funcs.go +++ b/internal/cmd/commands/hostsetscmd/funcs.go @@ -51,73 +51,73 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary host-sets [sub command] [options] [args]", + "Usage: threshold host-sets [sub command] [options] [args]", "", - " This command allows operations on Boundary host set resources. Example:", + " This command allows operations on Threshold host set resources. Example:", "", " Read a host set:", "", - ` $ boundary host-sets read -id hsst_1234567890`, + ` $ threshold host-sets read -id hsst_1234567890`, "", " Please see the host-sets subcommand help for detailed usage information.", }) case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-sets create [type] [sub command] [options] [args]", + "Usage: threshold host-sets create [type] [sub command] [options] [args]", "", - " This command allows create operations on Boundary host set resources. Example:", + " This command allows create operations on Threshold host set resources. Example:", "", " Create a static-type host set:", "", - ` $ boundary host-sets create static -name prodops -description "For ProdOps usage"`, + ` $ threshold host-sets create static -name prodops -description "For ProdOps usage"`, "", " Please see the typed subcommand help for detailed usage information.", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-sets update [type] [sub command] [options] [args]", + "Usage: threshold host-sets update [type] [sub command] [options] [args]", "", - " This command allows update operations on Boundary host set resources. Example:", + " This command allows update operations on Threshold host set resources. Example:", "", " Update a static-type host set:", "", - ` $ boundary host-sets update static -id hsst_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold host-sets update static -id hsst_1234567890 -name devops -description "For DevOps usage"`, "", " Please see the typed subcommand help for detailed usage information.", }) case "add-hosts": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-sets add-hosts [sub command] [options] [args]", + "Usage: threshold host-sets add-hosts [sub command] [options] [args]", "", " This command allows adding hosts to host set resources, if the types match and the operation is allowed by the given host set type. Example:", "", " Add static-type hosts to a static-type host set:", "", - ` $ boundary host-sets add-hosts -id hsst_1234567890 -host hst_1234567890 -host hst_0987654321`, + ` $ threshold host-sets add-hosts -id hsst_1234567890 -host hst_1234567890 -host hst_0987654321`, "", "", }) case "remove-hosts": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-sets remove-hosts [sub command] [options] [args]", + "Usage: threshold host-sets remove-hosts [sub command] [options] [args]", "", " This command allows removing hosts from host set resources, if the types match and the operation is allowed by the given host set type. Example:", "", " Remove static-type hosts from a static-type host set:", "", - ` $ boundary host-sets remove-hosts -id hsst_1234567890 -host hst_0987654321`, + ` $ threshold host-sets remove-hosts -id hsst_1234567890 -host hst_0987654321`, "", "", }) case "set-hosts": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-sets set-hosts [sub command] [options] [args]", + "Usage: threshold host-sets set-hosts [sub command] [options] [args]", "", " This command allows setting the complete set of hosts on host set resources, if the types match and the operation is allowed by the given host set type. Example:", "", " Set the complete set of static-type hosts on a static-type host set:", "", - ` $ boundary host-sets remove-hosts -id hsst_1234567890 -host hst_1234567890`, + ` $ threshold host-sets remove-hosts -id hsst_1234567890 -host hst_1234567890`, "", "", }) diff --git a/internal/cmd/commands/hostsetscmd/hostsets.gen.go b/internal/cmd/commands/hostsetscmd/hostsets.gen.go index f5177616f..1747f692c 100644 --- a/internal/cmd/commands/hostsetscmd/hostsets.gen.go +++ b/internal/cmd/commands/hostsetscmd/hostsets.gen.go @@ -153,7 +153,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagHostCatalogId == "" { - c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or BOUNDARY_HOST_CATALOG_ID")) + c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or THRESHOLD_HOST_CATALOG_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/hostsetscmd/plugin_funcs.go b/internal/cmd/commands/hostsetscmd/plugin_funcs.go index 11c03f6d4..dbaa32328 100644 --- a/internal/cmd/commands/hostsetscmd/plugin_funcs.go +++ b/internal/cmd/commands/hostsetscmd/plugin_funcs.go @@ -35,22 +35,22 @@ func (c *PluginCommand) extraPluginHelpFunc(helpMap map[string]func() string) st switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-sets create plugin [options] [args]", + "Usage: threshold host-sets create plugin [options] [args]", "", " Create a host set of a type provided by a plugin. Example:", "", - ` $ boundary host-sets create plugin -host-catalog-id hcst_1234567890 -name prodops -description "Plugin host-set for ProdOps"`, + ` $ threshold host-sets create plugin -host-catalog-id hcst_1234567890 -name prodops -description "Plugin host-set for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-sets update plugin [options] [args]", + "Usage: threshold host-sets update plugin [options] [args]", "", " Update a host set of a type provided by a plugin given its ID. Example:", "", - ` $ boundary host-sets update plugin -id hsplg_1234567890 -name "devops" -description "Plugin host-set for DevOps"`, + ` $ threshold host-sets update plugin -id hsplg_1234567890 -name "devops" -description "Plugin host-set for DevOps"`, "", "", }) @@ -85,7 +85,7 @@ func extraPluginFlagsFuncImpl(c *PluginCommand, set *base.FlagSets, f *base.Flag "indicating the amount of time that should elapse between syncs of the host set. " + "The interval will be applied to the end of the previous sync operation, not the start. " + "Setting to any negative value will disable syncing for that host set; setting to null " + - "will cause the set to use Boundary's default. The default may change between releases.", + "will cause the set to use Threshold's default. The default may change between releases.", }) } } diff --git a/internal/cmd/commands/hostsetscmd/plugin_hostsets.gen.go b/internal/cmd/commands/hostsetscmd/plugin_hostsets.gen.go index b037b4482..933112bfd 100644 --- a/internal/cmd/commands/hostsetscmd/plugin_hostsets.gen.go +++ b/internal/cmd/commands/hostsetscmd/plugin_hostsets.gen.go @@ -153,7 +153,7 @@ func (c *PluginCommand) Run(args []string) int { case "create": if c.FlagHostCatalogId == "" { - c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or BOUNDARY_HOST_CATALOG_ID")) + c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or THRESHOLD_HOST_CATALOG_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/hostsetscmd/static_funcs.go b/internal/cmd/commands/hostsetscmd/static_funcs.go index 000dd6080..f56b43356 100644 --- a/internal/cmd/commands/hostsetscmd/static_funcs.go +++ b/internal/cmd/commands/hostsetscmd/static_funcs.go @@ -12,22 +12,22 @@ func (c *StaticCommand) extraStaticHelpFunc(helpMap map[string]func() string) st switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-sets create static [options] [args]", + "Usage: threshold host-sets create static [options] [args]", "", " Create a static-type host set. Example:", "", - ` $ boundary host-sets create static -name prodops -description "Static host-set for ProdOps"`, + ` $ threshold host-sets create static -name prodops -description "Static host-set for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary host-sets update static [options] [args]", + "Usage: threshold host-sets update static [options] [args]", "", " Update a static-type host set given its ID. Example:", "", - ` $ boundary host-sets update static -id hsst_1234567890 -name "devops" -description "Static host-set for DevOps"`, + ` $ threshold host-sets update static -id hsst_1234567890 -name "devops" -description "Static host-set for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/hostsetscmd/static_hostsets.gen.go b/internal/cmd/commands/hostsetscmd/static_hostsets.gen.go index 294818a6b..4033a5383 100644 --- a/internal/cmd/commands/hostsetscmd/static_hostsets.gen.go +++ b/internal/cmd/commands/hostsetscmd/static_hostsets.gen.go @@ -135,7 +135,7 @@ func (c *StaticCommand) Run(args []string) int { case "create": if c.FlagHostCatalogId == "" { - c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or BOUNDARY_HOST_CATALOG_ID")) + c.PrintCliError(errors.New("HostCatalog ID must be passed in via -host-catalog-id or THRESHOLD_HOST_CATALOG_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/logout/logout.go b/internal/cmd/commands/logout/logout.go index 62fbecaef..08a459f93 100644 --- a/internal/cmd/commands/logout/logout.go +++ b/internal/cmd/commands/logout/logout.go @@ -29,17 +29,17 @@ type LogoutCommand struct { } func (c *LogoutCommand) Synopsis() string { - return "Delete the current token within Boundary and forget it locally" + return "Delete the current token within Threshold and forget it locally" } func (c *LogoutCommand) Help() string { var args []string args = append(args, - "Usage: boundary logout [options]", + "Usage: threshold logout [options]", "", - " Delete the current token (as selected by -token-name) within Boundary and forget it from the local store. Example:", + " Delete the current token (as selected by -token-name) within Threshold and forget it from the local store. Example:", "", - ` $ boundary logout`, + ` $ threshold logout`, "", ) @@ -111,7 +111,7 @@ func (c *LogoutCommand) Run(args []string) (ret int) { authtokensClient := authtokens.NewClient(client) _, err = authtokensClient.Delete(c.Context, id) if apiErr := api.AsServerError(err); apiErr != nil && apiErr.Response().StatusCode() == http.StatusNotFound { - c.UI.Output("The token was not found on the Boundary controller; proceeding to delete from the local store.") + c.UI.Output("The token was not found on the Threshold controller; proceeding to delete from the local store.") goto DeleteLocal } if err != nil { @@ -123,7 +123,7 @@ func (c *LogoutCommand) Run(args []string) (ret int) { return base.CommandCliError } - c.UI.Output("The token was successfully deleted within the Boundary controller.") + c.UI.Output("The token was successfully deleted within the Threshold controller.") DeleteLocal: keyringType, tokenName, err := c.DiscoverKeyringTokenInfo() @@ -141,26 +141,36 @@ DeleteLocal: switch keyringType { case "wincred", "keychain": - if err := zkeyring.Delete(base.StoredTokenName, tokenName); err != nil { + // Remove both the current entry and the one written by upstream + // HashiCorp Boundary, if present. + err := zkeyring.Delete(base.StoredTokenName, tokenName) + legacyErr := zkeyring.Delete(base.LegacyStoredTokenName, tokenName) + if err != nil && legacyErr != nil { c.PrintCliError(fmt.Errorf("Error deleting auth token from %q keyring: %w", keyringType, err)) return base.CommandCliError } default: - krConfig := nkeyring.Config{ - LibSecretCollectionName: "login", - PassPrefix: "HashiCorp_Boundary", - AllowedBackends: []nkeyring.BackendType{nkeyring.BackendType(keyringType)}, + var removeErr, firstErr error + removed := false + for _, prefix := range []string{base.PassPrefix, base.LegacyPassPrefix} { + kr, err := nkeyring.Open(nkeyring.Config{ + LibSecretCollectionName: "login", + PassPrefix: prefix, + AllowedBackends: []nkeyring.BackendType{nkeyring.BackendType(keyringType)}, + }) + if err != nil { + c.PrintCliError(fmt.Errorf("Error opening %q keyring: %w", keyringType, err)) + return base.CommandCliError + } + if removeErr = kr.Remove(tokenName); removeErr == nil { + removed = true + } else if firstErr == nil { + firstErr = removeErr + } } - - kr, err := nkeyring.Open(krConfig) - if err != nil { - c.PrintCliError(fmt.Errorf("Error opening %q keyring: %w", keyringType, err)) - return base.CommandCliError - } - - if err := kr.Remove(tokenName); err != nil { - c.PrintCliError(fmt.Errorf("Error deleting token from %q keyring: %w", keyringType, err)) + if !removed { + c.PrintCliError(fmt.Errorf("Error deleting token from %q keyring: %w", keyringType, firstErr)) return base.CommandCliError } } diff --git a/internal/cmd/commands/managedgroupscmd/ldap_funcs.go b/internal/cmd/commands/managedgroupscmd/ldap_funcs.go index c041498c6..ad07b867e 100644 --- a/internal/cmd/commands/managedgroupscmd/ldap_funcs.go +++ b/internal/cmd/commands/managedgroupscmd/ldap_funcs.go @@ -36,22 +36,22 @@ func (c *LdapCommand) extraLdapHelpFunc(helpMap map[string]func() string) string switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary managed-groups create ldap [options] [args]", + "Usage: threshold managed-groups create ldap [options] [args]", "", " Create a ldap-type managed group. Example:", "", - ` $ boundary managed-groups create ldap -group-names admin -description "Ldap managed group for ProdOps"`, + ` $ threshold managed-groups create ldap -group-names admin -description "Ldap managed group for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary managed-groups update ldap [options] [args]", + "Usage: threshold managed-groups update ldap [options] [args]", "", " Update an ldap-type managed group given its ID. Example:", "", - ` $ boundary managed-groups update ldap -id acctldap_1234567890 -name "devops" -description "Ldap managed group for DevOps"`, + ` $ threshold managed-groups update ldap -id acctldap_1234567890 -name "devops" -description "Ldap managed group for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/managedgroupscmd/ldap_managedgroups.gen.go b/internal/cmd/commands/managedgroupscmd/ldap_managedgroups.gen.go index 4807153e2..79f9d134e 100644 --- a/internal/cmd/commands/managedgroupscmd/ldap_managedgroups.gen.go +++ b/internal/cmd/commands/managedgroupscmd/ldap_managedgroups.gen.go @@ -137,7 +137,7 @@ func (c *LdapCommand) Run(args []string) int { case "create": if c.FlagAuthMethodId == "" { - c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or BOUNDARY_AUTH_METHOD_ID")) + c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or THRESHOLD_AUTH_METHOD_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/managedgroupscmd/managedgroups.gen.go b/internal/cmd/commands/managedgroupscmd/managedgroups.gen.go index 1608eb887..0002eb26d 100644 --- a/internal/cmd/commands/managedgroupscmd/managedgroups.gen.go +++ b/internal/cmd/commands/managedgroupscmd/managedgroups.gen.go @@ -151,7 +151,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagAuthMethodId == "" { - c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or BOUNDARY_AUTH_METHOD_ID")) + c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or THRESHOLD_AUTH_METHOD_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/managedgroupscmd/oidc_funcs.go b/internal/cmd/commands/managedgroupscmd/oidc_funcs.go index 40fd9a983..b05a3a455 100644 --- a/internal/cmd/commands/managedgroupscmd/oidc_funcs.go +++ b/internal/cmd/commands/managedgroupscmd/oidc_funcs.go @@ -37,22 +37,22 @@ func (c *OidcCommand) extraOidcHelpFunc(helpMap map[string]func() string) string switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary managed-groups create oidc [options] [args]", + "Usage: threshold managed-groups create oidc [options] [args]", "", " Create a oidc-type managed group. Example:", "", - ` $ boundary managed-groups create oidc -filter '"/token/email" == "doe@example.com"' -description "Oidc managed group for ProdOps"`, + ` $ threshold managed-groups create oidc -filter '"/token/email" == "doe@example.com"' -description "Oidc managed group for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary managed-groups update oidc [options] [args]", + "Usage: threshold managed-groups update oidc [options] [args]", "", " Update a oidc-type managed group given its ID. Example:", "", - ` $ boundary managed-groups update oidc -id acctoidc_1234567890 -name "devops" -description "Oidc managed group for DevOps"`, + ` $ threshold managed-groups update oidc -id acctoidc_1234567890 -name "devops" -description "Oidc managed group for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/managedgroupscmd/oidc_managedgroups.gen.go b/internal/cmd/commands/managedgroupscmd/oidc_managedgroups.gen.go index 76b0d2ead..4f344c0b7 100644 --- a/internal/cmd/commands/managedgroupscmd/oidc_managedgroups.gen.go +++ b/internal/cmd/commands/managedgroupscmd/oidc_managedgroups.gen.go @@ -137,7 +137,7 @@ func (c *OidcCommand) Run(args []string) int { case "create": if c.FlagAuthMethodId == "" { - c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or BOUNDARY_AUTH_METHOD_ID")) + c.PrintCliError(errors.New("AuthMethod ID must be passed in via -auth-method-id or THRESHOLD_AUTH_METHOD_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/policiescmd/funcs.go b/internal/cmd/commands/policiescmd/funcs.go index baed10e54..bccf76a30 100644 --- a/internal/cmd/commands/policiescmd/funcs.go +++ b/internal/cmd/commands/policiescmd/funcs.go @@ -24,37 +24,37 @@ func (c *Command) extraHelpFunc(_ map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary policies [sub command] [options] [args]", + "Usage: threshold policies [sub command] [options] [args]", "", - " This command allows operations on Boundary policy resources. Example:", + " This command allows operations on Threshold policy resources. Example:", "", " Read a policy:", "", - ` $ boundary policies read -id pst_1234567890`, + ` $ threshold policies read -id pst_1234567890`, "", " Please see the subcommand help for detailed usage information.", }) case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary policies create [type] [sub command] [options] [args]", + "Usage: threshold policies create [type] [sub command] [options] [args]", "", - " This command allows create operations on Boundary policy resources. Example:", + " This command allows create operations on Threshold policy resources. Example:", "", " Create a storage-type policy:", "", - ` $ boundary policies create storage -name prod -description "Prod Storage Policy" -retain-for-days 10 -delete-after-days 20`, + ` $ threshold policies create storage -name prod -description "Prod Storage Policy" -retain-for-days 10 -delete-after-days 20`, "", " Please see the typed subcommand help for detailed usage information.", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary policies update [type] [sub command] [options] [args]", + "Usage: threshold policies update [type] [sub command] [options] [args]", "", - " This command allows update operations on Boundary policy resources. Example:", + " This command allows update operations on Threshold policy resources. Example:", "", " Update a storage-type policy:", "", - ` $ boundary policies update storage -id pst_1234567890 -name dev -description "Dev Storage Policy" -retain-for-days 1 -delete-after-days 2`, + ` $ threshold policies update storage -id pst_1234567890 -name dev -description "Dev Storage Policy" -retain-for-days 1 -delete-after-days 2`, "", " Please see the typed subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/policiescmd/policies.gen.go b/internal/cmd/commands/policiescmd/policies.gen.go index 3b8fbdff1..320c33a1a 100644 --- a/internal/cmd/commands/policiescmd/policies.gen.go +++ b/internal/cmd/commands/policiescmd/policies.gen.go @@ -146,7 +146,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/policiescmd/storage_funcs.go b/internal/cmd/commands/policiescmd/storage_funcs.go index a0a3c294d..875943446 100644 --- a/internal/cmd/commands/policiescmd/storage_funcs.go +++ b/internal/cmd/commands/policiescmd/storage_funcs.go @@ -32,21 +32,21 @@ func (c *StorageCommand) extraStorageHelpFunc(_ map[string]func() string) string switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary policies create storage [options] [args]", + "Usage: threshold policies create storage [options] [args]", "", " Create a storage-type policy. Example:", "", - ` $ boundary policies create storage -name prod -description "Prod Storage Policy" -retain-for-days 800 -retain-for-overridable false -delete-after-days 900 -delete-after-overridable false`, + ` $ threshold policies create storage -name prod -description "Prod Storage Policy" -retain-for-days 800 -retain-for-overridable false -delete-after-days 900 -delete-after-overridable false`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary policies update storage [options] [args]", + "Usage: threshold policies update storage [options] [args]", "", " Update a storage-type policy given its id. Example:", "", - ` $ boundary policies update storage -id pst_1234567890 -name dev -description "Dev Storage Policy" -retain-for-days 10 -retain-for-overridable null -delete-after-days 20 -delete-after-overridable true`, + ` $ threshold policies update storage -id pst_1234567890 -name dev -description "Dev Storage Policy" -retain-for-days 10 -retain-for-overridable null -delete-after-days 20 -delete-after-overridable true`, "", "", }) diff --git a/internal/cmd/commands/policiescmd/storage_policies.gen.go b/internal/cmd/commands/policiescmd/storage_policies.gen.go index ddd2158f3..970c10b7a 100644 --- a/internal/cmd/commands/policiescmd/storage_policies.gen.go +++ b/internal/cmd/commands/policiescmd/storage_policies.gen.go @@ -137,7 +137,7 @@ func (c *StorageCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/rolescmd/funcs.go b/internal/cmd/commands/rolescmd/funcs.go index fbb768be0..271f826d4 100644 --- a/internal/cmd/commands/rolescmd/funcs.go +++ b/internal/cmd/commands/rolescmd/funcs.go @@ -75,99 +75,99 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "add-principals": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary roles add-principals [options] [args]", + "Usage: threshold roles add-principals [options] [args]", "", ` Adds principals (users, groups) to a role given its ID. The "principal" flag can be specified multiple times. Example:`, "", - ` $ boundary roles add-principals -id r_1234567890 -principal u_1234567890`, + ` $ threshold roles add-principals -id r_1234567890 -principal u_1234567890`, "", "", }) case "set-principals": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary roles set-principals [options] [args]", + "Usage: threshold roles set-principals [options] [args]", "", ` Sets the complete set of principals (users, groups) on a role given its ID. The "principal" flag can be specified multiple times. Example:`, "", - ` $ boundary roles set-principals -id r_1234567890 -principal u_anon -principal sg_1234567890`, + ` $ threshold roles set-principals -id r_1234567890 -principal u_anon -principal sg_1234567890`, "", "", }) case "remove-principals": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary roles remove-principals [options] [args]", + "Usage: threshold roles remove-principals [options] [args]", "", ` Removes principals (users, groups) from a role given its ID. The "principal" flags can be specified multiple times. Example:`, "", - ` $ boundary roles remove-principals -id r_1234567890 -principal sg_1234567890`, + ` $ threshold roles remove-principals -id r_1234567890 -principal sg_1234567890`, "", "", }) case "add-grants": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary roles add-grants [options] [args]", + "Usage: threshold roles add-grants [options] [args]", "", ` Adds grants to a role given its ID. The "grant" flag can be specified multiple times. Example:`, "", - ` $ boundary roles add-grants -id r_1234567890 -grant "ids=*;type=*;actions=read"`, + ` $ threshold roles add-grants -id r_1234567890 -grant "ids=*;type=*;actions=read"`, "", "", }) case "set-grants": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary roles set-grants [options] [args]", + "Usage: threshold roles set-grants [options] [args]", "", ` Sets the complete set of grants on a role given its ID. The "grant" flag can be specified multiple times. Example:`, "", - ` $ boundary roles set-grants -id r_1234567890 -grant "ids=*;type=*;actions=read" -grant "ids=*;type=*;actions=list"`, + ` $ threshold roles set-grants -id r_1234567890 -grant "ids=*;type=*;actions=read" -grant "ids=*;type=*;actions=list"`, "", "", }) case "remove-grants": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary roles remove-grants [options] [args]", + "Usage: threshold roles remove-grants [options] [args]", "", ` Removes grants from a role given its ID. The "grant" flags can be specified multiple times. Example:`, "", - ` $ boundary roles remove-grants -id r_1234567890 -grant "ids=*;type=*;actions=read"`, + ` $ threshold roles remove-grants -id r_1234567890 -grant "ids=*;type=*;actions=read"`, "", "", }) case "add-grant-scopes": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary roles add-grant-scopes [options] [args]", + "Usage: threshold roles add-grant-scopes [options] [args]", "", ` Adds grant scopes to a role given its ID. The "grant-scope-id" flag can be specified multiple times. Example:`, "", - ` $ boundary roles add-grant-scopes -id r_1234567890 -grant-scope-id "this" -grant-scope-id "children"`, + ` $ threshold roles add-grant-scopes -id r_1234567890 -grant-scope-id "this" -grant-scope-id "children"`, "", "", }) case "set-grant-scopes": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary roles set-grant-scopes [options] [args]", + "Usage: threshold roles set-grant-scopes [options] [args]", "", ` Sets the complete set of grant scopes on a role given its ID. The "grant-scope-id" flag can be specified multiple times. Example:`, "", - ` $ boundary roles set-grant-scopes -id r_1234567890 -grant-scope-id "this" -grant-scope-id "children"`, + ` $ threshold roles set-grant-scopes -id r_1234567890 -grant-scope-id "this" -grant-scope-id "children"`, "", "", }) case "remove-grant-scopes": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary roles remove-grant-scopes [options] [args]", + "Usage: threshold roles remove-grant-scopes [options] [args]", "", ` Removes grant scopes from a role given its ID. The "grant-scope-id" flags can be specified multiple times. Example:`, "", - ` $ boundary roles remove-grant-scopes -id r_1234567890 -grant-scope-id "this" -grant-scope-id "children"`, + ` $ threshold roles remove-grant-scopes -id r_1234567890 -grant-scope-id "this" -grant-scope-id "children"`, "", "", }) diff --git a/internal/cmd/commands/rolescmd/roles.gen.go b/internal/cmd/commands/rolescmd/roles.gen.go index 55383829f..7249bcd1a 100644 --- a/internal/cmd/commands/rolescmd/roles.gen.go +++ b/internal/cmd/commands/rolescmd/roles.gen.go @@ -157,13 +157,13 @@ func (c *Command) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/scopescmd/destroy_key_version.go b/internal/cmd/commands/scopescmd/destroy_key_version.go index 6452a6d66..d9fd434fe 100644 --- a/internal/cmd/commands/scopescmd/destroy_key_version.go +++ b/internal/cmd/commands/scopescmd/destroy_key_version.go @@ -31,13 +31,13 @@ func (c *DestroyKeyVersionCommand) Synopsis() string { func (c *DestroyKeyVersionCommand) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary scopes destroy-key-version [args]", + "Usage: threshold scopes destroy-key-version [args]", "", " Destroys a key version in the scope. The key version must not be the currently active key version.", " This may start an asynchronous job to re-encrypt existing data encrypted with the key version.", - " Use `boundary scopes list-key-version-destruction-jobs` to monitor the progress of this job. Example:", + " Use `threshold scopes list-key-version-destruction-jobs` to monitor the progress of this job. Example:", "", - ` $ boundary scopes destroy-key-version -scope-id global -key-version-id krkv_123456789`, + ` $ threshold scopes destroy-key-version -scope-id global -key-version-id krkv_123456789`, "", "", }) + c.Flags().Help() @@ -120,7 +120,7 @@ func (c *DestroyKeyVersionCommand) Run(args []string) int { case "completed": c.UI.Output("The key version was successfully destroyed.") case "pending": - c.UI.Output("A key version destruction job has been created, which will re-encrypt existing data in the background. Use `boundary scopes list-key-version-destruction-jobs` to monitor this job. Once it has completed the key version will have been destroyed.") + c.UI.Output("A key version destruction job has been created, which will re-encrypt existing data in the background. Use `threshold scopes list-key-version-destruction-jobs` to monitor this job. Once it has completed the key version will have been destroyed.") default: c.PrintCliError(fmt.Errorf("unexpected state: %q", result.State)) return base.CommandApiError diff --git a/internal/cmd/commands/scopescmd/funcs.go b/internal/cmd/commands/scopescmd/funcs.go index de1ec23db..a8ddf5d9b 100644 --- a/internal/cmd/commands/scopescmd/funcs.go +++ b/internal/cmd/commands/scopescmd/funcs.go @@ -249,25 +249,25 @@ func (c *Command) extraHelpFunc(_ map[string]func() string) string { switch c.Func { case "attach-storage-policy": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary scopes attach-storage-policy [options] [args]", + "Usage: threshold scopes attach-storage-policy [options] [args]", "", " This command allows attaching a storage policy to scope resources. Example:", "", " Attach storage policy to a scope:", "", - ` $ boundary scopes attach-storage-policy -id o_1234567890 -storage-policy-id pst_1234567890`, + ` $ threshold scopes attach-storage-policy -id o_1234567890 -storage-policy-id pst_1234567890`, "", "", }) case "detach-storage-policy": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary scope detach-storage-policy [options] [args]", + "Usage: threshold scope detach-storage-policy [options] [args]", "", " This command allows detaching a storage policy from scope resources. Example:", "", " Detach storage policy from scope:", "", - ` $ boundary scopes detach-storage-policy -id o_1234567890`, + ` $ threshold scopes detach-storage-policy -id o_1234567890`, "", "", }) diff --git a/internal/cmd/commands/scopescmd/list_key_version_destruction_jobs.go b/internal/cmd/commands/scopescmd/list_key_version_destruction_jobs.go index 5cca28563..ccb18d5cf 100644 --- a/internal/cmd/commands/scopescmd/list_key_version_destruction_jobs.go +++ b/internal/cmd/commands/scopescmd/list_key_version_destruction_jobs.go @@ -31,13 +31,13 @@ func (c *ListKeyVersionDestructionJobsCommand) Synopsis() string { func (c *ListKeyVersionDestructionJobsCommand) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary scopes list-key-version-destruction-jobs [args]", + "Usage: threshold scopes list-key-version-destruction-jobs [args]", "", " List all pending key version destruction jobs within a scope. A key version", " destruction job asynchronously re-encrypts any existing data with the latest", " key version before destroying the key version. Example:", "", - ` $ boundary scopes list-key-version-destruction-jobs -scope-id global`, + ` $ threshold scopes list-key-version-destruction-jobs -scope-id global`, "", "", }) + c.Flags().Help() diff --git a/internal/cmd/commands/scopescmd/list_keys.go b/internal/cmd/commands/scopescmd/list_keys.go index 1fa14dcd8..5f8e85d70 100644 --- a/internal/cmd/commands/scopescmd/list_keys.go +++ b/internal/cmd/commands/scopescmd/list_keys.go @@ -31,11 +31,11 @@ func (c *ListKeysCommand) Synopsis() string { func (c *ListKeysCommand) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary scopes list-keys [args]", + "Usage: threshold scopes list-keys [args]", "", " List keys within a scope. Example:", "", - ` $ boundary scopes list-keys -scope-id global`, + ` $ threshold scopes list-keys -scope-id global`, "", "", }) + c.Flags().Help() diff --git a/internal/cmd/commands/scopescmd/rotate_keys.go b/internal/cmd/commands/scopescmd/rotate_keys.go index fc957dde3..719e26b35 100644 --- a/internal/cmd/commands/scopescmd/rotate_keys.go +++ b/internal/cmd/commands/scopescmd/rotate_keys.go @@ -31,11 +31,11 @@ func (c *RotateKeysCommand) Synopsis() string { func (c *RotateKeysCommand) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary scopes rotate-keys [args]", + "Usage: threshold scopes rotate-keys [args]", "", " Deactivates a given scope's current KEK and DEKs and activates a new set of keys for the scope. Example:", "", - ` $ boundary scopes rotate-keys -scope-id global`, + ` $ threshold scopes rotate-keys -scope-id global`, "", "", }) + c.Flags().Help() diff --git a/internal/cmd/commands/scopescmd/scopes.gen.go b/internal/cmd/commands/scopescmd/scopes.gen.go index 6fdd2cb6a..5306d08e5 100644 --- a/internal/cmd/commands/scopescmd/scopes.gen.go +++ b/internal/cmd/commands/scopescmd/scopes.gen.go @@ -157,13 +157,13 @@ func (c *Command) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/server/server.go b/internal/cmd/commands/server/server.go index 86d43f0cb..2f930d626 100644 --- a/internal/cmd/commands/server/server.go +++ b/internal/cmd/commands/server/server.go @@ -76,16 +76,16 @@ type Command struct { } func (c *Command) Synopsis() string { - return "Start a Boundary server" + return "Start a Threshold server" } func (c *Command) Help() string { helpText := ` -Usage: boundary server [options] +Usage: threshold server [options] Start a server (controller, worker, or both) with a configuration file: - $ boundary server -config=/etc/boundary/controller.hcl + $ threshold server -config=/etc/threshold/controller.hcl For a full list of examples, please see the documentation. @@ -115,13 +115,13 @@ func (c *Command) Flags() *base.FlagSets { complete.PredictFiles("*.hcl"), complete.PredictFiles("*.json"), ), - Usage: `Path to a configuration file containing a "kms" block marked for "config" purpose, to perform decryption of the main configuration file. If not set, will look for such a block in the main configuration file, which has some drawbacks; see the help output for "boundary config encrypt -h" for details.`, + Usage: `Path to a configuration file containing a "kms" block marked for "config" purpose, to perform decryption of the main configuration file. If not set, will look for such a block in the main configuration file, which has some drawbacks; see the help output for "threshold config encrypt -h" for details.`, }) f.StringVar(&base.StringVar{ Name: "log-level", Target: &c.flagLogLevel, - EnvVar: "BOUNDARY_LOG_LEVEL", + EnvVar: "THRESHOLD_LOG_LEVEL", Completion: complete.PredictSet("trace", "debug", "info", "warn", "err"), Usage: "Log verbosity level, mostly as a fallback for events. Supported values (in order of more detail to less) are " + "\"trace\", \"debug\", \"info\", \"warn\", and \"err\".", @@ -274,14 +274,14 @@ func (c *Command) Run(args []string) int { } // If mlockall(2) isn't supported, show a warning. We disable this in dev - // because it is quite scary to see when first using Boundary. We also disable + // because it is quite scary to see when first using Threshold. We also disable // this if the user has explicitly disabled mlock in configuration. if !c.Config.DisableMlock && !mlock.Supported() { c.UI.Warn(base.WrapAtLength( "WARNING! mlock is not supported on this system! An mlockall(2)-like " + "syscall to prevent memory from being swapped to disk is not " + - "supported on this system. For better security, only run Boundary on " + - "systems where this call is supported. If you are running Boundary" + + "supported on this system. For better security, only run Threshold on " + + "systems where this call is supported. If you are running Threshold" + "in a Docker container, provide the IPC_LOCK cap to the container.")) } @@ -725,10 +725,10 @@ func (c *Command) WaitForInterrupt() int { } if c.Config.Worker != nil { - c.UI.Output("==> Boundary server graceful shutdown triggered, interrupt again to enter shutdown") + c.UI.Output("==> Threshold server graceful shutdown triggered, interrupt again to enter shutdown") workerGracefulShutdownFunc() } else { - c.UI.Output("==> Boundary server shutdown triggered, interrupt again to force") + c.UI.Output("==> Threshold server shutdown triggered, interrupt again to force") } if c.Config.Controller != nil { @@ -761,7 +761,7 @@ func (c *Command) WaitForInterrupt() int { for !shutdownCompleted.Load() { select { case <-c.ServerSideShutdownCh: - c.UI.Output("==> Boundary server self-terminating") + c.UI.Output("==> Threshold server self-terminating") shutdownTriggerCount++ runShutdownLogic() @@ -770,7 +770,7 @@ func (c *Command) WaitForInterrupt() int { runShutdownLogic() case <-c.SighupCh: - c.UI.Output("==> Boundary server reload triggered") + c.UI.Output("==> Threshold server reload triggered") // Check for new log level var level hclog.Level @@ -1032,20 +1032,20 @@ func verifyDatabaseState(ctx context.Context, db *db.DB, schemaManager *schema.M } if !s.Initialized { return fmt.Errorf("The database has not been initialized. Please ensure your database user " + - "has access to all Boundary tables, or run 'boundary database init' if you haven't initialized " + - "your database for Boundary.") + "has access to all Threshold tables, or run 'threshold database init' if you haven't initialized " + + "your database for Threshold.") } if !s.MigrationsApplied() { for _, e := range s.Editions { if e.DatabaseSchemaState == schema.Ahead { return fmt.Errorf("Newer schema version (%s %d) "+ - "than this binary expects. Please use a newer version of the boundary "+ + "than this binary expects. Please use a newer version of the threshold "+ "binary.", e.Name, e.DatabaseSchemaVersion) } } return fmt.Errorf("Database schema must be updated to use this version. " + - "Run 'boundary database migrate' to update the database. " + - "NOTE: Boundary does not currently support live migration; " + + "Run 'threshold database migrate' to update the database. " + + "NOTE: Threshold does not currently support live migration; " + "Ensure all controllers are shut down before running the migration command.") } diff --git a/internal/cmd/commands/sessionrecordingscmd/download.go b/internal/cmd/commands/sessionrecordingscmd/download.go index 047ea5528..d436f60ba 100644 --- a/internal/cmd/commands/sessionrecordingscmd/download.go +++ b/internal/cmd/commands/sessionrecordingscmd/download.go @@ -39,11 +39,11 @@ func (c *DownloadCommand) Synopsis() string { func (c *DownloadCommand) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary session-recordings download [args]", + "Usage: threshold session-recordings download [args]", "", " Download a session recording resource. Example:", "", - ` $ boundary session-recordings download -id chr_u6e9wJ8B8H`, + ` $ threshold session-recordings download -id chr_u6e9wJ8B8H`, "", "", }) + c.Flags().Help() diff --git a/internal/cmd/commands/sessionrecordingscmd/export.go b/internal/cmd/commands/sessionrecordingscmd/export.go index 5ed6cbcc5..384593754 100644 --- a/internal/cmd/commands/sessionrecordingscmd/export.go +++ b/internal/cmd/commands/sessionrecordingscmd/export.go @@ -65,11 +65,11 @@ func (c *ExportCommand) Help() string { switch c.Action { case ExportCommandActionCreate: out = append(out, - "Usage: boundary session-recordings export [action] [args]", + "Usage: threshold session-recordings export [action] [args]", "", " Create a new export. Example:", "", - ` $ boundary session-recordings export -id cr_1234567890 -mime-type video/webm`, + ` $ threshold session-recordings export -id cr_1234567890 -mime-type video/webm`, "", " Also used as an entrypoint to read or cancel an existing export.", "", @@ -77,27 +77,27 @@ func (c *ExportCommand) Help() string { ) case ExportCommandActionRead: out = append(out, - "Usage: boundary session-recordings export read [args]", + "Usage: threshold session-recordings export read [args]", "", " Read an existing export. Example:", "", - ` $ boundary session-recordings export read -id exp_1234567890`, + ` $ threshold session-recordings export read -id exp_1234567890`, ) case ExportCommandActionCancel: out = append(out, - "Usage: boundary session-recordings export cancel [args]", + "Usage: threshold session-recordings export cancel [args]", "", " Cancel an existing export. Example:", "", - ` $ boundary session-recordings export cancel -id exp_1234567890`, + ` $ threshold session-recordings export cancel -id exp_1234567890`, ) case ExportCommandActionList: out = append(out, - "Usage: boundary session-recordings list-exports [args]", + "Usage: threshold session-recordings list-exports [args]", "", " List exports within an enclosing scope or resource. Example:", "", - ` $ boundary session-recordings list-exports -scope-id global -recursive true`, + ` $ threshold session-recordings list-exports -scope-id global -recursive true`, ) } out = append(out, "", "") @@ -120,7 +120,7 @@ func (c *ExportCommand) Flags() *base.FlagSets { fs.StringVar(&base.StringVar{ Name: "mime-type", Target: &c.flagMimeType, - Usage: "The export's requested mime-type. Must be a valid Boundary API mime-type", + Usage: "The export's requested mime-type. Must be a valid Threshold API mime-type", Aliases: []string{"mt"}, }) case ExportCommandActionRead, ExportCommandActionCancel: @@ -134,7 +134,7 @@ func (c *ExportCommand) Flags() *base.FlagSets { Name: "scope-id", Target: &c.FlagScopeId, Usage: "The scope in which to make the request.", - EnvVar: "BOUNDARY_SCOPE_ID", + EnvVar: "THRESHOLD_SCOPE_ID", Default: "global", }) fs.BoolVar(&base.BoolVar{ diff --git a/internal/cmd/commands/sessionrecordingscmd/funcs.go b/internal/cmd/commands/sessionrecordingscmd/funcs.go index 293ece2bf..9563dfb70 100644 --- a/internal/cmd/commands/sessionrecordingscmd/funcs.go +++ b/internal/cmd/commands/sessionrecordingscmd/funcs.go @@ -23,25 +23,25 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary session-recordings [sub command] [options] [args]", + "Usage: threshold session-recordings [sub command] [options] [args]", "", - " This command allows operations on Boundary session recordings.", + " This command allows operations on Threshold session recordings.", "", " Read a session recording:", "", - ` $ boundary session-recordings read -id s_1234567890`, + ` $ threshold session-recordings read -id s_1234567890`, "", " List session recording:", "", - ` $ boundary session-recordings list -scope-id global`, + ` $ threshold session-recordings list -scope-id global`, "", " Download a session recording:", "", - ` $ boundary session-recordings download -id chr_1234567890`, + ` $ threshold session-recordings download -id chr_1234567890`, "", " Export a session recording:", "", - ` $ boundary session-recordings export -connection-recording-id cr_1234567890 -mime-type video/webm`, + ` $ threshold session-recordings export -connection-recording-id cr_1234567890 -mime-type video/webm`, "", " Please see subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/sessionrecordingscmd/reapply_storage_policy.go b/internal/cmd/commands/sessionrecordingscmd/reapply_storage_policy.go index 18acba8ec..efb191a19 100644 --- a/internal/cmd/commands/sessionrecordingscmd/reapply_storage_policy.go +++ b/internal/cmd/commands/sessionrecordingscmd/reapply_storage_policy.go @@ -30,11 +30,11 @@ func (c *ReApplyStoragePolicyCommand) Synopsis() string { func (c *ReApplyStoragePolicyCommand) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary session-recordings reapply-storage-policy [args]", + "Usage: threshold session-recordings reapply-storage-policy [args]", "", " Reapply a storage policy to a session recording resource. Example:", "", - ` $ boundary session-recordings reapply-storage-policy -id sr_0123456789`, + ` $ threshold session-recordings reapply-storage-policy -id sr_0123456789`, "", "", }) + c.Flags().Help() diff --git a/internal/cmd/commands/sessionrecordingscmd/sessionrecordings.gen.go b/internal/cmd/commands/sessionrecordingscmd/sessionrecordings.gen.go index ede67c3fd..87a1e9928 100644 --- a/internal/cmd/commands/sessionrecordingscmd/sessionrecordings.gen.go +++ b/internal/cmd/commands/sessionrecordingscmd/sessionrecordings.gen.go @@ -153,7 +153,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/sessionscmd/funcs.go b/internal/cmd/commands/sessionscmd/funcs.go index 7804c7f69..0fb796e63 100644 --- a/internal/cmd/commands/sessionscmd/funcs.go +++ b/internal/cmd/commands/sessionscmd/funcs.go @@ -62,24 +62,24 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary sessions [sub command] [options] [args]", + "Usage: threshold sessions [sub command] [options] [args]", "", - " This command allows operations on Boundary sessions.", + " This command allows operations on Threshold sessions.", "", " Read a session:", "", - ` $ boundary sessions read -id s_1234567890`, + ` $ threshold sessions read -id s_1234567890`, "", " Please see the sessions subcommand help for detailed usage information.", }) case "cancel": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary sessions cancel [options] [args]", + "Usage: threshold sessions cancel [options] [args]", "", " Cancel the session specified by ID. If the session is already canceled, this command succeeds with no effect. Example:", "", - ` $ boundary sessions cancel -id s_1234567890`, + ` $ threshold sessions cancel -id s_1234567890`, "", "", }) diff --git a/internal/cmd/commands/sessionscmd/sessions.gen.go b/internal/cmd/commands/sessionscmd/sessions.gen.go index 6cf28cb4d..5d2311ca2 100644 --- a/internal/cmd/commands/sessionscmd/sessions.gen.go +++ b/internal/cmd/commands/sessionscmd/sessions.gen.go @@ -148,7 +148,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/storagebucketscmd/funcs.go b/internal/cmd/commands/storagebucketscmd/funcs.go index c92495525..bfbb4ca0d 100644 --- a/internal/cmd/commands/storagebucketscmd/funcs.go +++ b/internal/cmd/commands/storagebucketscmd/funcs.go @@ -105,37 +105,37 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary storage-buckets [sub command] [options] [args]", + "Usage: threshold storage-buckets [sub command] [options] [args]", "", - " This command allows operations on Boundary storage bucket resources. Example:", + " This command allows operations on Threshold storage bucket resources. Example:", "", " Read a storage bucket:", "", - ` $ boundary storage-buckets read -id sb_1234567890`, + ` $ threshold storage-buckets read -id sb_1234567890`, "", " Please see the storage-buckets subcommand help for detailed usage information.", }) case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary storage-buckets create [sub command] [options] [args]", + "Usage: threshold storage-buckets create [sub command] [options] [args]", "", - " This command allows create operations on Boundary storage bucket resources. Example:", + " This command allows create operations on Threshold storage bucket resources. Example:", "", " Create a storage bucket:", "", - ` $ boundary storage-buckets create -plugin-name aws -bucket-name prod_bucket`, + ` $ threshold storage-buckets create -plugin-name aws -bucket-name prod_bucket`, "", " Please see the subcommand help for detailed usage information.", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary storage-buckets update [sub command] [options] [args]", + "Usage: threshold storage-buckets update [sub command] [options] [args]", "", - " This command allows update operations on Boundary storage bucket resources. Example:", + " This command allows update operations on Threshold storage bucket resources. Example:", "", " Update a storage bucket:", "", - ` $ boundary storage-buckets update -id sb_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold storage-buckets update -id sb_1234567890 -name devops -description "For DevOps usage"`, "", " Please see the subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/storagebucketscmd/storagebuckets.gen.go b/internal/cmd/commands/storagebucketscmd/storagebuckets.gen.go index aabd0e304..76cb4a5ae 100644 --- a/internal/cmd/commands/storagebucketscmd/storagebuckets.gen.go +++ b/internal/cmd/commands/storagebucketscmd/storagebuckets.gen.go @@ -189,13 +189,13 @@ func (c *Command) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/targetscmd/funcs.go b/internal/cmd/commands/targetscmd/funcs.go index 9eca30898..d90652836 100644 --- a/internal/cmd/commands/targetscmd/funcs.go +++ b/internal/cmd/commands/targetscmd/funcs.go @@ -94,125 +94,125 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary targets [sub command] [options] [args]", + "Usage: threshold targets [sub command] [options] [args]", "", - " This command allows operations on Boundary target resources. Example:", + " This command allows operations on Threshold target resources. Example:", "", " Read a target:", "", - ` $ boundary targets read -id ttcp_1234567890`, + ` $ threshold targets read -id ttcp_1234567890`, "", " Please see the targets subcommand help for detailed usage information.", }) case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary targets create [type] [sub command] [options] [args]", + "Usage: threshold targets create [type] [sub command] [options] [args]", "", - " This command allows create operations on Boundary target resources. Example:", + " This command allows create operations on Threshold target resources. Example:", "", " Create a tcp-type target:", "", - ` $ boundary targets create tcp -name prodops -description "For ProdOps usage"`, + ` $ threshold targets create tcp -name prodops -description "For ProdOps usage"`, "", " Please see the typed subcommand help for detailed usage information.", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary targets update [type] [sub command] [options] [args]", + "Usage: threshold targets update [type] [sub command] [options] [args]", "", - " This command allows update operations on Boundary target resources. Example:", + " This command allows update operations on Threshold target resources. Example:", "", " Update a tcp-type target:", "", - ` $ boundary targets update tcp -id ttcp_1234567890 -name devops -description "For DevOps usage"`, + ` $ threshold targets update tcp -id ttcp_1234567890 -name devops -description "For DevOps usage"`, "", " Please see the typed subcommand help for detailed usage information.", }) case "add-host-sources": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary target add-host-sources [options] [args]", + "Usage: threshold target add-host-sources [options] [args]", "", " This command allows adding host sources to target resources. Example:", "", " Add host sources to a tcp-type target:", "", - ` $ boundary targets add-host-sources -id ttcp_1234567890 -host-source hsst_1234567890 -host-source hsst_0987654321`, + ` $ threshold targets add-host-sources -id ttcp_1234567890 -host-source hsst_1234567890 -host-source hsst_0987654321`, "", "", }) case "remove-host-sources": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary target remove-host-sources [options] [args]", + "Usage: threshold target remove-host-sources [options] [args]", "", " This command allows removing host sources from target resources. Example:", "", " Remove host sources from a tcp-type target:", "", - ` $ boundary targets remove-host-sources -id ttcp_1234567890 -host-source hsst_1234567890 -host-source hsst_0987654321`, + ` $ threshold targets remove-host-sources -id ttcp_1234567890 -host-source hsst_1234567890 -host-source hsst_0987654321`, "", "", }) case "set-host-sources": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary target set-host-sources [options] [args]", + "Usage: threshold target set-host-sources [options] [args]", "", " This command allows setting the complete set of host sources on a target resource. Example:", "", " Set host sources on a tcp-type target:", "", - ` $ boundary targets set-host-sources -id ttcp_1234567890 -host-source hsst_1234567890`, + ` $ threshold targets set-host-sources -id ttcp_1234567890 -host-source hsst_1234567890`, "", "", }) case "add-credential-sources": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary target add-credential-sources [options] [args]", + "Usage: threshold target add-credential-sources [options] [args]", "", " This command allows adding credential sources to target resources. Example:", "", " Add credential sources to a tcp-type target:", "", - ` $ boundary targets add-credential-sources -id ttcp_1234567890 -brokered-credential-source clvlt_1234567890 -brokered-credential-source clvlt_0987654321`, + ` $ threshold targets add-credential-sources -id ttcp_1234567890 -brokered-credential-source clvlt_1234567890 -brokered-credential-source clvlt_0987654321`, "", "", }) case "remove-credential-sources": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary target remove-credential-sources [options] [args]", + "Usage: threshold target remove-credential-sources [options] [args]", "", " This command allows removing credential sources from target resources. Example:", "", " Remove credential sources from a tcp-type target:", "", - ` $ boundary targets remove-credential-sources -id ttcp_1234567890 -brokered-credential-source clvlt_1234567890 -brokered-credential-source clvlt_0987654321`, + ` $ threshold targets remove-credential-sources -id ttcp_1234567890 -brokered-credential-source clvlt_1234567890 -brokered-credential-source clvlt_0987654321`, "", "", }) case "set-credential-sources": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary target set-credential-sources [options] [args]", + "Usage: threshold target set-credential-sources [options] [args]", "", " This command allows setting the complete set of credential sources on a target resource. Example:", "", " Set credential sources on a tcp-type target:", "", - ` $ boundary targets set-credential-sources -id ttcp_1234567890 -brokered-credential-source clvlt_1234567890`, + ` $ threshold targets set-credential-sources -id ttcp_1234567890 -brokered-credential-source clvlt_1234567890`, "", "", }) case "authorize-session": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary target authorize-session [options] [args]", + "Usage: threshold target authorize-session [options] [args]", "", " This command allows fetching session authorization credentials against a target. Example:", "", " Request an authorized session using the target ID:", "", - ` $ boundary targets authorize-session -id ttcp_1234567890`, + ` $ threshold targets authorize-session -id ttcp_1234567890`, "", " Request an authorized session using the scope ID and target name:", "", - ` $ boundary targets authorize-session -scope-id o_1234567890 -name prod-ssh`, + ` $ threshold targets authorize-session -scope-id o_1234567890 -name prod-ssh`, "", "", }) @@ -245,13 +245,13 @@ func extraFlagsFuncImpl(c *Command, _ *base.FlagSets, f *base.FlagSet) { f.StringSliceVar(&base.StringSliceVar{ Name: "brokered-credential-source", Target: &c.flagBrokeredCredentialSources, - Usage: "The credential source to add, set, or remove that Boundary will return to the user when creating a connection. May be specified multiple times.", + Usage: "The credential source to add, set, or remove that Threshold will return to the user when creating a connection. May be specified multiple times.", }) case "injected-application-credential-source": f.StringSliceVar(&base.StringSliceVar{ Name: "injected-application-credential-source", Target: &c.flagInjectedApplicationCredentialSources, - Usage: "The credential source to add, set, or remove that Boundary will inject when creating a connection. May be specified multiple times.", + Usage: "The credential source to add, set, or remove that Threshold will inject when creating a connection. May be specified multiple times.", }) } } @@ -271,7 +271,7 @@ func extraFlagsFuncImpl(c *Command, _ *base.FlagSets, f *base.FlagSet) { f.StringVar(&base.StringVar{ Name: "scope-id", Target: &c.FlagScopeId, - EnvVar: "BOUNDARY_SCOPE_ID", + EnvVar: "THRESHOLD_SCOPE_ID", Completion: complete.PredictAnything, Usage: "Target scope ID, if authorizing the session via scope parameters and target name. Mutually exclusive with -scope-name.", }) @@ -279,7 +279,7 @@ func extraFlagsFuncImpl(c *Command, _ *base.FlagSets, f *base.FlagSet) { f.StringVar(&base.StringVar{ Name: "scope-name", Target: &c.FlagScopeName, - EnvVar: "BOUNDARY_SCOPE_NAME", + EnvVar: "THRESHOLD_SCOPE_NAME", Completion: complete.PredictAnything, Usage: "Target scope name, if authorizing the session via scope parameters and target name. Mutually exclusive with -scope-id.", }) diff --git a/internal/cmd/commands/targetscmd/rdp_funcs.go b/internal/cmd/commands/targetscmd/rdp_funcs.go index d15586fcf..e7a423173 100644 --- a/internal/cmd/commands/targetscmd/rdp_funcs.go +++ b/internal/cmd/commands/targetscmd/rdp_funcs.go @@ -56,22 +56,22 @@ func (c *RdpCommand) extraRdpHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary targets create rdp [options] [args]", + "Usage: threshold targets create rdp [options] [args]", "", " Create a rdp-type target. Example:", "", - ` $ boundary targets create rdp -name prodops -description "Rdp target for ProdOps"`, + ` $ threshold targets create rdp -name prodops -description "Rdp target for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary targets update rdp [options] [args]", + "Usage: threshold targets update rdp [options] [args]", "", " Update a rdp-type target given its ID. Example:", "", - ` $ boundary targets update rdp -id trdp_1234567890 -name "devops" -description "Rdp target for DevOps"`, + ` $ threshold targets update rdp -id trdp_1234567890 -name "devops" -description "Rdp target for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/targetscmd/rdp_targets.gen.go b/internal/cmd/commands/targetscmd/rdp_targets.gen.go index fc16b5a0a..40611d489 100644 --- a/internal/cmd/commands/targetscmd/rdp_targets.gen.go +++ b/internal/cmd/commands/targetscmd/rdp_targets.gen.go @@ -148,7 +148,7 @@ func (c *RdpCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/targetscmd/ssh_funcs.go b/internal/cmd/commands/targetscmd/ssh_funcs.go index 5c05bf1cf..75f65b4ee 100644 --- a/internal/cmd/commands/targetscmd/ssh_funcs.go +++ b/internal/cmd/commands/targetscmd/ssh_funcs.go @@ -56,22 +56,22 @@ func (c *SshCommand) extraSshHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary targets create ssh [options] [args]", + "Usage: threshold targets create ssh [options] [args]", "", " Create a ssh-type target. Example:", "", - ` $ boundary targets create ssh -name prodops -description "Ssh target for ProdOps"`, + ` $ threshold targets create ssh -name prodops -description "Ssh target for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary targets update ssh [options] [args]", + "Usage: threshold targets update ssh [options] [args]", "", " Update a ssh-type target given its ID. Example:", "", - ` $ boundary targets update ssh -id tssh_1234567890 -name "devops" -description "Ssh target for DevOps"`, + ` $ threshold targets update ssh -id tssh_1234567890 -name "devops" -description "Ssh target for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/targetscmd/ssh_targets.gen.go b/internal/cmd/commands/targetscmd/ssh_targets.gen.go index cb62cb046..b8b424c64 100644 --- a/internal/cmd/commands/targetscmd/ssh_targets.gen.go +++ b/internal/cmd/commands/targetscmd/ssh_targets.gen.go @@ -148,7 +148,7 @@ func (c *SshCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/targetscmd/targets.gen.go b/internal/cmd/commands/targetscmd/targets.gen.go index 476b47760..75489e7dd 100644 --- a/internal/cmd/commands/targetscmd/targets.gen.go +++ b/internal/cmd/commands/targetscmd/targets.gen.go @@ -7,7 +7,6 @@ package targetscmd import ( "errors" "fmt" - "os" "sync" "github.com/hashicorp/boundary/api" @@ -117,7 +116,7 @@ func (c *Command) Flags() *base.FlagSets { func (c *Command) Run(args []string) int { initFlags() - if os.Getenv("BOUNDARY_EXAMPLE_CLI_OUTPUT") != "" { + if api.Getenv("THRESHOLD_EXAMPLE_CLI_OUTPUT") != "" { c.UI.Output(exampleOutput()) return base.CommandSuccess } @@ -165,7 +164,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/targetscmd/tcp_funcs.go b/internal/cmd/commands/targetscmd/tcp_funcs.go index 73cab7c23..c084efbd2 100644 --- a/internal/cmd/commands/targetscmd/tcp_funcs.go +++ b/internal/cmd/commands/targetscmd/tcp_funcs.go @@ -53,22 +53,22 @@ func (c *TcpCommand) extraTcpHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary targets create tcp [options] [args]", + "Usage: threshold targets create tcp [options] [args]", "", " Create a tcp-type target. Example:", "", - ` $ boundary targets create tcp -name prodops -description "Tcp target for ProdOps"`, + ` $ threshold targets create tcp -name prodops -description "Tcp target for ProdOps"`, "", "", }) case "update": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary targets update tcp [options] [args]", + "Usage: threshold targets update tcp [options] [args]", "", " Update a tcp-type target given its ID. Example:", "", - ` $ boundary targets update tcp -id ttcp_1234567890 -name "devops" -description "Tcp target for DevOps"`, + ` $ threshold targets update tcp -id ttcp_1234567890 -name "devops" -description "Tcp target for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/targetscmd/tcp_targets.gen.go b/internal/cmd/commands/targetscmd/tcp_targets.gen.go index 70d8fbab1..12f4e8ddb 100644 --- a/internal/cmd/commands/targetscmd/tcp_targets.gen.go +++ b/internal/cmd/commands/targetscmd/tcp_targets.gen.go @@ -148,7 +148,7 @@ func (c *TcpCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/unsupported/unsupported.go b/internal/cmd/commands/unsupported/unsupported.go index c5b0b4227..4bfe08de1 100644 --- a/internal/cmd/commands/unsupported/unsupported.go +++ b/internal/cmd/commands/unsupported/unsupported.go @@ -21,7 +21,7 @@ type UnsupportedCommand struct { } func (c *UnsupportedCommand) notice() string { - return fmt.Sprintf("'boundary %s' is not supported on this platform.", c.CommandName) + return fmt.Sprintf("'threshold %s' is not supported on this platform.", c.CommandName) } func (c *UnsupportedCommand) Synopsis() string { diff --git a/internal/cmd/commands/userscmd/funcs.go b/internal/cmd/commands/userscmd/funcs.go index 07eaba875..ea660fd96 100644 --- a/internal/cmd/commands/userscmd/funcs.go +++ b/internal/cmd/commands/userscmd/funcs.go @@ -46,7 +46,7 @@ func extraSynopsisFuncImpl(c *Command) string { case strings.HasPrefix(c.Func, "remove"): in = "Remove accounts from" } - return wordwrap.WrapString(fmt.Sprintf("%s a user within Boundary", in), base.TermWidth) + return wordwrap.WrapString(fmt.Sprintf("%s a user within Threshold", in), base.TermWidth) } return "" @@ -57,33 +57,33 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "add-accounts": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary users add-accounts [options] [args]", + "Usage: threshold users add-accounts [options] [args]", "", ` Associates accounts to a user given its ID. The "account" flag can be specified multiple times. Example:`, "", - ` $ boundary users add-accounts -id u_1234567890 -account a_1234567890`, + ` $ threshold users add-accounts -id u_1234567890 -account a_1234567890`, "", "", }) case "set-accounts": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary users set-accounts [options] [args]", + "Usage: threshold users set-accounts [options] [args]", "", ` Sets the complete set of associated accounts on a user given its ID. The "account" flag can be specified multiple times. Example:`, "", - ` $ boundary users set-principals -id u_1234567890 -account a_0987654321 -account a_1234567890`, + ` $ threshold users set-principals -id u_1234567890 -account a_0987654321 -account a_1234567890`, "", "", }) case "remove-accounts": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary users remove-accounts [options] [args]", + "Usage: threshold users remove-accounts [options] [args]", "", ` Disassociates accounts from a user given its ID. The "account" flag can be specified multiple times. Example:`, "", - ` $ boundary users remove-accounts -id u_1234567890 -account a_1234567890`, + ` $ threshold users remove-accounts -id u_1234567890 -account a_1234567890`, "", "", }) diff --git a/internal/cmd/commands/userscmd/users.gen.go b/internal/cmd/commands/userscmd/users.gen.go index 97d3efb14..c10a83879 100644 --- a/internal/cmd/commands/userscmd/users.gen.go +++ b/internal/cmd/commands/userscmd/users.gen.go @@ -157,13 +157,13 @@ func (c *Command) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/version/version.go b/internal/cmd/commands/version/version.go index 498c80fc9..47ea4cdae 100644 --- a/internal/cmd/commands/version/version.go +++ b/internal/cmd/commands/version/version.go @@ -22,14 +22,14 @@ type Command struct { } func (c *Command) Synopsis() string { - return "Print the version of the local Boundary binary" + return "Print the version of the local Threshold binary" } func (c *Command) Help() string { return base.WrapForHelpText([]string{ - "Usage: boundary version", + "Usage: threshold version", "", - " This command displays the version of the local Boundary binary.", + " This command displays the version of the local Threshold binary.", }) + c.Flags().Help() } diff --git a/internal/cmd/commands/workerscmd/certificate-authority.go b/internal/cmd/commands/workerscmd/certificate-authority.go index 5fa2901c2..8657df95b 100644 --- a/internal/cmd/commands/workerscmd/certificate-authority.go +++ b/internal/cmd/commands/workerscmd/certificate-authority.go @@ -31,11 +31,11 @@ type WorkerCACommand struct { func (c *WorkerCACommand) Synopsis() string { switch c.Func { case "read": - return wordwrap.WrapString("Read the certificate authority used to authorize Boundary workers", base.TermWidth) + return wordwrap.WrapString("Read the certificate authority used to authorize Threshold workers", base.TermWidth) case "reinitialize": - return wordwrap.WrapString("Reinitialize the certificate authority used to authorize Boundary workers", base.TermWidth) + return wordwrap.WrapString("Reinitialize the certificate authority used to authorize Threshold workers", base.TermWidth) } - return wordwrap.WrapString("Manage the certificate authority used to authorize Boundary workers", base.TermWidth) + return wordwrap.WrapString("Manage the certificate authority used to authorize Threshold workers", base.TermWidth) } var flagsCertificateAuthority = map[string][]string{ @@ -47,33 +47,33 @@ func (c *WorkerCACommand) Help() string { switch c.Func { case "read": return base.WrapForHelpText([]string{ - "Usage: boundary workers certificate-authority read", + "Usage: threshold workers certificate-authority read", "", - " Read the certificate authority used to authorize Boundary workers:", + " Read the certificate authority used to authorize Threshold workers:", "", - ` $ boundary workers certificate-authority read`, + ` $ threshold workers certificate-authority read`, "", "", }) + c.Flags().Help() case "reinitialize": return base.WrapForHelpText([]string{ - "Usage: boundary workers certificate-authority reinitialize", + "Usage: threshold workers certificate-authority reinitialize", "", - " Reinitialize the certificate authority used to authorize Boundary workers:", + " Reinitialize the certificate authority used to authorize Threshold workers:", "", - ` $ boundary workers certificate-authority reinitialize`, + ` $ threshold workers certificate-authority reinitialize`, "", "", }) + c.Flags().Help() } return base.WrapForHelpText([]string{ - "Usage: boundary workers certificate-authority [options]", + "Usage: threshold workers certificate-authority [options]", "", - " This command allows for management of the certificate authority used to authorize Boundary workers. Example:", + " This command allows for management of the certificate authority used to authorize Threshold workers. Example:", "", " Read the current certificate authority:", "", - ` $ boundary workers certificate-authority read`, + ` $ threshold workers certificate-authority read`, "", " Please see the certificate-authority subcommand help for detailed usage information.", "", @@ -169,7 +169,7 @@ func (c *WorkerCACommand) Run(args []string) int { case "read": case "reinitialize": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/workerscmd/controller-led_funcs.go b/internal/cmd/commands/workerscmd/controller-led_funcs.go index 05e506ba5..03092d721 100644 --- a/internal/cmd/commands/workerscmd/controller-led_funcs.go +++ b/internal/cmd/commands/workerscmd/controller-led_funcs.go @@ -18,11 +18,11 @@ func (c *ControllerLedCommand) extraControllerLedHelpFunc(helpMap map[string]fun switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary workers create controller-led [options] [args]", + "Usage: threshold workers create controller-led [options] [args]", "", " Create a worker using the controller-led approach, receiving an activation token for a worker. Example:", "", - ` $ boundary workers create controller-led -name us-east-1-1`, + ` $ threshold workers create controller-led -name us-east-1-1`, "", "", }) diff --git a/internal/cmd/commands/workerscmd/controller-led_workers.gen.go b/internal/cmd/commands/workerscmd/controller-led_workers.gen.go index 4c95a0426..ecc6b5093 100644 --- a/internal/cmd/commands/workerscmd/controller-led_workers.gen.go +++ b/internal/cmd/commands/workerscmd/controller-led_workers.gen.go @@ -136,7 +136,7 @@ func (c *ControllerLedCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/workerscmd/funcs.go b/internal/cmd/commands/workerscmd/funcs.go index 40c929d22..5b4ea290d 100644 --- a/internal/cmd/commands/workerscmd/funcs.go +++ b/internal/cmd/commands/workerscmd/funcs.go @@ -48,49 +48,49 @@ func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { switch c.Func { case "": return base.WrapForHelpText([]string{ - "Usage: boundary workers [sub command] [options] [args]", + "Usage: threshold workers [sub command] [options] [args]", "", - " This command allows operations on Boundary worker resources. Example:", + " This command allows operations on Threshold worker resources. Example:", "", " Read a worker:", "", - ` $ boundary workers read -id w_1234567890`, + ` $ threshold workers read -id w_1234567890`, "", " Please see the workers subcommand help for detailed usage information.", }) case "add-worker-tags": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary workers add-worker-tags [options] [args]", + "Usage: threshold workers add-worker-tags [options] [args]", "", " This command allows adding api tags to worker resources. Example:", "", " Add a set of api tags to a specified worker:", "", - ` & boundary workers add-worker-tags -id w_1234567890 -tag "key1=val-a" -tag "key2=val-b,val-c"`, + ` & threshold workers add-worker-tags -id w_1234567890 -tag "key1=val-a" -tag "key2=val-b,val-c"`, "", "", }) case "set-worker-tags": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary workers set-worker-tags [options] [args]", + "Usage: threshold workers set-worker-tags [options] [args]", "", " This command allows setting api tags for worker resources. Example:", "", " Set api tags for a specified worker:", "", - ` & boundary workers set-worker-tags -id w_1234567890 -tag "key1=val-a" -tag "key2=val-b,val-c"`, + ` & threshold workers set-worker-tags -id w_1234567890 -tag "key1=val-a" -tag "key2=val-b,val-c"`, "", "", }) case "remove-worker-tags": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary workers remove-worker-tags [options] [args]", + "Usage: threshold workers remove-worker-tags [options] [args]", "", " This command allows removing api tags from worker resources. Example:", "", " Remove a set of api tags to a specified worker:", "", - ` & boundary workers remove-worker-tags -id w_1234567890 -tag "key1=val-a" -tag "key2=val-b,val-c"`, + ` & threshold workers remove-worker-tags -id w_1234567890 -tag "key1=val-a" -tag "key2=val-b,val-c"`, "", "", }) diff --git a/internal/cmd/commands/workerscmd/worker-led_funcs.go b/internal/cmd/commands/workerscmd/worker-led_funcs.go index d78d5acdd..08f20fc0b 100644 --- a/internal/cmd/commands/workerscmd/worker-led_funcs.go +++ b/internal/cmd/commands/workerscmd/worker-led_funcs.go @@ -30,11 +30,11 @@ func (c *WorkerLedCommand) extraWorkerLedHelpFunc(helpMap map[string]func() stri switch c.Func { case "create": helpStr = base.WrapForHelpText([]string{ - "Usage: boundary workers create worker-led [options] [args]", + "Usage: threshold workers create worker-led [options] [args]", "", " Create a worker using the worker-led approach by providing an auth token from the worker. Example:", "", - ` $ boundary workers create worker-led -name us-east-1-1 -worker-generated-auth-token "`, + ` $ threshold workers create worker-led -name us-east-1-1 -worker-generated-auth-token "`, "", "", }) @@ -51,7 +51,7 @@ func extraWorkerLedFlagsFuncImpl(c *WorkerLedCommand, set *base.FlagSets, _ *bas f.StringVar(&base.StringVar{ Name: "worker-generated-auth-token", Target: &c.flagWorkerGeneratedAuthToken, - Usage: "The auth token provided by the worker to use to register it to Boundary", + Usage: "The auth token provided by the worker to use to register it to Threshold", }) } } diff --git a/internal/cmd/commands/workerscmd/worker-led_workers.gen.go b/internal/cmd/commands/workerscmd/worker-led_workers.gen.go index c9d599544..00e2435af 100644 --- a/internal/cmd/commands/workerscmd/worker-led_workers.gen.go +++ b/internal/cmd/commands/workerscmd/worker-led_workers.gen.go @@ -138,7 +138,7 @@ func (c *WorkerLedCommand) Run(args []string) int { case "create": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/commands/workerscmd/workers.gen.go b/internal/cmd/commands/workerscmd/workers.gen.go index 9c7479056..56ee89eb2 100644 --- a/internal/cmd/commands/workerscmd/workers.gen.go +++ b/internal/cmd/commands/workerscmd/workers.gen.go @@ -153,7 +153,7 @@ func (c *Command) Run(args []string) int { case "list": if c.FlagScopeId == "" { - c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or BOUNDARY_SCOPE_ID")) + c.PrintCliError(errors.New("Scope ID must be passed in via -scope-id or THRESHOLD_SCOPE_ID")) return base.CommandUserError } diff --git a/internal/cmd/common/flags.go b/internal/cmd/common/flags.go index b82ac8c92..f108ebec4 100644 --- a/internal/cmd/common/flags.go +++ b/internal/cmd/common/flags.go @@ -25,7 +25,7 @@ func PopulateCommonFlags(c *base.Command, f *base.FlagSet, resourceType string, f.StringVar(&base.StringVar{ Name: "scope-id", Target: &c.FlagScopeId, - EnvVar: "BOUNDARY_SCOPE_ID", + EnvVar: "THRESHOLD_SCOPE_ID", Default: scope.Global.String(), Completion: complete.PredictAnything, Usage: `Scope in which to make the request.`, @@ -34,7 +34,7 @@ func PopulateCommonFlags(c *base.Command, f *base.FlagSet, resourceType string, f.StringVar(&base.StringVar{ Name: "scope-name", Target: &c.FlagScopeName, - EnvVar: "BOUNDARY_SCOPE_NAME", + EnvVar: "THRESHOLD_SCOPE_NAME", Completion: complete.PredictAnything, Usage: `Scope in which to make the request, identified by name.`, }) @@ -80,21 +80,21 @@ func PopulateCommonFlags(c *base.Command, f *base.FlagSet, resourceType string, case "auth-method-id": f.StringVar(&base.StringVar{ Name: "auth-method-id", - EnvVar: "BOUNDARY_AUTH_METHOD_ID", + EnvVar: "THRESHOLD_AUTH_METHOD_ID", Target: &c.FlagAuthMethodId, Usage: "The auth-method resource to use for the operation.", }) case "host-catalog-id": f.StringVar(&base.StringVar{ Name: "host-catalog-id", - EnvVar: "BOUNDARY_HOST_CATALOG_ID", + EnvVar: "THRESHOLD_HOST_CATALOG_ID", Target: &c.FlagHostCatalogId, Usage: "The host-catalog resource to use for the operation.", }) case "credential-store-id": f.StringVar(&base.StringVar{ Name: "credential-store-id", - EnvVar: "BOUNDARY_CREDENTIAL_STORE_ID", + EnvVar: "THRESHOLD_CREDENTIAL_STORE_ID", Target: &c.FlagCredentialStoreId, Usage: "The credential-store resource to use for the operation.", }) diff --git a/internal/cmd/common/help.go b/internal/cmd/common/help.go index 18092ceb2..3b473f038 100644 --- a/internal/cmd/common/help.go +++ b/internal/cmd/common/help.go @@ -16,7 +16,7 @@ import ( func SynopsisFunc(inFunc, resType string) string { if inFunc == "" { pluralType := strings.ReplaceAll(resource.Map[resType].PluralString(), "-", " ") - return wordwrap.WrapString(fmt.Sprintf("Manage Boundary %s", pluralType), base.TermWidth) + return wordwrap.WrapString(fmt.Sprintf("Manage Threshold %s", pluralType), base.TermWidth) } articleType := strings.ReplaceAll(resType, "-", " ") switch resType[0] { @@ -52,13 +52,13 @@ func HelpMap(resType string) map[string]func() string { return map[string]func() string{ "base": func() string { return base.WrapForHelpText(subtype([]string{ - "Usage: boundary {{hyphentypes}} [sub command] [options] [args]", + "Usage: threshold {{hyphentypes}} [sub command] [options] [args]", "", - " This command allows operations on Boundary {{type}} resources. Example:", + " This command allows operations on Threshold {{type}} resources. Example:", "", " Create {{articletype}}:", "", - ` $ boundary {{hyphentypes}} create -name prodops -description "For ProdOps usage"`, + ` $ threshold {{hyphentypes}} create -name prodops -description "For ProdOps usage"`, "", " Please see the {{hyphentypes}} subcommand help for detailed usage information.", }, resType, prefixMap)) @@ -66,11 +66,11 @@ func HelpMap(resType string) map[string]func() string { "create": func() string { return base.WrapForHelpText(subtype([]string{ - "Usage: boundary {{hyphentypes}} create [options] [args]", + "Usage: threshold {{hyphentypes}} create [options] [args]", "", " Create {{articletype}}. Example:", "", - ` $ boundary {{hyphentypes}} create -name prodops -description "{{uppertype}} for ProdOps"`, + ` $ threshold {{hyphentypes}} create -name prodops -description "{{uppertype}} for ProdOps"`, "", "", }, resType, prefixMap)) @@ -78,11 +78,11 @@ func HelpMap(resType string) map[string]func() string { "update": func() string { return base.WrapForHelpText(subtype([]string{ - "Usage: boundary {{hyphentypes}} update [options] [args]", + "Usage: threshold {{hyphentypes}} update [options] [args]", "", " Update {{articletype}} given its ID. Example:", "", - ` $ boundary {{hyphentypes}} update -id {{prefix}}_1234567890 -name "devops" -description "{{uppertype}} for DevOps"`, + ` $ threshold {{hyphentypes}} update -id {{prefix}}_1234567890 -name "devops" -description "{{uppertype}} for DevOps"`, "", "", }, resType, prefixMap)) @@ -90,11 +90,11 @@ func HelpMap(resType string) map[string]func() string { "read": func() string { return base.WrapForHelpText(subtype([]string{ - "Usage: boundary {{hyphentypes}} read [options] [args]", + "Usage: threshold {{hyphentypes}} read [options] [args]", "", " Read {{articletype}} given its ID. Example:", "", - ` $ boundary {{hyphentypes}} read -id {{prefix}}_1234567890`, + ` $ threshold {{hyphentypes}} read -id {{prefix}}_1234567890`, "", "", }, resType, prefixMap)) @@ -102,11 +102,11 @@ func HelpMap(resType string) map[string]func() string { "delete": func() string { return base.WrapForHelpText(subtype([]string{ - "Usage: boundary {{hyphentypes}} delete [options] [args]", + "Usage: threshold {{hyphentypes}} delete [options] [args]", "", " Delete {{articletype}} given its ID. Example:", "", - ` $ boundary {{hyphentypes}} delete -id {{prefix}}_1234567890`, + ` $ threshold {{hyphentypes}} delete -id {{prefix}}_1234567890`, "", "", }, resType, prefixMap)) @@ -114,11 +114,11 @@ func HelpMap(resType string) map[string]func() string { "list": func() string { return base.WrapForHelpText(subtype([]string{ - "Usage: boundary {{hyphentypes}} list [options] [args]", + "Usage: threshold {{hyphentypes}} list [options] [args]", "", " List {{pluraltypes}} within an enclosing scope or resource. Example:", "", - ` $ boundary {{hyphentypes}} list`, + ` $ threshold {{hyphentypes}} list`, "", "", }, resType, prefixMap)) diff --git a/internal/cmd/config/config.go b/internal/cmd/config/config.go index 691c6642f..648e7e103 100644 --- a/internal/cmd/config/config.go +++ b/internal/cmd/config/config.go @@ -10,6 +10,7 @@ import ( "encoding/json" "errors" "fmt" + "github.com/hashicorp/boundary/api" "io" "net" "os" @@ -316,7 +317,7 @@ type Controller struct { // hashing workers is allowed. The default value is 1. Increasing this number // will increase the authentication throughput of all userpass auth methods, // but at the cost of bursty memory and CPU use. Can also be controlled via - // the environment variable BOUNDARY_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS. + // the environment variable THRESHOLD_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS. ConcurrentPasswordHashWorkersRaw any `hcl:"concurrent_password_hash_workers"` ConcurrentPasswordHashWorkers uint `hcl:"-"` } @@ -466,7 +467,7 @@ type License struct { Enabled bool `hcl:"enabled"` } -// DevWorker is a Config that is used for dev mode of Boundary +// DevWorker is a Config that is used for dev mode of Threshold // workers. Supported options: WithObservationsEnabled, WithSysEventsEnabled, // WithAuditEventsEnabled, TestWithErrorEventsEnabled func DevWorker(opt ...Option) (*Config, error) { @@ -511,7 +512,7 @@ func DevKeyGeneration(opt ...Option) string { return devKey } -// DevController is a Config that is used for dev mode of Boundary +// DevController is a Config that is used for dev mode of Threshold // controllers func DevController(opt ...Option) (*Config, error) { opts, err := getOpts(opt...) @@ -747,9 +748,9 @@ func Parse(d string) (*Config, error) { workerRPCGracePeriod := result.Controller.WorkerRPCGracePeriod if util.IsNil(workerRPCGracePeriod) { - // For backwards compatibility this is still called BOUNDARY_CONTROLLER_WORKER_STATUS_GRACE_PERIOD, + // For backwards compatibility this is still called THRESHOLD_CONTROLLER_WORKER_STATUS_GRACE_PERIOD, // though it is now used to control the SessionInfo and RoutingInfo RPCs. - workerRPCGracePeriod = os.Getenv("BOUNDARY_CONTROLLER_WORKER_STATUS_GRACE_PERIOD") + workerRPCGracePeriod = api.Getenv("THRESHOLD_CONTROLLER_WORKER_STATUS_GRACE_PERIOD") } if workerRPCGracePeriod != nil { t, err := parseutil.ParseDurationSecond(workerRPCGracePeriod) @@ -764,7 +765,7 @@ func Parse(d string) (*Config, error) { livenessTimeToStale := result.Controller.LivenessTimeToStale if util.IsNil(livenessTimeToStale) { - livenessTimeToStale = os.Getenv("BOUNDARY_CONTROLLER_LIVENESS_TIME_TO_STALE") + livenessTimeToStale = api.Getenv("THRESHOLD_CONTROLLER_LIVENESS_TIME_TO_STALE") } if livenessTimeToStale != nil { t, err := parseutil.ParseDurationSecond(livenessTimeToStale) @@ -779,7 +780,7 @@ func Parse(d string) (*Config, error) { getDownstreamWorkersTimeout := result.Controller.GetDownstreamWorkersTimeout if util.IsNil(getDownstreamWorkersTimeout) { - getDownstreamWorkersTimeout = os.Getenv("BOUNDARY_CONTROLLER_GET_DOWNSTREAM_WORKERS_TIMEOUT") + getDownstreamWorkersTimeout = api.Getenv("THRESHOLD_CONTROLLER_GET_DOWNSTREAM_WORKERS_TIMEOUT") } if getDownstreamWorkersTimeout != nil { t, err := parseutil.ParseDurationSecond(getDownstreamWorkersTimeout) @@ -903,10 +904,10 @@ func Parse(d string) (*Config, error) { } result.Controller.ConcurrentPasswordHashWorkers = uint(t) case nil: - if envVal := os.Getenv("BOUNDARY_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS"); envVal != "" { + if envVal := api.Getenv("THRESHOLD_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS"); envVal != "" { concurrentPasswordWorkers, err := strconv.Atoi(envVal) if err != nil { - return nil, fmt.Errorf("BOUNDARY_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS value is not an int: %w", err) + return nil, fmt.Errorf("THRESHOLD_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS value is not an int: %w", err) } result.Controller.ConcurrentPasswordHashWorkers = uint(concurrentPasswordWorkers) } @@ -947,9 +948,9 @@ func Parse(d string) (*Config, error) { statusCallTimeoutDuration := result.Worker.ControllerRPCCallTimeout if util.IsNil(statusCallTimeoutDuration) { - // For backwards compatibility this is still called BOUNDARY_WORKER_STATUS_CALL_TIMEOUT, + // For backwards compatibility this is still called THRESHOLD_WORKER_STATUS_CALL_TIMEOUT, // though it is now used to control the SessionInfo, Statistics and RoutingInfo RPCs. - statusCallTimeoutDuration = os.Getenv("BOUNDARY_WORKER_STATUS_CALL_TIMEOUT") + statusCallTimeoutDuration = api.Getenv("THRESHOLD_WORKER_STATUS_CALL_TIMEOUT") } if statusCallTimeoutDuration != nil { t, err := parseutil.ParseDurationSecond(statusCallTimeoutDuration) @@ -964,7 +965,7 @@ func Parse(d string) (*Config, error) { getDownstreamWorkersTimeoutDuration := result.Worker.GetDownstreamWorkersTimeout if util.IsNil(getDownstreamWorkersTimeoutDuration) { - getDownstreamWorkersTimeoutDuration = os.Getenv("BOUNDARY_WORKER_GET_DOWNSTREAM_WORKERS_TIMEOUT") + getDownstreamWorkersTimeoutDuration = api.Getenv("THRESHOLD_WORKER_GET_DOWNSTREAM_WORKERS_TIMEOUT") } if getDownstreamWorkersTimeoutDuration != nil { t, err := parseutil.ParseDurationSecond(getDownstreamWorkersTimeoutDuration) @@ -979,9 +980,9 @@ func Parse(d string) (*Config, error) { successfulControllerRPCGracePeriod := result.Worker.SuccessfulControllerRPCGracePeriod if util.IsNil(successfulControllerRPCGracePeriod) { - // For backwards compatibility this is still called BOUNDARY_WORKER_SUCCESSFUL_STATUS_GRACE_PERIOD, + // For backwards compatibility this is still called THRESHOLD_WORKER_SUCCESSFUL_STATUS_GRACE_PERIOD, // though it is now used to control the SessionInfo and RoutingInfo RPCs. - successfulControllerRPCGracePeriod = os.Getenv("BOUNDARY_WORKER_SUCCESSFUL_STATUS_GRACE_PERIOD") + successfulControllerRPCGracePeriod = api.Getenv("THRESHOLD_WORKER_SUCCESSFUL_STATUS_GRACE_PERIOD") } if successfulControllerRPCGracePeriod != nil { t, err := parseutil.ParseDurationSecond(successfulControllerRPCGracePeriod) diff --git a/internal/cmd/config/config_test.go b/internal/cmd/config/config_test.go index 1d9db33c4..b803c31a6 100644 --- a/internal/cmd/config/config_test.go +++ b/internal/cmd/config/config_test.go @@ -1045,7 +1045,7 @@ controller { func TestWorkerTags(t *testing.T) { defaultStateFn := func(t *testing.T, tags string) { - t.Setenv("BOUNDARY_WORKER_TAGS", tags) + t.Setenv("THRESHOLD_WORKER_TAGS", tags) } tests := []struct { name string @@ -1129,7 +1129,7 @@ func TestWorkerTags(t *testing.T) { name: "empty env var", in: ` worker { - tags = "env://BOUNDARY_WORKER_TAGS" + tags = "env://THRESHOLD_WORKER_TAGS" }`, expWorkerTags: map[string][]string{}, expErr: false, @@ -1162,7 +1162,7 @@ func TestWorkerTags(t *testing.T) { name: "one tag key", in: ` worker { - tags = "env://BOUNDARY_WORKER_TAGS" + tags = "env://THRESHOLD_WORKER_TAGS" }`, stateFn: defaultStateFn, actualTags: `type = ["dev", "local"]`, @@ -1175,7 +1175,7 @@ func TestWorkerTags(t *testing.T) { name: "multiple tag keys", in: ` worker { - tags = "env://BOUNDARY_WORKER_TAGS" + tags = "env://THRESHOLD_WORKER_TAGS" }`, stateFn: defaultStateFn, actualTags: ` @@ -1214,7 +1214,7 @@ func TestWorkerTags(t *testing.T) { name: "json tags - entire tags block", in: ` worker { - tags = "env://BOUNDARY_WORKER_TAGS" + tags = "env://THRESHOLD_WORKER_TAGS" }`, stateFn: defaultStateFn, actualTags: ` @@ -1234,13 +1234,13 @@ func TestWorkerTags(t *testing.T) { in: ` worker { tags = { - type = "env://BOUNDARY_WORKER_TAGS" - typetwo = "env://BOUNDARY_WORKER_TAGS_TWO" + type = "env://THRESHOLD_WORKER_TAGS" + typetwo = "env://THRESHOLD_WORKER_TAGS_TWO" } }`, stateFn: func(t *testing.T, tags string) { defaultStateFn(t, tags) - t.Setenv("BOUNDARY_WORKER_TAGS_TWO", `["devtwo", "localtwo"]`) + t.Setenv("THRESHOLD_WORKER_TAGS_TWO", `["devtwo", "localtwo"]`) }, actualTags: `["dev","local"]`, expWorkerTags: map[string][]string{ @@ -1255,7 +1255,7 @@ func TestWorkerTags(t *testing.T) { worker { name = "web-prod-us-east-1" tags { - type = "env://BOUNDARY_WORKER_TYPE_TAGS" + type = "env://THRESHOLD_WORKER_TYPE_TAGS" typetwo = "file://type_two_tags.json" typethree = ["devthree", "localthree"] } @@ -1263,7 +1263,7 @@ func TestWorkerTags(t *testing.T) { `, stateFn: func(t *testing.T, tags string) { workerTypeTags := `["dev", "local"]` - t.Setenv("BOUNDARY_WORKER_TYPE_TAGS", workerTypeTags) + t.Setenv("THRESHOLD_WORKER_TYPE_TAGS", workerTypeTags) filepath := "./type_two_tags.json" err := os.WriteFile(filepath, []byte(`["devtwo", "localtwo"]`), 0o666) @@ -1286,8 +1286,8 @@ func TestWorkerTags(t *testing.T) { in: ` worker { tags = { - type = "env://BOUNDARY_WORKER_TAGS" - typetwo = "env://BOUNDARY_WORKER_TAGS" + type = "env://THRESHOLD_WORKER_TAGS" + typetwo = "env://THRESHOLD_WORKER_TAGS" } }`, stateFn: defaultStateFn, @@ -1305,7 +1305,7 @@ func TestWorkerTags(t *testing.T) { name: "no clean mapping to internal structures", in: ` worker { - tags = "env://BOUNDARY_WORKER_TAGS" + tags = "env://THRESHOLD_WORKER_TAGS" }`, stateFn: defaultStateFn, actualTags: ` @@ -1321,7 +1321,7 @@ func TestWorkerTags(t *testing.T) { { name: "not HCL", in: `worker { - tags = "env://BOUNDARY_WORKER_TAGS" + tags = "env://THRESHOLD_WORKER_TAGS" }`, stateFn: defaultStateFn, actualTags: `not_hcl`, @@ -1654,10 +1654,10 @@ func TestWorkerUpstreams(t *testing.T) { in: ` worker { name = "test" - initial_upstreams = "env://BOUNDARY_WORKER_UPSTREAMS" + initial_upstreams = "env://THRESHOLD_WORKER_UPSTREAMS" } `, - stateFn: func(t *testing.T) { t.Setenv("BOUNDARY_WORKER_UPSTREAMS", `["127.0.0.1", "127.0.0.2", "127.0.0.3"]`) }, + stateFn: func(t *testing.T) { t.Setenv("THRESHOLD_WORKER_UPSTREAMS", `["127.0.0.1", "127.0.0.2", "127.0.0.3"]`) }, expWorkerUpstreams: []string{"127.0.0.1", "127.0.0.2", "127.0.0.3"}, expErr: false, }, @@ -1666,7 +1666,7 @@ func TestWorkerUpstreams(t *testing.T) { in: ` worker { name = "test" - initial_upstreams = "env://BOUNDARY_WORKER_UPSTREAMS" + initial_upstreams = "env://THRESHOLD_WORKER_UPSTREAMS" } `, stateFn: func(t *testing.T) { @@ -1675,7 +1675,7 @@ func TestWorkerUpstreams(t *testing.T) { initial_upstreams = ["127.0.0.1"] } ` - t.Setenv("BOUNDARY_WORKER_UPSTREAMS", upstreams) + t.Setenv("THRESHOLD_WORKER_UPSTREAMS", upstreams) }, expWorkerUpstreams: nil, expErr: true, @@ -1686,10 +1686,10 @@ func TestWorkerUpstreams(t *testing.T) { in: ` worker { name = "test" - initial_upstreams = "env://BOUNDARY_WORKER_UPSTREAMS" + initial_upstreams = "env://THRESHOLD_WORKER_UPSTREAMS" } `, - stateFn: func(t *testing.T) { t.Setenv("BOUNDARY_WORKER_UPSTREAMS", `initial_upstreams = ["127.0.0.1"]`) }, + stateFn: func(t *testing.T) { t.Setenv("THRESHOLD_WORKER_UPSTREAMS", `initial_upstreams = ["127.0.0.1"]`) }, expWorkerUpstreams: nil, expErr: true, expErrStr: "Failed to parse worker upstreams: failed to unmarshal env/file contents: invalid character 'i' looking for beginning of value", @@ -3523,7 +3523,7 @@ func TestConcurrentPasswordHashWorkers(t *testing.T) { } t.Run("using environment variable", func(t *testing.T) { - t.Setenv("BOUNDARY_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS", "2") + t.Setenv("THRESHOLD_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS", "2") in := ` controller { name = "example-controller" @@ -3536,7 +3536,7 @@ func TestConcurrentPasswordHashWorkers(t *testing.T) { }) t.Run("using environment variable with invalid value", func(t *testing.T) { - t.Setenv("BOUNDARY_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS", "invalid") + t.Setenv("THRESHOLD_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS", "invalid") in := ` controller { name = "example-controller" @@ -3544,11 +3544,11 @@ func TestConcurrentPasswordHashWorkers(t *testing.T) { c, err := Parse(in) require.Error(t, err) require.Nil(t, c) - require.Contains(t, err.Error(), "BOUNDARY_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS value is not an int") + require.Contains(t, err.Error(), "THRESHOLD_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS value is not an int") }) t.Run("using environment variable and config value uses config value", func(t *testing.T) { - t.Setenv("BOUNDARY_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS", "2") + t.Setenv("THRESHOLD_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS", "2") in := ` controller { name = "example-controller" diff --git a/internal/cmd/config/options.go b/internal/cmd/config/options.go index 32a33e56a..118070871 100644 --- a/internal/cmd/config/options.go +++ b/internal/cmd/config/options.go @@ -4,8 +4,8 @@ package config import ( "crypto/rand" + "github.com/hashicorp/boundary/api" "io" - "os" "testing" "github.com/hashicorp/go-secure-stdlib/parseutil" @@ -45,31 +45,31 @@ type options struct { func getDefaultOptions() (options, error) { opts := options{} - sysEvents, err := parseutil.ParseBool(os.Getenv("BOUNDARY_ENABLE_TEST_SYS_EVENTS")) + sysEvents, err := parseutil.ParseBool(api.Getenv("THRESHOLD_ENABLE_TEST_SYS_EVENTS")) if err != nil { return opts, err } opts.withSysEventsEnabled = sysEvents - auditEvents, err := parseutil.ParseBool(os.Getenv("BOUNDARY_ENABLE_TEST_AUDIT_EVENTS")) + auditEvents, err := parseutil.ParseBool(api.Getenv("THRESHOLD_ENABLE_TEST_AUDIT_EVENTS")) if err != nil { return opts, err } opts.withAuditEventsEnabled = auditEvents - obs, err := parseutil.ParseBool(os.Getenv("BOUNDARY_ENABLE_TEST_OBSERVATIONS")) + obs, err := parseutil.ParseBool(api.Getenv("THRESHOLD_ENABLE_TEST_OBSERVATIONS")) if err != nil { return opts, err } opts.withObservationsEnabled = obs - ipv6, err := parseutil.ParseBool(os.Getenv("BOUNDARY_ENABLE_TEST_IPV6")) + ipv6, err := parseutil.ParseBool(api.Getenv("THRESHOLD_ENABLE_TEST_IPV6")) if err != nil { return opts, err } opts.withIPv6Enabled = ipv6 - errEvents, err := parseutil.ParseBool(os.Getenv("BOUNDARY_ENABLE_TEST_ERROR_EVENTS")) + errEvents, err := parseutil.ParseBool(api.Getenv("THRESHOLD_ENABLE_TEST_ERROR_EVENTS")) if err != nil { return opts, err } diff --git a/internal/cmd/gencli/templates.go b/internal/cmd/gencli/templates.go index 287cfc558..d72e9793a 100644 --- a/internal/cmd/gencli/templates.go +++ b/internal/cmd/gencli/templates.go @@ -260,7 +260,7 @@ func (c *{{ camelCase .SubActionPrefix }}Command) Run(args []string) int { init{{ camelCase .SubActionPrefix }}Flags() {{ if .HasExampleCliOutput }} - if os.Getenv("BOUNDARY_EXAMPLE_CLI_OUTPUT") != "" { + if api.Getenv("THRESHOLD_EXAMPLE_CLI_OUTPUT") != "" { c.UI.Output(exampleOutput()) return base.CommandSuccess } @@ -340,14 +340,14 @@ func (c *{{ camelCase .SubActionPrefix }}Command) Run(args []string) int { {{ if hasAction .StdActions "create" }} case "create": if c.Flag{{ .Container }}Id == "" { - c.PrintCliError(errors.New("{{ .Container }} ID must be passed in via -{{ kebabCase .Container }}-id or BOUNDARY_{{ envCase .Container }}_ID")) + c.PrintCliError(errors.New("{{ .Container }} ID must be passed in via -{{ kebabCase .Container }}-id or THRESHOLD_{{ envCase .Container }}_ID")) return base.CommandUserError } {{ end }} {{ if hasAction .StdActions "list" }} case "list": if c.Flag{{ .Container }}Id == "" { - c.PrintCliError(errors.New("{{ .Container }} ID must be passed in via -{{ kebabCase .Container }}-id or BOUNDARY_{{ envCase .Container }}_ID")) + c.PrintCliError(errors.New("{{ .Container }} ID must be passed in via -{{ kebabCase .Container }}-id or THRESHOLD_{{ envCase .Container }}_ID")) return base.CommandUserError } {{ end }} diff --git a/internal/cmd/main.go b/internal/cmd/main.go index e1b9d2755..50c4f30b2 100644 --- a/internal/cmd/main.go +++ b/internal/cmd/main.go @@ -73,7 +73,7 @@ func setupEnv(args []string) (retArgs []string, format string, outputCurlString } } - envBoundaryCLIFormat := os.Getenv(base.EnvBoundaryCLIFormat) + envBoundaryCLIFormat := api.Getenv(base.EnvBoundaryCLIFormat) // If we did not parse a value, fetch the env var if format == "" && envBoundaryCLIFormat != "" { format = envBoundaryCLIFormat @@ -155,7 +155,7 @@ func RunCustom(args []string, runOpts *RunOptions) (exitCode int) { // Don't use color if disabled useColor := true - if os.Getenv(base.EnvBoundaryCLINoColor) != "" || color.NoColor { + if api.Getenv(base.EnvBoundaryCLINoColor) != "" || color.NoColor { useColor = false } @@ -228,15 +228,15 @@ func RunCustom(args []string, runOpts *RunOptions) (exitCode int) { compLine = compLine[:point] } args = strings.Split(compLine, " ") - args = args[1:] // elide "boundary" since the function below expects it to not be there + args = args[1:] // elide "threshold" since the function below expects it to not be there } args = handleHighLevelShortcuts(args, runOpts) // Set args back if compLine != "" { - // We need to add back "boundary" as well - os.Setenv("COMP_LINE", strings.Join(append([]string{"boundary"}, args...), " ")) + // We need to add back "threshold" as well + os.Setenv("COMP_LINE", strings.Join(append([]string{"threshold"}, args...), " ")) } initCommands(ui, serverCmdUi, runOpts) @@ -244,11 +244,11 @@ func RunCustom(args []string, runOpts *RunOptions) (exitCode int) { hiddenCommands := []string{"version"} cli := &cli.CLI{ - Name: "boundary", + Name: "threshold", Args: args, Commands: Commands, HelpFunc: groupedHelpFunc( - cli.BasicHelpFunc("boundary"), + cli.BasicHelpFunc("threshold"), ), HelpWriter: runOpts.Stderr, HiddenCommands: hiddenCommands, @@ -291,7 +291,7 @@ func groupedHelpFunc(f cli.HelpFunc) cli.HelpFunc { var b bytes.Buffer tw := tabwriter.NewWriter(&b, 0, 2, 6, ' ', 0) - fmt.Fprintf(tw, "Usage: boundary [args]\n") + fmt.Fprintf(tw, "Usage: threshold [args]\n") genericCommands := make([]string, 0, 3) clientCommands := make([]string, 0, 9) diff --git a/internal/cmd/ops/server.go b/internal/cmd/ops/server.go index f6de5e3af..2a1979672 100644 --- a/internal/cmd/ops/server.go +++ b/internal/cmd/ops/server.go @@ -1,7 +1,7 @@ // Copyright IBM Corp. 2020, 2026 // SPDX-License-Identifier: BUSL-1.1 -// Package ops encapsulates the lifecycle of Boundary's ops-purpose listeners +// Package ops encapsulates the lifecycle of Threshold's ops-purpose listeners // and servers: Creating, setting them up, starting and shutdown. package ops diff --git a/internal/cmd/wrapper/command_wrapper.go b/internal/cmd/wrapper/command_wrapper.go index 2bd6b2e28..14aafe1a3 100644 --- a/internal/cmd/wrapper/command_wrapper.go +++ b/internal/cmd/wrapper/command_wrapper.go @@ -35,7 +35,7 @@ type WrappableCommand interface { BaseCommand() *base.Command } -// CommandWrapper starts the boundary cache after the command was Run and attempts +// CommandWrapper starts the threshold cache after the command was Run and attempts // to send the current persona to any running daemon. type CommandWrapper struct { WrappableCommand @@ -50,7 +50,7 @@ func Wrap(c func() WrappableCommand) cli.CommandFactory { } } -// Run runs the wrapped command and then attempts to start the boundary cache and send +// Run runs the wrapped command and then attempts to start the threshold cache and send // the current token to it. func (w *CommandWrapper) Run(args []string) int { // potentially intercept the token in case it isn't stored in the keyring diff --git a/internal/daemon/controller/handler.go b/internal/daemon/controller/handler.go index 8cef826b8..a3a7767c8 100644 --- a/internal/daemon/controller/handler.go +++ b/internal/daemon/controller/handler.go @@ -11,10 +11,10 @@ import ( "encoding/json" "errors" "fmt" + "github.com/hashicorp/boundary/api" "io" "net/http" "net/textproto" - "os" "path" "strings" "time" @@ -476,7 +476,7 @@ func wrapHandlerWithCommonFuncs(h http.Handler, c *Controller, props HandlerProp } disableAuthzFailures := c.conf.DisableAuthorizationFailures || - (c.conf.RawConfig.DevController && os.Getenv("BOUNDARY_DEV_SKIP_AUTHZ") != "") + (c.conf.RawConfig.DevController && api.Getenv("BOUNDARY_DEV_SKIP_AUTHZ") != "") if disableAuthzFailures { event.WriteSysEvent(context.TODO(), op, "AUTHORIZATION CHECKING DISABLED") } @@ -629,7 +629,7 @@ type cmdAttrs struct { } func wrapHandlerWithCallbackInterceptor(h http.Handler, c *Controller) http.Handler { - logCallbackErrors := os.Getenv("BOUNDARY_LOG_CALLBACK_ERRORS") != "" + logCallbackErrors := api.Getenv("BOUNDARY_LOG_CALLBACK_ERRORS") != "" return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { const op = "controller.wrapHandlerWithCallbackInterceptor" diff --git a/internal/server/worker_list.go b/internal/server/worker_list.go index 1a7adbf88..10fa77d74 100644 --- a/internal/server/worker_list.go +++ b/internal/server/worker_list.go @@ -9,7 +9,6 @@ import ( stderrors "errors" "fmt" "math/big" - "strings" "github.com/hashicorp/boundary/internal/daemon/controller/handlers" "github.com/hashicorp/boundary/internal/event" @@ -141,10 +140,7 @@ workerLoop: } if len(features) > 0 { versionString := worker.ReleaseVersion - idx := strings.Index(versionString, version.BoundaryPrefix) - if idx >= 0 { - versionString = versionString[idx+len(version.BoundaryPrefix):] - } + versionString = version.TrimReleasePrefix(versionString) nodeVersion, err := gvers.NewVersion(versionString) if err != nil { // Emit error and continue, as we might still find a different worker diff --git a/scripts/build.sh b/scripts/build.sh index e213c4cf5..3eeb7be12 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -17,7 +17,7 @@ DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )" cd "$DIR" # Set build tags -BUILD_TAGS="${BUILD_TAGS:-"boundary"}" +BUILD_TAGS="${BUILD_TAGS:-"threshold"}" echo "==> Build tags: ${BUILD_TAGS}" # Get the git commit @@ -61,7 +61,7 @@ fi BASE_PRODUCT_VERSION=${BASE_PRODUCT_VERSION:=$(cat version/VERSION)} # Declare binary paths! -BINARY_NAME="boundary${BINARY_SUFFIX}" +BINARY_NAME="threshold${BINARY_SUFFIX}" BIN_PATH=${BIN_PATH:=bin/${BINARY_NAME}} BIN_PARENT_DIR="${BIN_PATH%/*}" BIN_PARENT_DIR="${BIN_PARENT_DIR##*/}" @@ -85,10 +85,10 @@ ${GO_CMD} build \ -X 'github.com/hashicorp/boundary/version.BuildDate=$BUILD_DATE' " \ -o "$BIN_PATH" \ - ./cmd/boundary + ./cmd/threshold # Copy binary into gopath if desired -if [ "${BOUNDARY_INSTALL_BINARY}x" != "x" ]; then +if [ "${THRESHOLD_INSTALL_BINARY:-${BOUNDARY_INSTALL_BINARY:-}}x" != "x" ]; then echo "==> Moving binary into GOPATH/bin..." mv -f "${BIN_PATH}" "${GOPATH}/bin/" fi diff --git a/version/version.go b/version/version.go index f7e852577..08a5c725c 100644 --- a/version/version.go +++ b/version/version.go @@ -11,7 +11,26 @@ import ( gvers "github.com/hashicorp/go-version" ) -const BoundaryPrefix = "Boundary v" +const ( + // BoundaryPrefix is the release version prefix used on the wire. It is + // kept as the emitted prefix so that this binary stays compatible with + // upstream HashiCorp Boundary peers that parse it. + BoundaryPrefix = "Boundary v" + // ThresholdPrefix is the release version prefix used for display and + // accepted additively when parsing. + ThresholdPrefix = "Threshold v" +) + +// TrimReleasePrefix removes a leading (or embedded) "Boundary v" or +// "Threshold v" release prefix from s, if present. +func TrimReleasePrefix(s string) string { + for _, p := range []string{BoundaryPrefix, ThresholdPrefix} { + if idx := strings.Index(s, p); idx >= 0 { + return s[idx+len(p):] + } + } + return s +} // Info type Info struct { @@ -85,6 +104,7 @@ func (c *Info) Semver() *gvers.Version { func FromVersionString(s string) *Info { s = strings.TrimSpace(s) s = strings.TrimPrefix(s, BoundaryPrefix) + s = strings.TrimPrefix(s, ThresholdPrefix) i := Info{} // Get the revision @@ -113,14 +133,26 @@ func FromVersionString(s string) *Info { return &i } +// FullVersionNumber returns the wire-format release version, which uses the +// upstream "Boundary v" prefix for compatibility with peers. func (c *Info) FullVersionNumber(rev bool) string { + return c.fullVersionNumber(BoundaryPrefix, "Boundary", rev) +} + +// DisplayVersionNumber returns the release version for display to users, +// using the "Threshold v" prefix. Do not send this value over the wire. +func (c *Info) DisplayVersionNumber(rev bool) string { + return c.fullVersionNumber(ThresholdPrefix, "Threshold", rev) +} + +func (c *Info) fullVersionNumber(prefix, name string, rev bool) string { var versionString bytes.Buffer if Version == "unknown" && VersionPrerelease == "unknown" { - return "Boundary (version unknown)" + return name + " (version unknown)" } - fmt.Fprintf(&versionString, "%s%s", BoundaryPrefix, c.Version) + fmt.Fprintf(&versionString, "%s%s", prefix, c.Version) if c.VersionPrerelease != "" { fmt.Fprintf(&versionString, "-%s", c.VersionPrerelease) }