genroc

    docs / Reference

    Genroc UI

    Every flag of the genroc-ui binary, and every key of its ui.yaml.

    Flags

    --config

    string

    Path to the YAML config ($GENROC_UI_CONFIG). Without it, --server alone runs a UI with no login: requests are proxied as they arrive, which is the local shape against a server without --auth, or a pasted token.

    --http

    string

    Listen address; overrides the config.

    --server

    string · default http://localhost:8449

    The genroc API to proxy to, when no --config is given ($GENROC_SERVER).

    --version

    boolean

    Print the version and exit.

    ui.yaml

    The file --config or $GENROC_UI_CONFIG names. Without one there is no login.

    FieldTypeRequiredDescription
    serverstringyesThe genroc API to proxy to, e.g. http://genroc:8448.
    listenstringAddress to listen on. --http overrides it. Default :8448.
    loginLoginHow people sign in. With neither providers nor passwords there is no login, and requests are proxied as they arrive.
    redirect_urlstringThe full URL of /auth/callback that providers redirect back to. Derived from the request when omitted; set it behind a proxy that rewrites Host.
    rolesobjectGroup -> permissions. The key "*" matches anyone signed in.
    secure_cookiebooleanForces the Secure attribute of the session cookie on or off. Omitted, it follows the request's scheme.
    session_ttlstringHow long a sign-in lasts, as a duration ("30m", "12h"). Default 12h.
    tokenTokenThe token minted for genroc. Required once login is configured.
    usersobjectSubject -> permissions, for a provider whose tokens carry no groups. Unioned with roles.

    login

    FieldTypeRequiredDescription
    passwordsPassword[]Email and password logins kept in this file. genctl init password prints an entry.
    providersProvider[]OpenID Connect providers, one sign-in button each.

    login.providers

    Each entry:

    FieldTypeRequiredDescription
    client_idstringyesThe OAuth client registered with the provider.
    client_secretstringyesThat client's secret.
    idstringyesStable and unique; it appears in URLs and in the state cookie.
    issuerstringyesThe OIDC issuer URL, exactly as the provider's tokens name it.
    discovery_urlstringOverrides where the discovery document is fetched, for an issuer this process reaches at a different address than the browser does (an IdP in Docker, split-horizon DNS).
    groups_claimstringID-token claim listing the person's groups, matched against roles. Default groups.
    jwks_urlstringOverrides the discovered key set, as discovery_url.
    namestringWhat the sign-in button says.
    scopesstring[]Scopes requested at login. Defaults to openid, email, profile and groups; set it for a provider that refuses groups, such as Google.
    subject_claimstringID-token claim naming the person: the token's subject, and the key of users. Default email.
    token_urlstringOverrides the discovered token endpoint, as discovery_url.

    login.passwords

    Each entry:

    FieldTypeRequiredDescription
    emailstringyesThe sign-in email, and the token's subject.
    hashstringyesbcrypt hash of the password; plaintext is refused.
    groupsstring[]Groups, matched against roles.

    token

    genroc verifies what genroc-ui mints, so these must match its --jwt-* flags.

    FieldTypeRequiredDescription
    audiencestringThe aud of minted tokens. Must match genroc's --jwt-audience. Default genroc.
    issuerstringThe iss of minted tokens. Must match genroc's --jwt-issuer. Default genroc-ui.
    secretstringThe signing secret shared with genroc, at least 32 characters. Give this or secret_file.
    secret_filestringA file holding the secret, which must be the one genroc reads with --jwt-secret-file. Surrounding whitespace is trimmed.
    ttlstringLifetime of a token minted for one request to genroc. Default 1m.