package config import ( "errors" "fmt" "net/url" "strings" ) // OIDC is sign-in through an identity provider: Keycloak, Entra ID, Google, // Okta, Authentik — anything that speaks OpenID Connect. // // auth: // oidc: // issuer: https://login.example.com/realms/acme // client_id: llmgw // client_secret_file: /etc/llmgw/secrets/oidc-client-secret // label: Acme SSO // create_accounts: true // roles: {admin: [llmgw-admins], operator: [llmgw-ops]} // memberships: {ml-team: "team:Acme/ml"} type OIDC struct { // Issuer is the provider's address; its /.well-known/openid-configuration // says the rest. Issuer string `koanf:"issuer"` // ClientID and the file holding its secret, as registered with the // provider. ClientID string `koanf:"client_id"` ClientSecretFile string `koanf:"client_secret_file"` // RedirectURL is where the provider sends people back: // https:///login/oidc/callback. Empty works it out from the // request, which is right unless a proxy changes the address. RedirectURL string `koanf:"redirect_url"` // Label is what the sign-in button says: "Sign in with