For the complete documentation index, see llms.txt. This page is also available as Markdown.

BlueDev Identity Deployment Kit

The Bluedev Identity Deployment Kit provides instructions for bringing up a StepCA server to manage OIDC provisioners and handle enrollment requests initiated by bluedev-bouncer on BlueRock hosts.

The StepCA server can be deployed either directly within a BlueRock VM instance or on a separate VM to serve multiple BlueRock instances. The StepCA package contains Docker files for StepCA and Caddy, along with just command scripts for setup and management.

  • StepCA: Registers OIDC provisioners for bluedevx sign-in and accepts enrollment authentication requests initiated by bluedev-bouncer.

  • Caddy (Optional): Handles automatic TLS certificate generation and maintenance from Let's Encrypt for public deployments. For private, VPN-gated network architectures, StepCA can run independently without Caddy by binding directly to a private interface.

StepCA Deployment

Deploying the StepCA server establishes the central Certificate Authority (CA) required to issue short-lived SSH certificates for user authentication and host enrollment. The following procedures outline the end-to-end setup, from extracting the deployment package to bringing up the service.

lightbulb-exclamation-on

Prerequisites and Installation

  1. Extract the package source:

    lightbulb-exclamation-on
  2. Install prerequisites:

    1. For AL2023:

    2. For Ubuntu:

Configure Environment

Navigate to the compose directory and configure the environment settings:

Define the following variables in the .env file to set the enrollment password and the host certificate validity windows:

  • BOUNCER_PASSWORD: The password matched during BlueRock Host enrollment.

  • DEFAULT_HOST_SSH_CERT_DURATION: Sets the validity duration assigned to enrolled hosts upon signing.

  • MAX_HOST_SSH_CERT_DURATION: Sets the maximum validity ceiling enforced by step-ca for host certificates. Keep the default at or below the max.

Choose a Deployment Architecture

Configure the .env file based on the required network architecture:

Private Deployment (without Caddy)

Use this configuration for a CA reachable over a VPN-gated private subnet or SSH tunnel (without Caddy). StepCA publishes directly on a specific interface using self-signed TLS certificates generated for the designated private IP.

notes-sticky

Note:

Avoid setting STEPCA_BIND_ADDR to 0.0.0.0. This configuration generates the leaf certificate without Subject Alternative Name (SAN) information and bypasses strict firewall routing. Specify the exact private IP address and let the subnet's security group serve as the security boundary.

Without Caddy deployment, CADDY_DOMAIN should be blank.

Public Deployment (with Caddy)

Use this configuration for a publicly reachable StepCA server using Let's Encrypt or a local CA:

notes-sticky

Note:

When a registered public DNS domain is unavailable, set CADDY_DOMAIN directly to the Public IP address of the VM instance (for example, CADDY_DOMAIN=000.0.000.00). StepCA will include the Public IP in the Subject Alternative Names (SANs) of the certificate so client handshakes validate without certificate naming errors.

Without Caddy deployment, CADDY_DOMAIN should be blank.

Configure Google Identity Provisioner

  1. Create a Google OIDC Desktop Client App via the Google Cloud Console (Requires admin privileges) to enable Google Workspace integration. To create a Google OIDC app:

    1. Access the Google Cloud Console and select or create a project.

    2. Navigate to APIs & Services, then select Credentials.

    3. Configure the OAuth Consent Screen by selecting the user type (Internal or External) and defining the mandatory fields, such as the App Name and support email.

    4. Select Create Credentials and choose OAuth client ID.

    5. Select Desktop app as the Application type. This automatically sets the redirect URI to http://127.0.0.1. Define a name and select Create.

    6. Copy the generated Client ID and Client Secret.

lightbulb-exclamation-on
  1. Copy and edit the Google provider template:

  2. Configure the required parameters:

Google Workspace Provisioner Configuration Variables

Review and define the following variables carefully before executing the provisioner setup script. Incorrect values will prevent successful host enrollment and developer authentication.

Variable

Description

Notes

PROVISIONER_NAME

The internal identifier for the OIDC provisioner within the StepCA configuration.

Example: google

ISSUER_URL

The OpenID Connect discovery endpoint for Google Workspace.

The value must be exactly https://accounts.google.com.

CLIENT_ID

The OAuth 2.0 Client ID generated within the Google Cloud Console credentials page.

Required to identify the application to Google's authorization servers.

CLIENT_SECRET

The sensitive OAuth 2.0 Client Secret paired with the designated Client ID.

Must be kept secure and never committed to version control.

ADMINS

A comma-separated list of administrator email addresses authorized to manage the CA.

Example: admin@domain.com

DOMAIN_RESTRICT

The specific email domain authorized to authenticate via this OIDC provisioner.

Example: bluerock.io

BLUEDEV_DOMAINS

The domain name utilized for generating the SSH principal mapping.

Typically matches the DOMAIN_RESTRICT value.

DEFAULT_SSH_CERT_DURATION

The standard time-to-live (TTL) validity period assigned to issued SSH certificates.

Example: 8h

MAX_SSH_CERT_DURATION

The absolute maximum validity period permitted for issued SSH certificates.

Example: 24h

Note:

Configuring the BLUEDEV_DOMAINS parameter is mandatory. This variable is required to correctly map and generate the SSH principal during authentication.

Service Bring-Up and Management

Review available commands using just help:

  1. Register the OIDC provider and start services:

  2. Check health status:

    Expected Output:

  3. Retrieve the auto-generated CA enrolment string:

    Output format:

    For private deployments, the generated fingerprint URL utilizes the specified private IP address. Output format:

lightbulb-exclamation-on

Enrol BlueRock Host

Log in to the BlueRock VM and execute the enrollment command using the generated CA URL:

Enter the BOUNCER_PASSWORD when prompted

notes-sticky

Note:

The <STEP_CA_VM_PUBLIC_DNS_OR_PUBLIC_IP> accepts either the domain name or raw Public IP address of your StepCA server. For private deployments without Caddy, the URL will use the StepCA server's private IP address. Ensure the BlueRock host has network connectivity to this private IP (for example, by residing in the same private subnet or being reachable via VPN).

Modifying Certificate Expiration (TTL)

Updating these configuration values is only required if the validity window needs to be changed after the initial CA deployment.

Modifying User Certificate Expiration (TTL)

To extend the session validity period and reduce sign-out frequency, update the Time-to-Live (TTL) settings in the provider configuration.

  1. Open the relevant provider environment file (for example, providers/entra.env or providers/google.env).

  2. Update the duration parameters to the required validity period (for example, 168 hours). The MAX_SSH_CERT_DURATION value must always be greater than or equal to the DEFAULT_SSH_CERT_DURATION value:

  3. Apply the configuration changes by executing the non-destructive update command:

notes

Note:

Updated validity periods take effect upon the next authentication. Existing sessions maintain the current expiration until the next sign-in.

Modifying Host Certificate Expiration

To modify the host SSH certificate lifetimes on the StepCA server after the initial deployment:

  1. Open ./compose/.env in the identity CA kit directory (/opt/bluedev-identity) on the StepCA VM instance.

  2. Update the DEFAULT_HOST_SSH_CERT_DURATION and MAX_HOST_SSH_CERT_DURATION variables to the new required validity period.

  3. Execute the non-destructive update command on the StepCA VM instance to apply the updated environment variables:

lightbulb-exclamation-on

Renewing the Host Certificate After TTL Change

Host certificates require manual monitoring for expiration. To prevent connectivity loss, verify the remaining time-to-live (TTL) and manually renew the certificate before it expires.

Renewing the Host Certificate

To renew a certificate before the TTL expires, retrieve the credentials from the StepCA server and execute the enrollment command again.

  1. Retrieve CA Information (On the StepCA VM): Retrieve the required CA URL, provisioner, and password by running the following command on the StepCA VM instance:

  2. Execute Renewal (On the BlueRock Host): Log in to the affected BlueRock host and execute the enrollment command to renew the certificate:

Operational Requirements:

  • --ca (Mandatory): Must include the full URL appended with #fp=<SPKI-FINGERPRINT>. A non-interactive enrollment refuses a bare fingerprint.

  • --password (Mandatory): Must read from standard input (stdin) to prevent exposing plain-text credentials in process list arguments.

  • --principals (Optional): Required to map the host's primary private IP address. Omitting this flag generates a valid certificate that leaves the host unreachable.

notes

Note:

Back up /etc/bluedev/user_ca.pub prior to renewal and confirm it remains unchanged afterward, as it carries the appended gateway CA. The enroll command automatically reloads sshd upon completion.

Checking Host Certificate Validity

To check the host certificate status and remaining TTL directly on the BlueRock host instance, run the primary JSON health probe:

The output reports the remaining validity window and warns when a renewal is required.

Expected Output:

Alternatively, inspect the certificate and view the principals via ssh-keygen:

lightbulb-exclamation-on

Configure Microsoft Entra ID Provisioner

  1. Create an OIDC Desktop App using App Registrations in the Azure Portal to enable Microsoft Entra ID integration. To create a Microsoft Entra ID app:

    1. Access the Azure Portal and navigate to Microsoft Entra ID.

    2. Select App registrations, then select New registration.

    3. Define the application name and select the supported organizational directory account types.

    4. Set the Platform to Public client (mobile & desktop).

    5. Set the Redirect URI to http://127.0.0.1.

    6. Select Register and copy the generated Application (client) ID.

lightbulb-exclamation-on
  1. Create and edit entra.env:

  2. Configure the required parameters:

Entra ID Provisioner Configuration Variables

Review and define the following variables carefully before executing the provisioner setup script. Incorrect values will prevent successful host enrollment and developer authentication.

Variable
Description
Notes

PROVISIONER_NAME

The internal identifier for the OIDC provisioner within the StepCA configuration.

Example: entra

ISSUER_URL

The OpenID Connect discovery endpoint for the Microsoft Entra ID tenant.

Replace <TENANT_ID> with the exact Entra tenant ID.

CLIENT_ID

The Application (client) ID generated during the Entra ID app registration process.

Located in the Entra ID application overview panel.

ADMINS

A comma-separated list of administrator email addresses authorized to manage the CA.

Example: admin@domain.com

DOMAIN_RESTRICT

The specific email domain authorized to authenticate via this OIDC provisioner.

Example: bluerock.io

BLUEDEV_DOMAINS

The domain name utilized for generating the SSH principal mapping.

Typically matches the DOMAIN_RESTRICT value.

DEFAULT_SSH_CERT_DURATION

The standard time-to-live (TTL) validity period assigned to issued SSH certificates.

Example: 8h

MAX_SSH_CERT_DURATION

The absolute maximum validity period permitted for issued SSH certificates.

Example: 24h

Note:

Configuring the BLUEDEV_DOMAINS parameter is mandatory. This variable is required to correctly map and generate the SSH principal during authentication.

Bring-Up Service

Register the Entra ID provider and start services:

Retrieve Fingerprint and Enroll Host

  1. Get the host enrollment string:

    Expected output:

  2. Log in to the target BlueRock VM and execute enrollment:

    Enter the BOUNCER_PASSWORD when prompted

Unenroll a BlueRock Host

If the BlueRock Identity Service was previously configured on a host instance, the bouncer must be unenrolled to prevent configuration conflicts before switching to a different authentication method (such as SSH Key Trust) or decommissioning the environment.

To reverse a host enrollment and clear the Certificate Authority (CA) trust configuration, execute the following command directly on the BlueRock host instance terminal:

Command Actions:

The unenroll command reverses the enroll process. Upon execution, it performs the following system modifications:

  • Removes the bouncer SSH configuration file (/etc/ssh/sshd_config.d/51-bluedev-bouncer-ca.conf).

  • Deletes the CA public key located at /etc/bluedev/user_ca.pub (unless the --keep-ca-pubkey flag is specified).

  • Removes all host-certificate files (unless the --keep-host-cert flag is specified).

Configure Okta Identity Provisioner

Create an OpenID Connect (OIDC) Native Application via the Okta Console to enable Okta integration.

  1. To create an Okta app:

    1. Access the Okta Console and select Create App Integration.

    2. Choose OIDC - OpenID Connect and set the application type to Native Application.

    3. Define your application name.

    4. Set the Sign-in redirect URI exactly to http://127.0.0.1:8420/ (Okta strictly matches this and requires the trailing slash).

    5. Configure the required user assignments and access policies.

    6. Select Save and copy the generated Client ID and Client Secret.

      lightbulb-exclamation-on
  2. Copy and edit the Okta provider template:

  3. Configure the required parameters:

Okta Provisioner Configuration Variables

Review and define the following variables carefully before executing the provisioner setup script. Incorrect values prevent successful host enrollment and developer authentication.

Variable

Description

Notes

PROVISIONER_NAME

The internal identifier for the OIDC provisioner within the StepCA configuration.

Example: okta

ISSUER_URL

The OpenID Connect discovery endpoint for Okta.

Replace <your-org> with the Okta org subdomain. Custom authorization servers require the specific server path (for example, https://<your-org>[.okta.com/oauth2/default](https://.okta.com/oauth2/default)).

CLIENT_ID

The OAuth 2.0 Client ID generated during the Okta app creation process.

Required to identify the application to Okta's authorization servers.

CLIENT_SECRET

The sensitive OAuth 2.0 Client Secret paired with the designated Client ID.

Must be kept secure and never committed to version control. Okta requires the Client Secret.

LISTEN_ADDRESS

The fixed OAuth callback address advertised to every client.

Set to 127.0.0.1:8420. Okta refuses arbitrary loopback ports.

ADMINS

A comma-separated list of administrator email addresses authorized to manage the CA.

Example: admin@domain.com

DOMAIN_RESTRICT

The specific email domain authorized to authenticate via the OIDC provisioner.

Example: <company-domain>.com

BLUEDEV_DOMAINS

The domain name utilized for generating the SSH principal mapping.

Typically matches the DOMAIN_RESTRICT value.

DEFAULT_SSH_CERT_DURATION

The standard time-to-live (TTL) validity period assigned to issued SSH certificates.

The system default is 8h.

MAX_SSH_CERT_DURATION

The absolute maximum validity period permitted for issued SSH certificates.

The system default is 24h.

Note:

Configuring the BLUEDEV_DOMAINS parameter is mandatory. This variable is required to correctly map and generate the SSH principal during authentication.

Bluedev Bouncer CLI Reference

The bluedev-bouncer runs directly on the target BlueRock host to handle system setup and CA trust enrollment. Below is the complete command-line interface surface for operator reference.

Expected output:

Command reference table

Command

Usage / Description

Example

install

Installs bluedev-bouncer on the host. Performs system setup (user creation, configuration placement, sshd snippet setup, systemctl reload). Idempotent; requires root.

sudo bluedev-bouncer install

uninstall

Uninstalls the bouncer, reversing the install process. Preserves catalog and package directories unless --purge is used.

sudo bluedev-bouncer uninstall --purge

enroll

Configures CA trust and optionally signs host SSH certificates via a CA provisioner. Writes necessary CA and host-cert configuration files.

sudo bluedev-bouncer enroll --ca 'https://<CA>:9000#fp=<FP>'

unenroll

Reverses the enroll process. Removes the CA public key and host certificates unless specific --keep flags are provided.

sudo bluedev-bouncer unenroll --keep-host-cert

self-check

Runs health probes to verify Docker daemon reachability, DevContainer CLI availability, git version, file permissions, and certificate validity.

sudo bluedev-bouncer self-check --json

doctor

[Deprecated]. Alias for self-check. Prints a deprecation notice and defers to self-check.

sudo bluedev-bouncer doctor

print-paths

Prints resolved configuration paths as shell-safe KEY='value' variables for downstream scripts to read.

bluedev-bouncer print-paths > paths.env

Provides an admin view listing every bouncer-managed container, its owner, and active client sessions (IP and connect time). Read-only; requires root.

sudo bluedev-bouncer sessions

build-catalog

Pre-builds every DevContainer template to skip the slow image-build step during subsequent up invocations.

sudo bluedev-bouncer build-catalog

install-catalog-packages

Bakes .deb/.rpm packages into the primed image, bypassing runtime package installation for faster startup.

sudo bluedev-bouncer install-catalog-packages

link

Internal command used by sshd ForceCommand for protocol-v2 link connections. Handles handshakes and multiplexed dispatch loops.

(Internal use by sshd daemon; not run manually)

help

Prints the help message or detailed usage for a specific subcommand.

sudo bluedev-bouncer help enroll

Global Options

Option

Usage / Description

Example

--config <CONFIG>

Overrides the path to the main configuration file. Default: /etc/bluedev/bouncer.toml.

sudo bluedev-bouncer --config /opt/custom.toml sessions

-h, --help

Prints a summary help message.

sudo bluedev-bouncer --help

View Active bluedev-bouncer Sessions

Execute the bluedev-bouncer sessions command to display all containers managed by the bluedev-bouncer and view active client sessions on the BlueRock host:

Last updated