Skip to content

Flows

A flow combines an authorization with an environment. Different flows can serve different users, hosts or browser access links.

Flows are tried in configuration order:

  1. Is the incoming transport enabled for this flow?
  2. Does the request meet its requirements?
  3. Does authorization succeed?
  4. Can the request use the configured environment and a compatible session?

A denied authorization can try the next flow; an authorization error stops the attempt. A published HTTP link selects exactly one flow and never falls through to another flow if access is denied.

Configuration

name

Unique flow name, used in logs and stored sessions.

Warning

Changing a flow's name breaks its existing sessions.

title

Plain text = ""

Optional display title, defaulting to name. At most 255 UTF-8 bytes without control or formatting characters. A shell's terminal title can override it in that shell's tab.

auditlog

Name of an entry in the root auditlogs map. Omitted, null and '' select auditlogs.default only if it is defined; otherwise this flow has no audit logging or recording. An explicit unknown name is a configuration error. Selecting a defined logger activates it; no enabled flag is needed.

ssh

Controls incoming SSH access, independently of HTTP.

http

Controls browser access, the requesting-name prompt and terminal keepalive.

Note

Enabling the root HTTP endpoint makes every flow HTTP-eligible by default. Set http.enabled: false on flows that should remain SSH-only.

discoverAsSlug

string = ""

Publishes an HTTP access link for this flow on its allowed hosts. An empty value publishes nothing. Only HTTP-enabled flows publish links.

A slug has one or two case-sensitive segments of ASCII letters, digits or hyphens, each 1–64 bytes long; examples are servers/Example and bla-bla. Leading or trailing slashes, empty segments and URL-encoded values are not allowed.

The link still requires authorization and all configured requirements. Two flows cannot publish the same slug on the same configured domain. Disjoint domains may use the same slug.

The published slug must match this flow's requirement.http.includedSlug and must not match excludedSlug. A contradiction is a configuration error at startup; publishing a link does not widen the allowed slug scope.

requirement

Rules a request must satisfy before authorization.

authorization

An inline authorization or the name of an entry in the root authorizations map. If omitted, authorizations.default must be defined.

Inline authorization and environment:

1
2
3
4
5
6
7
flows:
  - name: local
    authorization:
      type: local
    environment:
      type: local
      name: "{{.authorization.user.name}}"

Referenced authorization and environment:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
authorizations:
  local-users:
    type: local
environments:
  host:
    type: local
    name: "{{.authorization.user.name}}"
flows:
  - name: local
    authorization: local-users
    environment: host

environment

An inline environment or the name of an entry in the root environments map, as shown above. If omitted, environments.default must be defined.

SSH transport

enabled

bool = true

Accepts incoming SSH authentication for this flow. false does not disable HTTP or SSH used to connect to a downstream target.

HTTP transport

enabled

bool = true

Allows HTTP authentication and discovery for this flow. The root HTTP endpoint must also be enabled. false leaves SSH unchanged.

requestUser

bool = true

With true, the browser and API require a nonblank requesting name. With false, the browser sends an empty name. This is useful for OIDC flows that identify users through the IdP. Named and nameless flows remain separate; methods needing a name cannot guess one instead.

Name requirements still apply: ^sso$ does not match an empty name; ^$ does. The requesting name is not the verified principal or the target account.

keepAlive

Browser terminal and management-channel keepalive interval, from 1s to 5m. Users can change it in Connection settings, unless the value is enforced.

The template is evaluated after authentication using the current session context. An enforced value overrides saved browser preferences. Keepalive preserves only the network connection; it does not extend session or RememberMe timeouts.

Editable interval
1
2
http:
  keepAlive: 10s
Enforced interval based on the authenticated user
1
2
http:
  keepAlive: '{{ if eq .authentication.principal "alice" }}10s{{ else }}!20s{{ end }}'

Requirement

Requirements are checked before authorization. General name rules apply to SSH and HTTP. Transport-specific rules apply in addition: all applicable rules must match.

Configuration

includedRequestingName

Regex = ""

Include rule for the requesting name, such as alice in ssh alice@host. Empty means unrestricted.

excludedRequestingName

Regex = ""

Exclude rule for the requesting name. Empty excludes nothing.

ssh

Additional rules for incoming SSH connections.

http

Additional rules for browser access.

Note

Regular expressions match substrings unless anchored. Use ^alice$ to match the complete name, rather than also matching alice-admin.

SSH requirements

These properties belong to requirement.ssh.

includedRequestingName

Regex = ""

Additional include rule for the SSH requesting name. Empty means unrestricted.

excludedRequestingName

Regex = ""

Additional exclude rule for the SSH requesting name. Empty excludes nothing.

HTTP requirements

These properties belong to requirement.http.

includedRequestingName

Regex = ""

Additional include rule for the HTTP requesting name, which may be empty.

excludedRequestingName

Regex = ""

Additional exclude rule for the HTTP requesting name.

includedHost

Regex = ""

Include rule for the canonical host: lowercase, without port or trailing DNS dot. For example, APP.EXAMPLE.:443 becomes app.example. IPv6 literals keep their brackets.

excludedHost

Regex = ""

Exclude rule for the canonical host.

includedSlug

Regex = ""

Include rule for the slug without a leading slash. The root / has slug "".

excludedSlug

Regex = ""

Exclude rule for the slug.

When both slug rules are empty or omitted, only the root / matches. Otherwise normal regex rules apply: an empty include with a nonempty exclude allows every slug except those excluded. Use ^docker$ to allow only /docker.

For name and host rules, empty includes do not restrict access and empty excludes exclude nothing. Host rules only narrow the endpoint's domain list. Discovery links do not bypass these requirements. Host and user checks remain authoritative during authentication; anonymous discovery does not inspect user accounts, keys or sessions, or contact an identity provider.

Examples

Different SSH login names

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
flows:
  - name: sso
    requirement:
      includedRequestingName: ^sso$
    authorization:
      type: oidcDeviceAuth
      # ...
    environment:
      type: local
      # ...

  - name: local
    authorization:
      type: local
      # ...
    environment:
      type: local
      # ...

This flow publishes https://app.example.org/servers/Example without asking for a login name. Configure the HTTPS endpoint separately. The IdP must support device authorization and, by default, refresh tokens. Its verified principal must map to an allowed local account; configure the principal mapping accordingly.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
flows:
  - name: browser
    ssh:
      enabled: false
    http:
      requestUser: false
    discoverAsSlug: servers/Example
    requirement:
      includedRequestingName: '^$'
      http:
        includedHost: '^app\.example\.org$'
        includedSlug: '^servers/Example$'
    authorization:
      type: oidcDeviceAuth
      rememberMe: allowedAndEnabledByDefault
      issuer: https://identity.example.org
      clientId: bifroest
      clientSecret: example-only
    environment:
      type: local
      name: '{{ .authentication.principal }}'

Next topics