Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
780c929
First pass at a Sharepoint Online fetcher
seanstory Dec 12, 2025
650f641
Merge branch 'main' into seanstory/add-sharepoint-fetcher
seanstory Dec 16, 2025
4691f1e
First pass at an OAuth Code Grant flow
seanstory Dec 15, 2025
1387a03
Changes from node scripts/check_mappings_update --fix
kibanamachine Dec 16, 2025
5b3a8cf
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Dec 16, 2025
66a47d6
Merge branch 'seanstory/add-sharepoint-fetcher' into seanstory/oauth2…
lorenabalan Dec 22, 2025
f8e4a61
Get rid of IDE errors
lorenabalan Dec 24, 2025
cadda58
Make expiresIn optional and add a bunch of helper comments to come ba…
lorenabalan Dec 24, 2025
e72ae0e
Make expiresIn optional
lorenabalan Dec 26, 2025
5764ef9
Add taskmanager task to cleanup state
lorenabalan Dec 26, 2025
5c72287
Update connectors for optional expiresAt
lorenabalan Dec 26, 2025
3c86163
Increase task frequency
lorenabalan Dec 29, 2025
41734d2
Add rate limiter
lorenabalan Dec 29, 2025
0300b1a
Fixes
lorenabalan Dec 30, 2025
ff8cdce
Redirect to success page
lorenabalan Dec 30, 2025
3c77bcd
Use v2 schema
lorenabalan Dec 30, 2025
2fbf1de
Normalize bearer -> Bearer, add redirectUri to connector config and u…
lorenabalan Dec 30, 2025
f8d37b4
Make useBasicAuth configurable
lorenabalan Dec 30, 2025
282b427
Cleanup
lorenabalan Dec 31, 2025
4313840
Merge branch 'main' into seanstory/oauth2-auth-code-flow
lorenabalan Jan 8, 2026
1b9911f
Address first batch of comments
lorenabalan Jan 9, 2026
28c188b
Address second batch of comments
lorenabalan Jan 9, 2026
62d5abd
Separate interfaces to avoid awkward optional id
lorenabalan Jan 9, 2026
0c28e2e
Remove thin wrapper function
lorenabalan Jan 9, 2026
48b4850
Remove fields, log them instead
lorenabalan Jan 9, 2026
eb1f9f1
Use core, remove authz url and scope from state SO
lorenabalan Jan 12, 2026
e9d25bb
Small refactor for readability
lorenabalan Jan 12, 2026
4296d5d
Make returnUrl a parameter
lorenabalan Jan 12, 2026
5715715
Rename route
lorenabalan Jan 12, 2026
4466144
Try refresh token on 401
lorenabalan Jan 12, 2026
404c7a7
Undo custom redirectURI
lorenabalan Jan 12, 2026
6cc6201
Add comment
lorenabalan Jan 13, 2026
9f55d45
Remove TODO
lorenabalan Jan 13, 2026
2dc86d4
Remove lingering attribute
lorenabalan Jan 13, 2026
e57ce06
Bump SO number
lorenabalan Jan 13, 2026
19d3f6b
Add notification when oauth completed successfully
lorenabalan Jan 13, 2026
4fd803e
Changes from node scripts/jest_integration -u src/core/server/integra…
kibanamachine Jan 13, 2026
ef50f17
Merge branch 'connectors-auth-code-grant' into seanstory/oauth2-auth-…
lorenabalan Feb 3, 2026
356d885
Remove sharepoint and unused labels
lorenabalan Feb 3, 2026
8925a8a
Make callback public endpoint, remove sharepoint docs
lorenabalan Feb 3, 2026
8e9ba7a
bring back deleted icon
lorenabalan Feb 3, 2026
71f4cd5
Reuse refresh logic when handling 401s
lorenabalan Feb 3, 2026
62b5cac
Avoid any
lorenabalan Feb 3, 2026
b788df8
Quick checks fixes
lorenabalan Feb 3, 2026
cf1a144
Make CI green again
lorenabalan Feb 3, 2026
e205b1f
Default to true for isExpired
lorenabalan Feb 3, 2026
67a0546
Changes from yarn openapi:bundle
kibanamachine Feb 3, 2026
f8d0324
Merge branch 'connectors-auth-code-grant' into seanstory/oauth2-auth-…
lorenabalan Feb 4, 2026
8004a96
Regenerate oas_docs bundles
lorenabalan Feb 4, 2026
a792b5b
Changes from make api-docs
kibanamachine Feb 4, 2026
977af73
Fix SO tests
lorenabalan Feb 4, 2026
2b9dbd2
Merge branch 'seanstory/oauth2-auth-code-flow' of github.com:elastic/…
lorenabalan Feb 4, 2026
2218c08
Update docs and regenerate bundles
lorenabalan Feb 4, 2026
19c1f94
Changes from make api-docs
kibanamachine Feb 4, 2026
f79a2b3
Fix tests and remove token normalization
lorenabalan Feb 4, 2026
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: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,6 @@ oas_docs/output/kibana.serverless.tmp*.yaml
oas_docs/output/kibana.tmp*.yaml
oas_docs/output/kibana.new.yaml
oas_docs/output/kibana.serverless.new.yaml
oas_docs/bundle.json
oas_docs/bundle.serverless.json
Comment thread
lorenabalan marked this conversation as resolved.

.codeql
.dependency-graph-log.json
Expand Down
68 changes: 68 additions & 0 deletions oas_docs/bundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,74 @@
},
"openapi": "3.0.0",
"paths": {
"/api/actions/connector/_oauth_callback": {
"get": {
"description": "Handles the OAuth 2.0 authorization code callback from external providers. Exchanges the authorization code for access and refresh tokens.",
"operationId": "get-actions-connector-oauth-callback",
"parameters": [
{
"description": "The authorization code returned by the OAuth provider.",
"in": "query",
"name": "code",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "The state parameter for CSRF protection.",
"in": "query",
"name": "state",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Error code if the authorization failed.",
"in": "query",
"name": "error",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Human-readable error description.",
"in": "query",
"name": "error_description",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Session state from the OAuth provider (e.g., Microsoft).",
"in": "query",
"name": "session_state",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Returns an HTML page with error details if authorization fails."
},
"302": {
"description": "Redirects to Kibana on successful authorization."
},
"401": {
"description": "User is not authenticated."
}
},
"summary": "Handle OAuth callback",
"tags": [
"connectors"
]
}
},
"/api/actions/connector/{id}": {
"delete": {
"description": "WARNING: When you delete a connector, it cannot be recovered.",
Expand Down
68 changes: 68 additions & 0 deletions oas_docs/bundle.serverless.json
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,74 @@
},
"openapi": "3.0.0",
"paths": {
"/api/actions/connector/_oauth_callback": {
"get": {
"description": "Handles the OAuth 2.0 authorization code callback from external providers. Exchanges the authorization code for access and refresh tokens.",
"operationId": "get-actions-connector-oauth-callback",
"parameters": [
{
"description": "The authorization code returned by the OAuth provider.",
"in": "query",
"name": "code",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "The state parameter for CSRF protection.",
"in": "query",
"name": "state",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Error code if the authorization failed.",
"in": "query",
"name": "error",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Human-readable error description.",
"in": "query",
"name": "error_description",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Session state from the OAuth provider (e.g., Microsoft).",
"in": "query",
"name": "session_state",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Returns an HTML page with error details if authorization fails."
},
"302": {
"description": "Redirects to Kibana on successful authorization."
},
"401": {
"description": "User is not authenticated."
}
},
"summary": "Handle OAuth callback",
"tags": [
"connectors"
]
}
},
"/api/actions/connector/{id}": {
"delete": {
"description": "WARNING: When you delete a connector, it cannot be recovered.",
Expand Down
55 changes: 55 additions & 0 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,61 @@ paths:
x-metaTags:
- content: Kibana, Elastic Cloud Serverless
name: product_name
/api/actions/connector/_oauth_callback:
get:
description: |-
**Spaces method and path for this operation:**

<div><span class="operation-verb get">get</span>&nbsp;<span class="operation-path">/s/{space_id}/api/actions/connector/_oauth_callback</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Handles the OAuth 2.0 authorization code callback from external providers. Exchanges the authorization code for access and refresh tokens.
operationId: get-actions-connector-oauth-callback
parameters:
- description: The authorization code returned by the OAuth provider.
in: query
name: code
required: false
schema:
type: string
- description: The state parameter for CSRF protection.
in: query
name: state
required: false
schema:
type: string
- description: Error code if the authorization failed.
in: query
name: error
required: false
schema:
type: string
- description: Human-readable error description.
in: query
name: error_description
required: false
schema:
type: string
- description: Session state from the OAuth provider (e.g., Microsoft).
in: query
name: session_state
required: false
schema:
type: string
responses:
'200':
description: Returns an HTML page with error details if authorization fails.
'302':
description: Redirects to Kibana on successful authorization.
'401':
description: User is not authenticated.
summary: Handle OAuth callback
tags:
- connectors
x-metaTags:
- content: Kibana, Elastic Cloud Serverless
name: product_name
/api/actions/connector/{id}:
delete:
description: |-
Expand Down
55 changes: 55 additions & 0 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,61 @@ paths:
x-metaTags:
- content: Kibana
name: product_name
/api/actions/connector/_oauth_callback:
get:
description: |-
**Spaces method and path for this operation:**

<div><span class="operation-verb get">get</span>&nbsp;<span class="operation-path">/s/{space_id}/api/actions/connector/_oauth_callback</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Handles the OAuth 2.0 authorization code callback from external providers. Exchanges the authorization code for access and refresh tokens.
operationId: get-actions-connector-oauth-callback
parameters:
- description: The authorization code returned by the OAuth provider.
in: query
name: code
required: false
schema:
type: string
- description: The state parameter for CSRF protection.
in: query
name: state
required: false
schema:
type: string
- description: Error code if the authorization failed.
in: query
name: error
required: false
schema:
type: string
- description: Human-readable error description.
in: query
name: error_description
required: false
schema:
type: string
- description: Session state from the OAuth provider (e.g., Microsoft).
in: query
name: session_state
required: false
schema:
type: string
responses:
'200':
description: Returns an HTML page with error details if authorization fails.
'302':
description: Redirects to Kibana on successful authorization.
'401':
description: User is not authenticated.
summary: Handle OAuth callback
tags:
- connectors
x-metaTags:
- content: Kibana
name: product_name
/api/actions/connector/{id}:
delete:
description: |-
Expand Down
5 changes: 5 additions & 0 deletions packages/kbn-check-saved-objects-cli/current_fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,11 @@
"monitoring-telemetry": [
"reportedClusterUuids"
],
"oauth_state": [
"connectorId",
"expiresAt",
"state"
],
"observability-onboarding-state": [
"progress",
"state",
Expand Down
14 changes: 14 additions & 0 deletions packages/kbn-check-saved-objects-cli/current_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3127,6 +3127,20 @@
}
}
},
"oauth_state": {
"dynamic": false,
"properties": {
"connectorId": {
"type": "keyword"
},
"expiresAt": {
"type": "date"
},
"state": {
"type": "keyword"
}
}
},
"observability-onboarding-state": {
"properties": {
"progress": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"10.1.0": [
{
"connectorId": "abc123-def456-connector-id",
"tokenType": "access_token",
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IlRlc3QgVXNlciIsImlhdCI6MTUxNjIzOTAyMn0.test_signature",
"expiresAt": "2025-01-15T14:30:00.000Z",
"createdAt": "2025-01-15T13:00:00.000Z",
"updatedAt": "2025-01-15T13:00:00.000Z"
}
],
"10.2.0": [
{
"connectorId": "abc123-def456-connector-id",
"tokenType": "access_token",
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IlRlc3QgVXNlciIsImlhdCI6MTUxNjIzOTAyMn0.test_signature",
"expiresAt": "2025-01-15T14:30:00.000Z",
"createdAt": "2025-01-15T13:00:00.000Z",
"updatedAt": "2025-01-15T13:00:00.000Z"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export { registerCoreObjectTypes } from './registration';

// set minimum number of registered saved objects to ensure no object types are removed after 8.8
// declared in internal implementation explicitly to prevent unintended changes.
export const SAVED_OBJECT_TYPES_COUNT = 145 as const;
export const SAVED_OBJECT_TYPES_COUNT = 146 as const;
Loading
Loading