Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Auth GClasses

Authentication, authorization, and OAuth 2.

Source: kernel/c/root-linux/src/c_authz.c, c_auth_bff.c, c_task_authenticate.c


C_AUTHZ

Authorization manager — maintains a JSON Web Key Set (JWKS), verifies JWT tokens, and manages users and their access rules.

PropertyValue
StatesST_STOPPED, ST_IDLE

Commands

CommandDescription
list-jwk / add-jwk / remove-jwkManage JSON Web Keys.
users / create-user / enable-user / disable-user / delete-userUser management.
accessesList access rules.

C_AUTH_BFF

Backend-For-Frontend OAuth 2 server — mediates between browser SPAs and Keycloak, storing tokens in httpOnly cookies.

PropertyValue
StatesST_STOPPED, ST_IDLE, ST_WAIT_RESPONSE

Key attributes

AttributeTypeDescription
keycloak_urlstringKeycloak server URL.
realmstringKeycloak realm name.
client_idstringOAuth 2 client ID.
client_secretstringOAuth 2 client secret.
cookie_domainstringDomain for httpOnly cookies.
allowed_originstringCORS allowed origin.
allowed_redirect_uristringAllowed redirect URI after login.
cryptojsonTLS configuration.

Endpoints

EndpointDescription
POST /auth/loginStart login flow.
POST /auth/callbackHandle OAuth callback.
POST /auth/refreshRefresh access token.
POST /auth/logoutLogout and clear cookies.

C_TASK_AUTHENTICATE

OAuth 2 authentication task — handles the Keycloak authentication flow and caches tokens.

PropertyValue
StatesST_STOPPED, ST_DISCONNECTED, ST_WAIT_CONNECTED, ST_WAIT_RESPONSE, ST_AUTHENTICATED

Key attributes

AttributeTypeDescription
urlstringKeycloak token endpoint URL.
jwtstringCached JWT token (read-only).