Skip to content

Install Authwise Workplace

Authwise Workplace is sign-in for a company’s own people together with Authwise Guard, a zero-trust network: WireGuard tunnels between the devices and servers of a network, brokered by a control plane that decides who may join and what each node may reach. Guard is part of Workplace. It is compiled into the workplace preset and is not a product you install on its own.

One install runs on one cluster. The Authwise operator deploys it from two resources you write: an AuthwiseIdentityServer with spec.preset: workplace, which runs sign-in, the Admin API, the console, and the hosted login pages, and an AuthwiseGuardServer paired with it, which runs Guard’s control plane and join site. Each has its own database. Guard’s pages are part of the Workplace console, people sign in at the tenant’s issuer, and a tenant is the install’s tenant with Guard enabled on it. Relays and devices run outside the cluster.

This page takes you from an empty cluster to a tenant whose administrator has opened the Guard pages of the console, with one relay of your own serving the network and two devices connected:

  1. Install the operator and prepare the namespaces.
  2. Write and apply the Workplace resource, then sign in.
  3. Add Guard’s control plane.
  4. Enable Guard on a tenant.
  5. Run a relay.
  6. Add nodes.

The steps the Workplace resource shares with every Authwise install are described once, on Install on Kubernetes, and linked from here.

The operator provisions none of the following.

  • A Kubernetes cluster and, once, cluster-admin on it, with cert-manager installed. The operator’s admission webhook and the mutual TLS between an install’s components both use it.
  • An ingress controller with an IngressClass, and DNS records pointed at it for six names: the admin issuer host where people sign in, the Admin API host, the console host, the Guard API host, the join site, and a wildcard under which each tenant gets a Guard address, such as *.guard.example.com. For TLS, either reference a kubernetes.io/tls Secret per hostname from the resources, or terminate TLS at an edge in front of the ingress and leave the install on plain HTTP behind it. The two API hosts carry gRPC for the command-line tools, so the route to them must speak HTTP/2 to the backend; see Troubleshooting.
  • A PostgreSQL or YugabyteDB server with three owner credentials. The identity server’s needs CREATEDB, and the platform service’s needs CREATEDB and CREATEROLE; the install creates those two databases itself through the server’s maintenance database. Guard’s database is separate, and you create it and its owning user before the install: Guard’s migration Job applies the schema to a database that exists.
  • Object storage for uploaded assets such as logos: an S3-compatible bucket that already exists, or a PersistentVolumeClaim.
  • An SMTP relay to send invitations and sign-in mail through: host, port, and a sender address.
  • A registry credential. The component images are pulled from registry.authwise.com, whose projects are private. Ask Authwise for a group deploy token with the read_registry scope. The operator image, the command-line tools, and Guard’s agent and relay packages are public.
  • An operators certificate authority of your own, and a client certificate from it for the person who runs awtenant. Tenant administration describes both.
  • A Linux host with a public IP address for the relay, with a DNS name of its own, reachable on TCP and UDP port 8443, and on TCP port 80 while it obtains a certificate. A small virtual machine is enough.
  • Tools: kubectl, kustomize, git, jq, openssl, curl, Docker, and the Authwise command-line tools awctl and awtenant (CLI).

This page was written against operator release 0.48.0, Authwise 1.85.0, the Guard control plane 0.28.0, the console and join site 0.49.0, and Guard’s agent and relay packages 0.21.0. Use operator 0.48.0 or later. To hold an install on exact versions, set spec.version on the Workplace resource and control.image.tag, console.image.tag, and join.image.tag where the resources take them; a pinned resource never moves on an operator upgrade.

Install the operator and prepare the namespaces

Section titled “Install the operator and prepare the namespaces”
  1. Install the operator at release 0.48.0 or later, as described under Install the operator.

  2. Prepare the Workplace namespace, NAMESPACE below, as described under Prepare the namespace: the registry credential, the server secret, the two database passwords, the platform keyset, the asset volume if you use one, and the first administrator’s password hash. Nothing in those steps differs for Workplace.

  3. Publish your operators CA certificate in the same namespace as a ConfigMap named operators-ca with the key ca.crt. A ConfigMap, never a Secret: it holds the certificate only.

    Terminal window
    kubectl -n NAMESPACE create configmap operators-ca --from-file=ca.crt
  4. Create Guard’s namespace, GUARD_NAMESPACE below, and its Secrets. The names match the sample resources; change them together.

    Terminal window
    kubectl create namespace GUARD_NAMESPACE

    Create the registry credential, as for the Workplace namespace:

    Terminal window
    kubectl -n GUARD_NAMESPACE create secret docker-registry authwise-registry \
    --docker-server=registry.authwise.com \
    --docker-username=REGISTRY_USERNAME \
    --docker-password=REGISTRY_PASSWORD

    Store the password of the user that owns Guard’s database:

    Terminal window
    kubectl -n GUARD_NAMESPACE create secret generic guard-db \
    --from-literal=password=DB_PASSWORD

    Create the agent tier’s two key materials. The signing key signs the node tokens every agent presents, and the enrolment secret protects the enrolment endpoint. The operator mounts them and never reads them:

    Terminal window
    openssl genpkey -algorithm ed25519 -out signing.pem
    openssl rand -base64 32 > enrolment
    kubectl -n GUARD_NAMESPACE create secret generic guard-agent \
    --from-file=signing.pem --from-file=enrolment

The resource below is a complete Workplace install on PostgreSQL, with assets on a volume claim and email over SMTP, ready for Guard. Save it as workplace.yaml and replace every placeholder.

apiVersion: identity.authwise.com/v1alpha1
kind: AuthwiseIdentityServer
metadata:
name: authwise
namespace: NAMESPACE
spec:
# The product. Immutable: a preset is a binary and database boundary.
# Guard is part of this preset and of no other.
preset: workplace
imagePullSecrets:
- name: authwise-registry
# Seeds Guard's permission catalog on this install.
estate:
products: [guard]
install:
# Where Guard's pages and its join site are served.
guardConsole: https://CONSOLE_HOST
guardJoin: https://JOIN_HOST
# The addresses requests arrive from: the cluster's pod range and any
# proxy in front of the ingress. Without them, events and rate limits
# see the proxy's address in place of the person's.
trustedProxies: [POD_CIDR, PROXY_CIDR]
products:
guard:
# Every tenant's Guard address is SLUG.guard.EXAMPLE_DOMAIN.
hostSuffix: guard.EXAMPLE_DOMAIN
# controlClientId is added in "Add Guard's control plane", below.
# Lets awtenant, the operator's tenant tool, reach the install with a
# client certificate from your operators CA.
tenancyAdmin:
trustedClientCAs:
- {namespace: NAMESPACE, name: operators-ca}
bootstrap:
admin:
# The host people sign in on. The identity server resolves the tenant
# from the request's Host header, so this must be what clients reach.
issuerHost: ADMIN_HOST
username: ADMIN_EMAIL
audienceURI: https://API_HOST
credential: "PHC_STRING"
# Mint an OAuth 2.0 client-credentials secret for automation into the
# Secret authwise-admin-credential.
machineCredential: {}
platform:
hosted:
key:
keysetSecret:
name: authwise-platform-keyset
key: keyset.yaml
bucketObject:
buckets: [assets]
volumeClaimName: authwise-platform-objects
repository:
mode: gorm
tls:
sslMode: require
gorm:
app: &platformdb
host: DB_HOST
port: 5432
name: authwise_platform
username: PLATFORM_DB_USER
passwordSecret:
name: authwise-platform-db
key: owner-password
# The owner connection creates the database, so it must name one that
# exists: the server's maintenance database.
owner:
host: DB_HOST
port: 5432
name: postgres
username: PLATFORM_DB_USER
passwordSecret:
name: authwise-platform-db
key: owner-password
messaging:
store: sql
email:
provider: smtp
from: no-reply@EXAMPLE_DOMAIN
smtp:
host: SMTP_HOST
port: 587
startTLS: true
console:
# The console's OAuth 2.0 client, seeded by the bootstrap.
clientId: c-01
# The Guard API, which the console's Guard pages call.
guardApiBaseUrl: https://GUARD_API_HOST
networking:
ingress:
className: nginx
issuer:
hosts: [ADMIN_HOST]
tlsSecretName: ADMIN_HOST_TLS_SECRET
api:
hosts: [API_HOST]
tlsSecretName: API_HOST_TLS_SECRET
console:
hosts: [CONSOLE_HOST]
tlsSecretName: CONSOLE_HOST_TLS_SECRET
config:
# Immutable.
baseURL: https://ADMIN_HOST
serverSecret:
name: authwise-server
key: secret
repository:
mode: gorm
gorm:
app: &db
host: DB_HOST
port: 5432
name: authwise_identity
username: IDENTITY_DB_USER
passwordSecret:
name: authwise-db
key: owner-password
# The owner connection creates the database, so it must name one that
# exists: the server's maintenance database.
owner:
host: DB_HOST
port: 5432
name: postgres
username: IDENTITY_DB_USER
passwordSecret:
name: authwise-db
key: owner-password
issuerKeys:
keyName: primary
activeDays: 120
visibleAfterActiveDays: 60
asset:
mode: ObjectStorage
bucketName: assets
PlaceholderValue
NAMESPACEThe namespace you prepared.
ADMIN_HOSTThe admin issuer hostname, such as admin.example.com. People sign in here, and the hosted login and account pages are served here.
API_HOSTThe Admin API hostname, such as api.example.com. The console, awctl, and Terraform call it.
CONSOLE_HOSTThe admin console hostname, such as console.example.com.
ADMIN_EMAILThe first administrator’s email address. It is the only account that can sign in until it creates others.
PHC_STRINGThe output of enroll-password.
DB_HOST, IDENTITY_DB_USER, PLATFORM_DB_USERThe database server and the two owner roles. The install creates authwise_identity and authwise_platform through the owner connections, which name the maintenance database postgres.
SMTP_HOST, EXAMPLE_DOMAINThe relay and the sender domain. A relay that needs authentication takes username and a passwordSecret under smtp.
*_TLS_SECRETkubernetes.io/tls Secrets for each hostname. Omit the tlsSecretName lines to serve plain HTTP behind an edge that terminates TLS.
JOIN_HOST, GUARD_API_HOSTGuard’s join site and API hostnames, such as join.example.com and api.guard.example.com.
POD_CIDR, PROXY_CIDRThe cluster’s pod address range and the range of any proxy or load balancer in front of the ingress, as CIDR prefixes.

What Guard adds to the resource:

FieldWhat it does
install.guardConsoleThe origin the Guard pages are served at: the Workplace console’s own origin. Enabling Guard on a tenant creates the console’s sign-in client on the tenant’s issuer for it. Scheme and host only.
install.guardJoinThe join site’s origin. The same client also accepts the join site, so a person can sign in there at their own tenant’s issuer. Scheme and host only.
products.guard.hostSuffixThe suffix under which every tenant gets a Guard address, SLUG.guard.EXAMPLE_DOMAIN. The same value the Guard resource routes below; the operator refuses a pair that disagrees.
console.guardApiBaseUrlThe Guard API origin, which the console’s Guard pages call. Unset, the console hides the Guard section.
estate.productsSeeds Guard’s permission catalog on the install, which the install credential’s role comes from.
tenancyAdmin.trustedClientCAsThe operators CA, so that awtenant can reach the tenancy listener. A ConfigMap, never a Secret.

The install’s TenancyAdminTrusted condition turns True once the CA bundle is complete. Under GitOps, let cert-manager’s trust-manager publish the ConfigMap from the operators CA Secret and keep it current across rotations:

apiVersion: trust.cert-manager.io/v1alpha1
kind: Bundle
metadata:
name: operators-ca
spec:
sources:
- secret: {name: operators-ca, key: ca.crt}
target:
configMap: {key: ca.crt}
namespaceSelector:
matchLabels: {kubernetes.io/metadata.name: NAMESPACE}

trust-manager reads its sources from its own trust namespace, cert-manager by default, so issue the CA there or point its --trust-namespace at NAMESPACE.

What the sample leaves at its default: the login layouts, the account page, the console, and the cache are all deployed; the registry is registry.authwise.com/authwise; the component versions are the ones the operator release pins. Two things to know about the shape:

  • YugabyteDB uses mode: yb with a yb block whose connections take hosts as a list and port 5433, in both repository blocks. A server that does not speak TLS needs sslMode: disable under platform.repository.tls.
  • S3 replaces volumeClaimName with provider: s3 and an s3 block that names the endpoint, region, and a credentials Secret. The bucket must exist.
Terminal window
kubectl apply -f workplace.yaml
kubectl -n NAMESPACE get authwiseidentityservers -w

The operator first runs two Jobs: setup, which creates the databases, and migrate, which applies the schema and seeds the admin tenant, its issuer, and the administrator. The workloads start when migrate succeeds, and READY turns True when every workload has its replicas. Apply and watch describes what to read when it does not. The TenancyAdminTrusted condition turns True once the operators CA is loaded.

Then, as described under After the install:

  1. Sign in to the console at https://CONSOLE_HOST as the administrator.
  2. Sign in to awctl at the Admin API as that administrator, who is an operator of the install.
  3. Configure awtenant with the client certificate from your operators CA. Tenant administration has the profile.

Guard’s control plane calls back into the identity server for the work it does on nobody’s behalf: reading tenants, removing a departed person’s devices, cleaning up bindings. It does so with one install credential, a service account of the admin issuer, which you mint once.

  1. Create a service account on the admin tenant and mint its secret. t-01 is the admin tenant, and --out writes the secret alone to a file with mode 0600:

    Terminal window
    awctl identity service-accounts create --display-name guard-control --tenant-id t-01
    awctl identity service-accounts secrets mint --service-account INSTALL_CLIENT_ID \
    --out guard-install.secret

    create prints the account’s c-… identifier, INSTALL_CLIENT_ID below. mint prints the token URL, the client id, and the audience to use with the secret on stderr. The secret is shown once.

  2. Bind the account the guardcontrol.install role at the root of the estate audience. The admin tenant’s issuer and audience are i-01 and a-01. Empty --resource-type and --resource-id anchor the binding at the root:

    Terminal window
    awctl access access-bindings create --tenant-id t-01 --issuer-id i-01 --audience-id a-01 \
    --subject-type client --subject-id INSTALL_CLIENT_ID \
    --role-name guardcontrol.install --resource-type "" --resource-id ""

    The role carries only the reads the control plane needs, and a service account may hold it at the root without operator status. The role exists because the Workplace resource set estate.products: [guard].

  3. Write the credential as JSON, from mint’s output, and store it in Guard’s namespace:

    {"client_id": "INSTALL_CLIENT_ID", "client_secret": "…", "token_url": "…", "audience": "…"}
    Terminal window
    kubectl -n GUARD_NAMESPACE create secret generic guard-install-credential \
    --from-file=credential.json

    The operator mounts the key as a file and never reads, mints, or derives it.

  4. Tell the identity server the credential’s client id, and apply. Add one line to workplace.yaml under products.guard:

    spec:
    products:
    guard:
    hostSuffix: guard.EXAMPLE_DOMAIN
    controlClientId: INSTALL_CLIENT_ID
    Terminal window
    kubectl apply -f workplace.yaml

    Enabling Guard on a tenant binds this client in the tenant’s Guard audience. Nothing checks that the line is set: without it, enabling Guard binds no install credential, and the control plane’s reads of that tenant are denied.

  5. Enable Guard on the admin tenant. This creates the sign-in client that the console’s Guard pages and the join site use, which the Guard resource names:

    Terminal window
    awtenant tenants enable-product t-01 guard --issuer i-01
    guard is enabled on t-01 through issuer i-01.
    Console client c-… for https://CONSOLE_HOST.

    The c-… identifier is JOIN_CLIENT_ID below. Because the Workplace resource sets install.guardJoin, the client accepts the join site’s address as well as the console’s. If you change guardJoin later, run the command again; it changes nothing else. Enable Guard on a tenant describes everything the command does.

The resource below pairs Guard with the Workplace install named authwise in the namespace NAMESPACE, on a single PostgreSQL endpoint. Save it as guard.yaml and replace every placeholder.

apiVersion: guard.authwise.com/v1alpha1
kind: AuthwiseGuardServer
metadata:
name: guard
namespace: GUARD_NAMESPACE
spec:
imagePullSecrets:
- name: authwise-registry
# The Workplace install whose tenants this Guard serves. The operator
# derives the Access endpoint and the Admin API from its api Service.
identityServerRef:
name: authwise
namespace: NAMESPACE
# The issuer an operator's token comes from, and the aud it carries: the
# estate audience's identifier, the Admin API origin, never an a-… id.
auth:
issuer: https://ADMIN_HOST
audience: https://API_HOST
# Every permission decision goes to the paired install's Access
# evaluator. Remote is the default, and the endpoint is derived.
access:
mode: remote
database:
mode: gorm
hosts: [DB_HOST]
port: 5432
name: guard
username: guard
passwordSecret:
name: guard-db
key: password
control:
agent:
# The issuer of every node token. Set it explicitly so that a hostname
# change later does not strand the enrolled nodes. It must differ from
# auth.issuer.
issuer: https://GUARD_API_HOST
signingKey: {name: guard-agent, key: signing.pem}
enrolmentSecret: {name: guard-agent, key: enrolment}
# The base of every approval link, set for the same reason.
joinUrl: https://JOIN_HOST
# The install credential you minted.
installCredential:
name: guard-install-credential
key: credential.json
# The estate's own domains: the issuers a tenant's token may come from,
# and the paired install's api Service. The first entry is the mesh
# domain's parent: names are NODE.NETWORK.SLUG.guard.EXAMPLE_DOMAIN.
estate:
domainSuffixes:
- EXAMPLE_DOMAIN
- NAMESPACE.svc
join:
clientId: JOIN_CLIENT_ID
networking:
ingress:
className: nginx
api:
hosts: [GUARD_API_HOST]
tlsSecretName: GUARD_API_HOST_TLS_SECRET
# One wildcard: each tenant's address, SLUG.guard.EXAMPLE_DOMAIN. The
# suffix must equal products.guard.hostSuffix on the paired install.
directory:
hosts: ["*.guard.EXAMPLE_DOMAIN"]
join:
hosts: [JOIN_HOST]
tlsSecretName: JOIN_HOST_TLS_SECRET
PlaceholderValue
GUARD_NAMESPACEThe namespace you prepared.
NAMESPACEThe Workplace install’s namespace. Its api Service is <name>-api, which the operator derives from identityServerRef.
ADMIN_HOSTThe admin issuer host from the Workplace resource, where operators sign in. A tenant’s own people sign in at their tenant’s issuer, which needs no entry here.
API_HOSTThe Admin API hostname from the Workplace resource: the audienceURI its bootstrap set, which is the estate audience’s identifier.
GUARD_API_HOSTThe Guard API hostname, such as api.guard.example.com. The console, the join site, the agents, and the relay call it.
JOIN_HOSTThe join site hostname, the same value you set in install.guardJoin.
JOIN_CLIENT_IDThe console client that enabling Guard on the admin tenant printed, in the previous section.
DB_HOST, DB_PASSWORDThe database endpoint and the owner’s password. The database guard must exist.
EXAMPLE_DOMAINThe domain the Workplace install’s hostnames sit under, such as example.com.
*_TLS_SECRETkubernetes.io/tls Secrets for each hostname. Omit the tlsSecretName lines to serve plain HTTP behind an edge that terminates TLS.

What the sample leaves at its default: long identifiers are generated in-process, the control plane runs one replica, and node tokens last one hour. Three things to know about the shape:

  • YugabyteDB uses mode: yb, lists every tablet server under hosts, and connects on port 5433.
  • An ID server and an audit server are optional. Without them, as here, identifiers are generated in-process and events stay in each database. An estate that runs an AuthwiseIDServer and an AuthwiseAuditServer binds them through control.id.serverRef and control.audit.serverRef. Short or long identifiers are fixed when the install is created, so adding an ID server later does not convert it.
  • A split plane. Where the Workplace install is a satellite and operators sign in at a central install, set access.operatorEndpoint to central’s api Service, so that operators’ tokens are decided there.

The operator refuses the resource at admission when identityServerRef names an install on any preset but workplace, when the paired install’s namespace is missing from estate.domainSuffixes, or when the directory suffix differs from the paired install’s products.guard.hostSuffix.

The database connection is encrypted when the server offers TLS. To verify the server against a certificate authority, which a database that requires TLS usually calls for, set spec.database.env to [{name: PGSSLMODE, value: verify-full}] and spec.database.caSecret to a Secret holding the CA in ca.crt; the operator mounts it and sets PGSSLROOTCERT on the control plane, the forwarder, and the migration Job. verify-full checks the hostname, so every entry in spec.database.hosts must appear in the server certificate; otherwise use verify-ca. The identity server’s own connection is encrypted when offered and not verified.

Terminal window
kubectl apply -f guard.yaml
kubectl -n GUARD_NAMESPACE get authwiseguardservers -w

The operator runs one migration Job, which applies the schema to the database you created, then starts the control plane and the join site. READY turns True when every workload has its replicas available, and URL is the Guard API:

NAME ACCESS READY REPLICAS URL AGE
guard remote True 1 https://api.guard.example.com 2m

Degraded carries the reason when something is missing: the migration Job failed, the install credential Secret does not exist (InstallCredentialMissing), or the paired install is not yet on a release the control plane accepts (IdentityServerKitBelowFloor). At start, the control plane reads the paired install’s capabilities with the install credential and refuses to run against an install that does not list product.guard. Then confirm the agent tier is serving its keys, which the relay and every agent depend on:

Terminal window
curl -s https://GUARD_API_HOST/.well-known/guard/jwks.json

Guard is off for every tenant until an operator enables it. Enabling it names the issuer the tenant’s people sign in at. You enabled it on the admin tenant above, so for a first install continue the admin tenant from step 2; a tenant with its own issuer takes every step.

  1. Enable the product. TENANT_ID and ISSUER_ID are the tenant’s and issuer’s identifiers, which awctl identity issuers list or the console show:

    Terminal window
    awtenant tenants enable-product TENANT_ID guard --issuer ISSUER_ID
    guard is enabled on TENANT_ID through issuer ISSUER_ID.
    Console client c-… for https://CONSOLE_HOST.
    Product audience a-…: its id is the `aud` the tenant's guard users' tokens carry.
    The estate audience is a-01 (the `aud` on this command's own token).
    guard-control's spec.auth.audience is the estate audience, not the product audience.
    a-…

    The command creates Guard’s audience on the issuer, seeds Guard’s permission catalog in it, creates the console’s sign-in client for the origin in install.guardConsole, and binds the install credential in the audience. It prints the audience’s a-… identifier on standard output. It mints no secret and writes no file. Running it again on the same issuer changes nothing, except to add what a newer release declares, so run it again after you change controlClientId or the console origin. --console-origin names another origin, repeatable, and replaces the recorded set. On an install that decides its own permissions, the first run also binds guardcontrol.admin at the root of the estate audience to the install’s first administrator when nobody holds it there.

  2. Turn on home administration for the tenant, so that its own people can administer Guard. Guard’s administrative roles (tenantAdmin, networkAdmin, viewer) are held in the tenant’s administration audience, and granting one is refused until that audience exists. Enabling Guard does not turn it on. Run it before or after step 1; the second of the two places Guard’s administrative roles in the administration audience:

    Terminal window
    awctl tenancy tenants enable-home-administration TENANT_ID --issuer ISSUER_ID

    Home administration describes what it adds. An operator and the tenant’s central administrators administer Guard without it.

  3. Give the tenant a slug, which becomes its console address, its Guard address, and the third label of every node’s name on the mesh:

    Terminal window
    awtenant tenants update TENANT_ID --slug SLUG

    SLUG is a DNS label of 3 to 40 characters, unique on the install, and it may not start with an identifier prefix such as t-. The tenant’s people type SLUG.guard.EXAMPLE_DOMAIN into the Guard client, and its nodes are reached as NODE.NETWORK.SLUG.guard.EXAMPLE_DOMAIN. Reach nodes and applications by name describes the names. The console shows the address on the tenant’s Guard settings page, and a tenant without a slug has no address.

  4. Sign in. Open the Workplace console at https://CONSOLE_HOST and open the tenant. A Guard section appears in the tenant’s navigation once the console has guardApiBaseUrl, the install lists product.guard, and the tenant has Guard enabled. An operator’s own sign-in serves the pages. A tenant’s own administrator, who holds tenantAdmin in the tenant’s administration audience, signs in at the tenant’s issuer and is asked for a second step. Create the first network.

    From the CLI, give the profile the Guard endpoint and set the context to the tenant:

    Terminal window
    awctl config profiles update PROFILE --guard-endpoint GUARD_API_HOST:443
    awctl guard context set --tenant TENANT_ID
    awctl guard tenants describe TENANT_ID
    awctl guard networks create --display-name Office --cidr 100.100.0.0/16

    describe shows the tenant’s Guard address, plan, and caps. Add --json to see the issuer, audience, and console client that enable-product created:

    NAME DISPLAY_NAME SLUG STATUS GUARD_ADDRESS
    tenants/t-g3j9ww0ydlhc Acme (preview Guard) acme ACTIVE acme.guard.preview.authwise.work
    Plan: none reported
    Caps: members none, devices none, relay bytes a month none

    From here on, Tenant administration describes who may use Guard and how to grant it.

  5. Let people in. A person is invited by the identity server and continues to the tenant’s Guard address, whose welcome page leads them to the client. The invitation goes to the install that holds the tenant’s identity, so run it with that install’s profile, not the Guard endpoint. Then they are granted enrolment:

    Terminal window
    awctl identity users invite EMAIL --tenant-id TENANT_ID --realm-id REALM_ID \
    --continue-url https://SLUG.guard.EXAMPLE_DOMAIN/welcome
    awctl guard people grant-enrollment --subject-type user --subject-id USER_ID --tenant-id TENANT_ID

    A tenant whose people come from a directory needs no invitation: grant a group with --subject-type group and send its members the address. --client c-… in place of --continue-url continues at that client’s sign-in address; when both are given, the address wins. To let a person administer the tenant’s Guard from the console, grant a role. It needs home administration on (step 2), and the role carries the second-step condition. networkAdmin takes --network-id:

    Terminal window
    awctl guard people grant-role --role tenantAdmin --subject-type user --subject-id USER_ID --tenant-id TENANT_ID

Nodes that cannot reach each other directly send WireGuard traffic through a relay, over TLS on port 8443. A relay is stateless: it admits a node by verifying the node token the control plane issued, against the key set at https://GUARD_API_HOST/.well-known/guard/jwks.json, and it needs nothing else from the cluster. It runs on a Linux host of its own, outside Kubernetes.

  1. On the relay host, install the agent package and the relay package from the public package registry. VERSION is a Guard release, and the names below are the Debian x86-64 ones; arm64 builds sit beside them, and RPMs are authwise-guard-VERSION-1.x86_64.rpm and authwise-guard-relay-VERSION-1.x86_64.rpm (or aarch64):

    Terminal window
    VERSION=0.21.0
    BASE="https://git.authwise.com/api/v4/projects/authwise%2Fguard/packages/generic/guard/${VERSION}"
    for f in SHA256SUMS "authwise-guard_${VERSION}-1_amd64.deb" "authwise-guard-relay_${VERSION}-1_amd64.deb"; do
    curl -fsSLO "${BASE}/${f}"
    done
    sha256sum -c --ignore-missing SHA256SUMS
    sudo apt install "./authwise-guard_${VERSION}-1_amd64.deb" "./authwise-guard-relay_${VERSION}-1_amd64.deb"

    Installing starts nothing. The relay has no configuration yet.

  2. Obtain a TLS certificate for the relay’s hostname. Any certificate the nodes trust works; with Let’s Encrypt, certbot certonly --standalone -d RELAY_HOST on port 80 issues one, and a deploy hook that copies the files and runs systemctl try-restart awguard-relay keeps it current, because the relay reads its certificate at start.

  3. Write /etc/awguard/relay.toml. Token mode admits any node of this control plane that holds a valid node token; the issuer must equal the control.agent.issuer of the Guard resource exactly:

    listen_addr = "0.0.0.0:8443"
    tls_cert = "/etc/awguard/tls/fullchain.pem"
    tls_key = "/etc/awguard/tls/privkey.pem"
    [auth]
    mode = "token"
    issuer = "https://GUARD_API_HOST"
    jwks_cache_file = "/var/lib/awguard-relay/jwks.json"

    The issuer is the https:// origin, character for character; a trailing slash or an http:// scheme makes the relay refuse every node with a 401. When the control plane serves its certificate from a private certificate authority, add jwks_ca_cert = "/etc/awguard/control-ca.pem" under [auth] so the relay can fetch the key set. The key set is fetched at start and refreshed every five minutes. The cache file keeps the relay admitting nodes through a control-plane outage.

  4. Start the relay, and open TCP and UDP port 8443 to the internet on the host’s firewall:

    Terminal window
    sudo systemctl enable --now awguard-relay
  5. Register the relay on each network that uses it. In the console, open the network’s Relays page and add the relay with the URL wss://RELAY_HOST:8443/v1/transport. From the CLI:

    Terminal window
    awctl guard relays create --tenant-id TENANT_ID --network-id NETWORK_ID \
    --display-name "Relay us-central1" \
    --url wss://RELAY_HOST:8443/v1/transport \
    --region us-central1 --priority 10

    --ca-cert-pem takes the certificate’s PEM text, not a path, and is only needed for a certificate the nodes do not already trust. A network may list several relays; nodes try the lowest priority first. A relay shows as seen in the console once a node reports a live connection through it. Every network needs a relay: nodes that cannot reach each other directly, as two machines behind different NATs cannot, have no path without one. The console offers the estate’s relay pool beside Run your own relay, but an install you operate yourself has no pool unless you create one, so run your own and register it on each network. One relay host can serve several networks; register it on each.

The agent, awguard, runs on each node as a system service. It joins a network once, then fetches its peers, addresses, routes, and relays from the control plane and keeps them current.

  1. Install the agent. Every package comes from the same public package registry as the relay; VERSION is a Guard release.

    Linux (a server, a VM, or a workstation). On Debian or Ubuntu, the authwise-guard package alone, without the relay package. It installs awguard, the awguard-peer service, and the WireGuard dependency, and starts nothing:

    Terminal window
    VERSION=0.21.0
    BASE="https://git.authwise.com/api/v4/projects/authwise%2Fguard/packages/generic/guard/${VERSION}"
    ARCH=amd64 # or arm64
    curl -fsSLO "${BASE}/SHA256SUMS" -O "${BASE}/authwise-guard_${VERSION}-1_${ARCH}.deb"
    sha256sum -c --ignore-missing SHA256SUMS
    sudo apt install "./authwise-guard_${VERSION}-1_${ARCH}.deb"

    On RHEL, Rocky, or Fedora, the RPM, named by the machine’s architecture:

    Terminal window
    ARCH=x86_64 # or aarch64
    curl -fsSLO "${BASE}/SHA256SUMS" -O "${BASE}/authwise-guard-${VERSION}-1.${ARCH}.rpm"
    sha256sum -c --ignore-missing SHA256SUMS
    sudo dnf install "./authwise-guard-${VERSION}-1.${ARCH}.rpm"

    macOS. The installer package registers the service. It is not yet signed or notarized, so install it from the command line; a double-click is stopped by Gatekeeper:

    Terminal window
    curl -fsSLO "${BASE}/awguard-${VERSION}-universal.pkg" -O "${BASE}/SHA256SUMS.macos"
    shasum -a 256 -c --ignore-missing SHA256SUMS.macos
    sudo installer -pkg "awguard-${VERSION}-universal.pkg" -target /

    Windows (x64). The installer is signed. It installs the tray application and the service, and the join runs from the tray instead of the commands below. Unattended:

    Terminal window
    $v = "0.21.0"
    $base = "https://git.authwise.com/api/v4/projects/authwise%2Fguard/packages/generic/guard/$v"
    Invoke-WebRequest "$base/awguard-$v-x64.msi" -OutFile "awguard-$v-x64.msi"
    Invoke-WebRequest "$base/SHA256SUMS.windows" -OutFile SHA256SUMS.windows
    (Get-FileHash "awguard-$v-x64.msi").Hash.ToLower() # compare with SHA256SUMS.windows
    msiexec /i "awguard-$v-x64.msi" /qn

    The tenant’s welcome page offers the same downloads when the Guard resource’s spec.join.downloads names them.

  2. Join the network, once, as root, with the tenant’s Guard address. A bare name is completed under the production Guard domain, so give the full address of your own install:

    Terminal window
    # A person: sign in in the browser, then pick a network if there are several.
    sudo awguard up SLUG.guard.EXAMPLE_DOMAIN
    # A server an administrator registered under Nodes > Add node > Register a server:
    sudo awguard up SLUG.guard.EXAMPLE_DOMAIN --auth-code ga_…
    # A machine with no browser: prints an approval link to open on any device.
    sudo awguard up SLUG.guard.EXAMPLE_DOMAIN --approve NETWORK

    The agent resolves the tenant from the address and prints its name, signs the person in with the tenant’s agent client, creates the node’s key if there is none, proves it holds the key, and stores the node token it receives. It writes /etc/awguard/peer.toml on a machine that has none, pointing at the control plane’s own URL, so a later change of address does not cut the machine off. A config.toml is needed only for a private certificate authority. Everything else about the mesh is served by the control plane, so a file that sets addresses, peers, or relays is refused. The earlier --invite and --network flags are refused with the step to take instead.

  3. Start the service and check it. awguard up prints the command for the platform; on Linux it is:

    Terminal window
    sudo systemctl enable --now awguard-peer
    awguard status

    The agent polls the control plane every minute, applies peer and route changes live, and refreshes its token on its own. A node that was off for longer than a token’s life enrols again by proving its key. Only a node an administrator revoked stops.

SymptomCause and fix
awctl or awtenant answers 404 or an HTTP/1.1 protocol error at an API host, while the console worksThe CLIs call the Admin API and the Guard API over gRPC, which needs HTTP/2 from the edge to the Service. An ingress controller that proxies to its backends over HTTP/1.1 breaks it. Give the two API hosts a route that speaks HTTP/2 to the backend (h2c), such as ingress-nginx’s backend-protocol: GRPC on a separate Ingress, or a load balancer in front that forwards those hosts to the API Services directly.
The control plane pod exits with guard-control cannot start: kit … lacks product.guardThe paired identity server is not a Workplace build. Guard pairs only with an install on spec.preset: workplace; admission refuses any other, and an install cannot change preset. Deploy a Workplace install and pair with it.
The control plane pod exits with guard-control cannot start: the install credential cannot read tenants at kitThe guardcontrol.install binding at the root is missing, or was written on an install other than the one that decides permissions. Create it as described above, on central where the Workplace install is a satellite.
Degraded names InstallCredentialMissingThe Secret named in control.installCredential does not exist in the Guard namespace.
Degraded names IdentityServerHostSuffixMismatchproducts.guard.hostSuffix on the identity server and the directory wildcard on the Guard resource disagree. Make them the same suffix.
enable-product answers UNIMPLEMENTED with guard is not in this build: Guard ships in the workplace presetThe install is on the authwise-full preset, which does not include Guard. There is nothing to switch on; create a Workplace install and enable Guard on a tenant there.
The identity server’s migration Job fails and Degraded carries refusing to migrate: tenant t-… carries a Guard entitlement and this build (authwise-full) does not include product.guardAn authwise-full install that enabled Guard on a tenant under an earlier release is being rolled to Authwise 1.81.0 or later. Nothing is changed, and the old pods keep serving. There is no migration of such a tenant: recreate it on a Workplace install, run awtenant tenants disable-product TENANT_ID guard on the old one, then roll. Until then, hold spec.version below 1.81.0.
The migration Job fails and the install reports DegradedThe database does not exist or the user cannot reach it. Read the Job’s last pod with kubectl describe pod -l job-name=JOB.
The console shows no Guard section on the tenantspec.console.guardApiBaseUrl is unset on the identity server, the tenant has not had Guard enabled, or the console is not the Workplace image.
Sign-in at the Guard pages fails in the browser for a tenant’s administratorThe console origin is not among the console client’s redirect URIs. Re-run enable-product naming the origin with --console-origin https://CONSOLE_HOST, which replaces the client’s recorded set.
A Guard call is refused with GUARD_NOT_ENABLEDGuard is not enabled on that tenant. Run enable-product.
A Guard call is refused with TENANT_SUSPENDEDThe tenant is suspended on the identity server. An operator resumes it there.
An invitation, a user create, or a device enrolment is refused with FAILED_PRECONDITION and the reason PLAN_LIMITA limit on members or devices was set on the tenant, and the tenant is at it. The refusal names the limit. A tenant on an install you operate has no limit unless one was set on it; awtenant tenants get TENANT_ID shows the limits in force.
awguard up is refused naming INVITE_RETIRED, or refuses --invite or --networkThe agent is on an older release, or the command uses a retired flag. Join with the tenant’s address as above.
The relay logs a 401 for every nodeThe relay’s [auth] issuer does not equal control.agent.issuer exactly, or the relay cannot fetch the key set.
Nodes enrol but cannot reach each otherNo relay is registered on the network and the tenant may not use a pool, or the relay’s port 8443 is closed to UDP or TCP. Check the relay’s seen time on the network’s Relays page.

Deleting an AuthwiseGuardServer deletes its workloads. The database and the Secrets you created stay. Deleting a tenant from Guard is an operator’s task on the CLI, refused while the tenant still has networks or users, and it never touches the tenant on the identity server.