GafaelfawrIngressConfig

pydantic model gafaelfawr.models.kubernetes.GafaelfawrIngressConfig

Configuration settings for an ingress using Gafaelfawr for auth.

Parameters:

data (Any)

Show JSON schema
{
   "title": "GafaelfawrIngressConfig",
   "description": "Configuration settings for an ingress using Gafaelfawr for auth.",
   "type": "object",
   "properties": {
      "baseUrl": {
         "title": "Baseurl",
         "type": "string"
      },
      "authType": {
         "anyOf": [
            {
               "$ref": "#/$defs/AuthType"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "delegate": {
         "anyOf": [
            {
               "$ref": "#/$defs/GafaelfawrIngressDelegate"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "loginRedirect": {
         "default": false,
         "title": "Loginredirect",
         "type": "boolean"
      },
      "replace403": {
         "default": false,
         "title": "Replace403",
         "type": "boolean"
      },
      "scopes": {
         "anyOf": [
            {
               "$ref": "#/$defs/GafaelfawrIngressScopesAll"
            },
            {
               "$ref": "#/$defs/GafaelfawrIngressScopesAny"
            },
            {
               "$ref": "#/$defs/GafaelfawrIngressScopesAnonymous"
            }
         ],
         "title": "Scopes"
      },
      "username": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Username"
      }
   },
   "$defs": {
      "AuthType": {
         "description": "Authentication types for the WWW-Authenticate header.",
         "enum": [
            "basic",
            "bearer"
         ],
         "title": "AuthType",
         "type": "string"
      },
      "GafaelfawrIngressDelegate": {
         "description": "Configuration for delegated tokens requested for a service.",
         "properties": {
            "notebook": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/GafaelfawrIngressDelegateNotebook"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "internal": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/GafaelfawrIngressDelegateInternal"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "minimumLifetime": {
               "anyOf": [
                  {
                     "format": "duration",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Minimumlifetime"
            },
            "useAuthorization": {
               "default": false,
               "title": "Useauthorization",
               "type": "boolean"
            }
         },
         "title": "GafaelfawrIngressDelegate",
         "type": "object"
      },
      "GafaelfawrIngressDelegateInternal": {
         "description": "Configuration for a delegated internal token.",
         "properties": {
            "service": {
               "title": "Service",
               "type": "string"
            },
            "scopes": {
               "items": {
                  "type": "string"
               },
               "title": "Scopes",
               "type": "array"
            }
         },
         "required": [
            "service",
            "scopes"
         ],
         "title": "GafaelfawrIngressDelegateInternal",
         "type": "object"
      },
      "GafaelfawrIngressDelegateNotebook": {
         "description": "Configuration for a delegated notebook token.\n\nNotes\n-----\nThis model is currently empty and represents an empty dict on the\nKubernetes side, but it is still an object for parallelism with\n`GafaelfawrIngressDelegateInternal`. It may have parameters for notebook\ntokens in the future.",
         "properties": {},
         "title": "GafaelfawrIngressDelegateNotebook",
         "type": "object"
      },
      "GafaelfawrIngressScopesAll": {
         "additionalProperties": false,
         "description": "Represents scopes where all scopes are required.",
         "properties": {
            "all": {
               "items": {
                  "type": "string"
               },
               "title": "All",
               "type": "array"
            }
         },
         "required": [
            "all"
         ],
         "title": "GafaelfawrIngressScopesAll",
         "type": "object"
      },
      "GafaelfawrIngressScopesAnonymous": {
         "additionalProperties": false,
         "description": "Represents anonymous access.",
         "properties": {
            "anonymous": {
               "const": true,
               "enum": [
                  true
               ],
               "title": "Anonymous",
               "type": "boolean"
            }
         },
         "required": [
            "anonymous"
         ],
         "title": "GafaelfawrIngressScopesAnonymous",
         "type": "object"
      },
      "GafaelfawrIngressScopesAny": {
         "additionalProperties": false,
         "description": "Represents scopes where any scope is sufficient.",
         "properties": {
            "any": {
               "items": {
                  "type": "string"
               },
               "title": "Any",
               "type": "array"
            }
         },
         "required": [
            "any"
         ],
         "title": "GafaelfawrIngressScopesAny",
         "type": "object"
      }
   },
   "required": [
      "baseUrl",
      "scopes"
   ]
}

Fields:
Validators:
  • _validate_conflicts » all fields

field authType: AuthType | None = None (name 'auth_type')

Auth type of challenge for 401 responses.

Validated by:
  • _validate_conflicts

field baseUrl: str [Required] (name 'base_url')

The base URL for Gafaelfawr URLs in Ingress annotations.

Validated by:
  • _validate_conflicts

field delegate: GafaelfawrIngressDelegate | None = None

Details of the requested delegated token, if any.

Validated by:
  • _validate_conflicts

field loginRedirect: bool = False (name 'login_redirect')

Whether to redirect unauthenticated users to the login flow.

Validated by:
  • _validate_conflicts

field replace403: bool = False (name 'replace_403')

Whether to generate a custom error response for 403 errors.

Validated by:
  • _validate_conflicts

field scopes: GafaelfawrIngressScopesAll | GafaelfawrIngressScopesAny | GafaelfawrIngressScopesAnonymous [Required]

The scopes to require for access.

Validated by:
  • _validate_conflicts

field username: str | None = None

Restrict access to the given user.

Validated by:
  • _validate_conflicts

to_auth_url()

Generate the auth URL corresponding to this ingress configuration.

Returns:

Authentication request URL for the Gafaelfawr /auth route that corresponds to this ingress configuration.

Return type:

str