pub enum SecurityScheme {
ApiKey(APIKeySecurityScheme),
Http(HTTPAuthSecurityScheme),
OAuth2(Box<OAuth2SecurityScheme>),
OpenIdConnect(OpenIdConnectSecurityScheme),
MutualTls(MutualTlsSecurityScheme),
}Expand description
An authentication or authorization scheme the agent declares.
The wire form is OpenAPI 3.x: a single JSON object
with a type field that names the variant. The five
variants map to the proto’s oneof scheme; this
commit ships the final two, OpenIdConnect
and MutualTls, completing the
set the spec names.
Variants§
ApiKey(APIKeySecurityScheme)
API key authentication. The key is carried in a
query parameter, a header, or a cookie, named by
APIKeySecurityScheme::name.
Http(HTTPAuthSecurityScheme)
HTTP authentication, as defined in RFC 7235. The
most common value is Bearer (RFC 6750); Basic
is also standard.
OAuth2(Box<OAuth2SecurityScheme>)
OAuth 2.0 authentication (RFC 6749). The variant
carries the OAuth2SecurityScheme payload
(flows + RFC 8414 metadata URL) boxed to keep the
enum’s total size down — the OAuth 2 sub-types
are several hundred bytes, and the ApiKey /
Http variants are forty.
OpenIdConnect(OpenIdConnectSecurityScheme)
OpenID Connect authentication (the discovery
URL is the entry point the client fetches to
learn the OAuth 2 endpoints the OIDC provider
supports).
MutualTls(MutualTlsSecurityScheme)
Mutual TLS authentication (RFC 8705). The agent authenticates the client by validating the client’s X.509 certificate against a configured trust anchor; no per-request credentials are sent.