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:
- Install the operator and prepare the namespaces.
- Write and apply the Workplace resource, then sign in.
- Add Guard’s control plane.
- Enable Guard on a tenant.
- Run a relay.
- Add nodes.
The steps the Workplace resource shares with every Authwise install are described once, on Install on Kubernetes, and linked from here.
Before you begin
Section titled “Before you begin”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 akubernetes.io/tlsSecret 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 needsCREATEDBandCREATEROLE; 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 theread_registryscope. 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 toolsawctlandawtenant(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”-
Install the operator at release
0.48.0or later, as described under Install the operator. -
Prepare the Workplace namespace,
NAMESPACEbelow, 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. -
Publish your operators CA certificate in the same namespace as a ConfigMap named
operators-cawith the keyca.crt. A ConfigMap, never a Secret: it holds the certificate only.Terminal window kubectl -n NAMESPACE create configmap operators-ca --from-file=ca.crt -
Create Guard’s namespace,
GUARD_NAMESPACEbelow, and its Secrets. The names match the sample resources; change them together.Terminal window kubectl create namespace GUARD_NAMESPACECreate 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_PASSWORDStore 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_PASSWORDCreate 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.pemopenssl rand -base64 32 > enrolmentkubectl -n GUARD_NAMESPACE create secret generic guard-agent \--from-file=signing.pem --from-file=enrolment
Write the Workplace resource
Section titled “Write the Workplace resource”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/v1alpha1kind: AuthwiseIdentityServermetadata: name: authwise namespace: NAMESPACEspec: # 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| Placeholder | Value |
|---|---|
NAMESPACE | The namespace you prepared. |
ADMIN_HOST | The admin issuer hostname, such as admin.example.com. People sign in here, and the hosted login and account pages are served here. |
API_HOST | The Admin API hostname, such as api.example.com. The console, awctl, and Terraform call it. |
CONSOLE_HOST | The admin console hostname, such as console.example.com. |
ADMIN_EMAIL | The first administrator’s email address. It is the only account that can sign in until it creates others. |
PHC_STRING | The output of enroll-password. |
DB_HOST, IDENTITY_DB_USER, PLATFORM_DB_USER | The 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_DOMAIN | The relay and the sender domain. A relay that needs authentication takes username and a passwordSecret under smtp. |
*_TLS_SECRET | kubernetes.io/tls Secrets for each hostname. Omit the tlsSecretName lines to serve plain HTTP behind an edge that terminates TLS. |
JOIN_HOST, GUARD_API_HOST | Guard’s join site and API hostnames, such as join.example.com and api.guard.example.com. |
POD_CIDR, PROXY_CIDR | The 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:
| Field | What it does |
|---|---|
install.guardConsole | The 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.guardJoin | The 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.hostSuffix | The 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.guardApiBaseUrl | The Guard API origin, which the console’s Guard pages call. Unset, the console hides the Guard section. |
estate.products | Seeds Guard’s permission catalog on the install, which the install credential’s role comes from. |
tenancyAdmin.trustedClientCAs | The 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/v1alpha1kind: Bundlemetadata: name: operators-caspec: 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: ybwith aybblock whose connections takehostsas a list and port5433, in bothrepositoryblocks. A server that does not speak TLS needssslMode: disableunderplatform.repository.tls. - S3 replaces
volumeClaimNamewithprovider: s3and ans3block that names the endpoint, region, and a credentials Secret. The bucket must exist.
Apply and sign in
Section titled “Apply and sign in”kubectl apply -f workplace.yamlkubectl -n NAMESPACE get authwiseidentityservers -wThe 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:
- Sign in to the console at
https://CONSOLE_HOSTas the administrator. - Sign in to
awctlat the Admin API as that administrator, who is an operator of the install. - Configure
awtenantwith the client certificate from your operators CA. Tenant administration has the profile.
Add Guard’s control plane
Section titled “Add Guard’s control plane”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.
Mint the install credential
Section titled “Mint the install credential”-
Create a service account on the admin tenant and mint its secret.
t-01is the admin tenant, and--outwrites the secret alone to a file with mode0600:Terminal window awctl identity service-accounts create --display-name guard-control --tenant-id t-01awctl identity service-accounts secrets mint --service-account INSTALL_CLIENT_ID \--out guard-install.secretcreateprints the account’sc-…identifier,INSTALL_CLIENT_IDbelow.mintprints the token URL, the client id, and the audience to use with the secret on stderr. The secret is shown once. -
Bind the account the
guardcontrol.installrole at the root of the estate audience. The admin tenant’s issuer and audience arei-01anda-01. Empty--resource-typeand--resource-idanchor 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]. -
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.jsonThe operator mounts the key as a file and never reads, mints, or derives it.
-
Tell the identity server the credential’s client id, and apply. Add one line to
workplace.yamlunderproducts.guard:spec:products:guard:hostSuffix: guard.EXAMPLE_DOMAINcontrolClientId: INSTALL_CLIENT_IDTerminal window kubectl apply -f workplace.yamlEnabling 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.
-
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-01guard is enabled on t-01 through issuer i-01.Console client c-… for https://CONSOLE_HOST.The
c-…identifier isJOIN_CLIENT_IDbelow. Because the Workplace resource setsinstall.guardJoin, the client accepts the join site’s address as well as the console’s. If you changeguardJoinlater, run the command again; it changes nothing else. Enable Guard on a tenant describes everything the command does.
Write the Guard resource
Section titled “Write the Guard resource”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/v1alpha1kind: AuthwiseGuardServermetadata: name: guard namespace: GUARD_NAMESPACEspec: 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| Placeholder | Value |
|---|---|
GUARD_NAMESPACE | The namespace you prepared. |
NAMESPACE | The Workplace install’s namespace. Its api Service is <name>-api, which the operator derives from identityServerRef. |
ADMIN_HOST | The 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_HOST | The Admin API hostname from the Workplace resource: the audienceURI its bootstrap set, which is the estate audience’s identifier. |
GUARD_API_HOST | The Guard API hostname, such as api.guard.example.com. The console, the join site, the agents, and the relay call it. |
JOIN_HOST | The join site hostname, the same value you set in install.guardJoin. |
JOIN_CLIENT_ID | The console client that enabling Guard on the admin tenant printed, in the previous section. |
DB_HOST, DB_PASSWORD | The database endpoint and the owner’s password. The database guard must exist. |
EXAMPLE_DOMAIN | The domain the Workplace install’s hostnames sit under, such as example.com. |
*_TLS_SECRET | kubernetes.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 underhosts, and connects on port5433. - 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
AuthwiseIDServerand anAuthwiseAuditServerbinds them throughcontrol.id.serverRefandcontrol.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.operatorEndpointto 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.
Apply and watch
Section titled “Apply and watch”kubectl apply -f guard.yamlkubectl -n GUARD_NAMESPACE get authwiseguardservers -wThe 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 AGEguard remote True 1 https://api.guard.example.com 2mDegraded 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:
curl -s https://GUARD_API_HOST/.well-known/guard/jwks.jsonEnable Guard on a tenant
Section titled “Enable Guard on a tenant”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.
-
Enable the product.
TENANT_IDandISSUER_IDare the tenant’s and issuer’s identifiers, whichawctl identity issuers listor the console show:Terminal window awtenant tenants enable-product TENANT_ID guard --issuer ISSUER_IDguard 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’sa-…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 changecontrolClientIdor the console origin.--console-originnames another origin, repeatable, and replaces the recorded set. On an install that decides its own permissions, the first run also bindsguardcontrol.adminat the root of the estate audience to the install’s first administrator when nobody holds it there. -
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_IDHome administration describes what it adds. An operator and the tenant’s central administrators administer Guard without it.
-
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 SLUGSLUGis a DNS label of 3 to 40 characters, unique on the install, and it may not start with an identifier prefix such ast-. The tenant’s people typeSLUG.guard.EXAMPLE_DOMAINinto the Guard client, and its nodes are reached asNODE.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. -
Sign in. Open the Workplace console at
https://CONSOLE_HOSTand open the tenant. A Guard section appears in the tenant’s navigation once the console hasguardApiBaseUrl, the install listsproduct.guard, and the tenant has Guard enabled. An operator’s own sign-in serves the pages. A tenant’s own administrator, who holdstenantAdminin 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:443awctl guard context set --tenant TENANT_IDawctl guard tenants describe TENANT_IDawctl guard networks create --display-name Office --cidr 100.100.0.0/16describeshows the tenant’s Guard address, plan, and caps. Add--jsonto see the issuer, audience, and console client thatenable-productcreated:NAME DISPLAY_NAME SLUG STATUS GUARD_ADDRESStenants/t-g3j9ww0ydlhc Acme (preview Guard) acme ACTIVE acme.guard.preview.authwise.workPlan: none reportedCaps: members none, devices none, relay bytes a month noneFrom here on, Tenant administration describes who may use Guard and how to grant it.
-
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/welcomeawctl guard people grant-enrollment --subject-type user --subject-id USER_ID --tenant-id TENANT_IDA tenant whose people come from a directory needs no invitation: grant a group with
--subject-type groupand send its members the address.--client c-…in place of--continue-urlcontinues 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.networkAdmintakes--network-id:Terminal window awctl guard people grant-role --role tenantAdmin --subject-type user --subject-id USER_ID --tenant-id TENANT_ID
Run a relay
Section titled “Run a relay”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.
-
On the relay host, install the agent package and the relay package from the public package registry.
VERSIONis a Guard release, and the names below are the Debian x86-64 ones;arm64builds sit beside them, and RPMs areauthwise-guard-VERSION-1.x86_64.rpmandauthwise-guard-relay-VERSION-1.x86_64.rpm(oraarch64):Terminal window VERSION=0.21.0BASE="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"; docurl -fsSLO "${BASE}/${f}"donesha256sum -c --ignore-missing SHA256SUMSsudo apt install "./authwise-guard_${VERSION}-1_amd64.deb" "./authwise-guard-relay_${VERSION}-1_amd64.deb"Installing starts nothing. The relay has no configuration yet.
-
Obtain a TLS certificate for the relay’s hostname. Any certificate the nodes trust works; with Let’s Encrypt,
certbot certonly --standalone -d RELAY_HOSTon port 80 issues one, and a deploy hook that copies the files and runssystemctl try-restart awguard-relaykeeps it current, because the relay reads its certificate at start. -
Write
/etc/awguard/relay.toml. Token mode admits any node of this control plane that holds a valid node token; the issuer must equal thecontrol.agent.issuerof 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 anhttp://scheme makes the relay refuse every node with a 401. When the control plane serves its certificate from a private certificate authority, addjwks_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. -
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 -
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-pemtakes 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.
Add nodes
Section titled “Add nodes”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.
-
Install the agent. Every package comes from the same public package registry as the relay;
VERSIONis a Guard release.Linux (a server, a VM, or a workstation). On Debian or Ubuntu, the
authwise-guardpackage alone, without the relay package. It installsawguard, theawguard-peerservice, and the WireGuard dependency, and starts nothing:Terminal window VERSION=0.21.0BASE="https://git.authwise.com/api/v4/projects/authwise%2Fguard/packages/generic/guard/${VERSION}"ARCH=amd64 # or arm64curl -fsSLO "${BASE}/SHA256SUMS" -O "${BASE}/authwise-guard_${VERSION}-1_${ARCH}.deb"sha256sum -c --ignore-missing SHA256SUMSsudo 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 aarch64curl -fsSLO "${BASE}/SHA256SUMS" -O "${BASE}/authwise-guard-${VERSION}-1.${ARCH}.rpm"sha256sum -c --ignore-missing SHA256SUMSsudo 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.macossudo 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.windowsmsiexec /i "awguard-$v-x64.msi" /qnThe tenant’s welcome page offers the same downloads when the Guard resource’s
spec.join.downloadsnames them. -
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 NETWORKThe 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.tomlon 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. Aconfig.tomlis 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--inviteand--networkflags are refused with the step to take instead. -
Start the service and check it.
awguard upprints the command for the platform; on Linux it is:Terminal window sudo systemctl enable --now awguard-peerawguard statusThe 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.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause and fix |
|---|---|
awctl or awtenant answers 404 or an HTTP/1.1 protocol error at an API host, while the console works | The 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.guard | The 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 kit | The 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 InstallCredentialMissing | The Secret named in control.installCredential does not exist in the Guard namespace. |
Degraded names IdentityServerHostSuffixMismatch | products.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 preset | The 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.guard | An 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 Degraded | The 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 tenant | spec.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 administrator | The 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_ENABLED | Guard is not enabled on that tenant. Run enable-product. |
A Guard call is refused with TENANT_SUSPENDED | The 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_LIMIT | A 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 --network | The 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 node | The 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 other | No 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.