Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ sources:
- location: overlays/custom-metadata-modifications-overlay.yaml
- location: overlays/agent-modifications-overlay.yaml
- location: overlays/admin-modifications-overlay.yaml
- location: overlays/oauth-client-security-overlay.yaml
output: overlayed_specs/glean-merged-spec.yaml
registry:
location: registry.speakeasyapi.dev/glean-el2/sdk/glean-api-specs
Expand All @@ -29,6 +30,7 @@ sources:
- location: overlays/client-modifications-overlay.yaml
- location: overlays/agent-modifications-overlay.yaml
- location: overlays/admin-modifications-overlay.yaml
- location: overlays/oauth-client-security-overlay.yaml
output: overlayed_specs/glean-client-api-specs.yaml
glean-client-merged-code-samples-spec:
inputs:
Expand Down
29 changes: 29 additions & 0 deletions overlays/oauth-client-security-overlay.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: OAuth Client API security
version: 0.0.1
# A Glean API token and an OAuth access token are both HTTP bearer credentials,
# so the existing single APIToken security scheme already covers both — no
# separate OAuth security scheme is required, and the generated SDKs keep their
# existing flat `apiToken` constructor field. This overlay only clarifies the
# scheme description to document OAuth usage.
#
# External-IdP OAuth tokens additionally require the `X-Glean-Auth-Type: OAUTH`
# request header, which the caller supplies (e.g. a per-request header option on
# the SDKs, or a custom HTTP client). Glean-issued OAuth tokens (Glean OAuth
# Authorization Server, including Dynamic Client Registration clients) are
# detected by issuer and need no header.
#
# OAuth applies to the Client API only; the Indexing API accepts Glean-issued
# tokens exclusively.
actions:
- target: $.components.securitySchemes.APIToken
update:
description: >-
HTTP bearer token. Accepts a Glean-issued API token, an OAuth access
token from the Glean OAuth Authorization Server (including Dynamic Client
Registration clients), or an OAuth access token issued by an external
identity provider. External-IdP OAuth tokens must also include the
`X-Glean-Auth-Type: OAUTH` request header. OAuth is supported on the
Client API only; the Indexing API requires a Glean-issued token.
Loading