weebo-forgejo

ForgejoOAuth2Application

An OAuth2 application registered in Forgejo, for apps that use Forgejo as their identity provider.

  • API version: forgejo.weebo.io/v1alpha1
  • Scope: Namespaced
  • Short names: fjoauth
  • Guide: Credentials

An OAuth2 application registered in Forgejo, for apps that use Forgejo as their identity provider. Its credentials (FORGEJO_CLIENT_ID, FORGEJO_CLIENT_SECRET, FORGEJO_URL — the OIDC issuer) are written to secretTargets.

Forgejo regenerates the client secret on every update and never returns it again, so the application is only updated when the spec actually differs, when a target lost the secret, or on a new forgejo.weebo.io/rotate-secret nonce.

Example

apiVersion: forgejo.weebo.io/v1alpha1
kind: ForgejoOAuth2Application
metadata:
  name: my-oauth2application
  namespace: team-a
spec:
  redirectUris:
    - https://grafana.example.com/login/generic_oauth

Spec fields

FieldTypeRequiredDefaultDescription
confidentialClientbooleannotrueConfidential clients authenticate with their secret; public clients (SPAs, CLIs) use PKCE only.
deletionPolicystringno"Delete"What happens to the Forgejo object when its CR is deleted.
instanceRefobjectnoThe ForgejoInstance or ForgejoLocalInstance this object lives on. Unset: the cluster's only ForgejoInstance, else the only ForgejoLocalInstance of this namespace.
namestringnoDisplay name. Defaults to the CR name.
ownerRefobjectnoForgejoUser owning the application (typically a bot) — the operator acts as that user through Forgejo's Sudo header. Unset: the operator's admin account. Changing it recreates the application (new client id), which needs the forgejo.weebo.io/allow-disruptive-update: "true" annotation.
redirectUrisstring[]yes
secretTargetsobject[]noDefaults to one target named after the CR, in its namespace, on the instance's default secretStore backend.

Build a manifest

Answer the questions and fill in the fields: the YAML preview updates as you type, ready to copy or download and kubectl apply.

Loading form...