Start a Development Environment
In this tutorial, you will start Boundary in dev mode and authenticate as the admin user.
Boundary provides a dev mode to enable quick testing and exploration. Dev mode provides admin credentials for password authentication.
Prerequisites
- Docker is installed
- A route to download the Postgres Docker image image or a local image cached
- A Boundary binary in your
PATH
Launch Terminal
This tutorial includes a free interactive command-line lab that lets you follow along on actual cloud infrastructure.
Start a dev environment
A deployment of a highly available (HA) Boundary service requires multiple controllers and workers to construct a cluster.
Controllers are responsible for understanding configuration, authenticating and authorizing users, and serving user API requests (e.g. to initiate a session).
Boundary clusters require an accessible key management service (KMS) and database shared by controllers. Boundary's database maintains the state of Boundary's resources, identities, and access policies. Boundary's KMS is customer-defined and serves as Boundary's root-of-trust for at-rest and in-transit encryption.
Workers are responsible for the actual session recording/proxying capability and other tasks that involve storage.
Dev mode brings up a fully functioning instance of Boundary which includes:
- A controller server
- A worker server
- A Postgres database
These components are ephemeral; therefore, data is not persisted and convenient for quick testing.
Warning
Dev mode is not suitable for production environments.
Check the help message for boundary dev
command.
There are optional flags available to configure Boundary environment through the command line.
Start Boundary in development mode.
Warning
On Windows systems you may encounter the following error when running
boundary dev
:
Warning
If the error is similar to the one printed above, the Docker daemon may need to be exposed on port 2375 without TLS.
Open Docker Desktop, and navigate to the Settings panel by clicking on the gear icon at the top-right of the screen.
Under General settings, click the checkbox next to Expose deamon on tcp://localhost:2375 without TLS to enable the setting. Then click Apply & Restart to restart Docker Desktop. The screenshot below shows the setting that should be enabled.
After Docker Desktop restarts, attempt running boundary dev
again.
Boundary starts in dev mode with default authentication credentials and a set of pre-defined resources.
These admin credentials enable you to log in the Boundary console.
- Generated Auth Method Id:
ampw_1234567890
- Generated Auth Method Login Name:
admin
- Generated Auth Method Password:
password
The default login name and password can be overwritten with -login-name
and
-password
flags (e.g. boundary dev -login-name="dev-admin" -password="p@ssw0rd"
).
Login to the Boundary console
You can authenticate to the Boundary console via the Admin console or the CLI.
In a browser window, navigate to the Boundary Admin console at
http://127.0.0.1:9200
This launches the Boundary Admin console.
Enter
admin
in the Username field.This is the Generated Auth Method Login Name.
Enter
password
in the Password field.This is the Generated Auth Method Password.
Click Authenticate.
You are presented with the global scope, which contains the Generated org scope with the ID
o_1234567890
.
Troubleshooting
Boundary clusters require an accessible key management service (KMS). An error may occur if this service is not running.
If you are having problems logging in with boundary authenticate
,
especially on Unix-like operating systems other than MacOS, you may be having
problems with your local key store. See the Deploy and Login to
Boundary
page in Boundary's documentation for more details.
Click on the error message below for step-by-step solutions to continue the Getting Started tutorials.
In a Unix shell this error implies that the freedesktop.org Secret Service implementation is not available. To fix this issue you can either bypass the keyring or enable the system KMS.
Method 1: Bypass the keyring
The CLI can bypass the operating system's keyring manager by overriding the keyring type and managing the token in the environment variable.
Set the BOUNDARY_TOKEN
environment variable to the authentication token.
If you are using Boundary 0.9.1 or lower, use this command:
If you are using Boundary 0.10.0 or higher, use these commands:
The keyring is bypassed by setting keyring-type
to disabled (none
). The
results are formatted to json -format=json
, and parsed by jq
for the token
value.
Method 2: Enable the system KMS
You can fix this error by installing the dbus-x11
and gnome-keyring
packages
and manually invoking the keyring daemon.
On Ubuntu, install the dbus-x11
and gnome-keyring
packages.
Create the variable KEYRING_PASSWORD
with a password.
You can prevent the password from being captured on the command line by
running the gnome-keyring-daemon
command directly and entering in the password
when requested, followed by a newline (return) and an EOF (Ctrl+D
).
Substitute FOOBAR
with a password of your choice. Leave the \n
.
Create a default keyring and unlock it with a password.
Connect to the keyring daemon and initialize it with the same password.
Run this in any shell where the Boundary CLI is invoked.
Next steps
You started Boundary in dev mode and authenticated as the admin user. Next you will manage resources using the Boundary admin console.