Skip to content

Commit f8b71e8

Browse files
Merge branch 'main' into fix-uri-parts-usage-string
2 parents 1587a0a + e8def0a commit f8b71e8

686 files changed

Lines changed: 25793 additions & 9921 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/evals-write-spec/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ evaluate.describe('Suite name', { tag: tags.serverless.observability.complete },
2424

2525
evaluate('test name', async ({ executorClient, connector }) => {
2626
await executorClient.runExperiment(
27-
{ dataset, task },
27+
{ datasets: [dataset], task },
2828
evaluators
2929
);
3030
});
@@ -202,7 +202,7 @@ export function createEvaluateDataset({
202202
return async ({ dataset }) => {
203203
await executorClient.runExperiment(
204204
{
205-
dataset,
205+
datasets: [dataset],
206206
task: async ({ input }) => {
207207
const response = await chatClient.converse({ messages: [{ message: input.question }] });
208208
return { messages: response.messages, steps: response.steps };

.agents/skills/evals-write-spec/references/evaluator-patterns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type MyTaskOutput = TaskOutput & {
2020
};
2121

2222
await executorClient.runExperiment(
23-
{ dataset, task },
23+
{ datasets: [dataset], task },
2424
selectEvaluators<MyExample, MyTaskOutput>([
2525
{
2626
name: 'NonEmptyDocuments',
@@ -246,7 +246,7 @@ A common pattern passes both CODE and LLM evaluators to `runExperiment`:
246246

247247
```ts
248248
await executorClient.runExperiment(
249-
{ dataset, task },
249+
{ datasets: [dataset], task },
250250
[
251251
createCriteriaEvaluator({ evaluators }),
252252
createToolCallsEvaluator({ evaluators }),

.buildkite/scripts/common/setup_job_env.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ EOF
130130
# Set up Kibana Evals secrets
131131
{
132132
if [[ "${KBN_EVALS:-}" =~ ^(1|true)$ ]]; then
133-
echo "KBN_EVALS was set - exposing evals connectors and ES export credentials"
133+
echo "KBN_EVALS was set - exposing evals connectors and export credentials"
134134

135135
KBN_EVALS_CONFIG_JSON="$(vault_get kbn-evals config | base64 -d)"
136136
# Validate config shape (safe; does not print secrets)
@@ -145,10 +145,6 @@ EOF
145145
export KBN_EVALS_CONFIG_B64
146146
KBN_EVALS_CONFIG_B64="$(printf '%s' "$KBN_EVALS_CONFIG_JSON" | base64)"
147147

148-
# Elasticsearch cluster for evaluation results export
149-
export EVALUATIONS_ES_URL="$(jq -r '.evaluationsEs.url // empty' <<<"$KBN_EVALS_CONFIG_JSON")"
150-
export EVALUATIONS_ES_API_KEY="$(jq -r '.evaluationsEs.apiKey // empty' <<<"$KBN_EVALS_CONFIG_JSON")"
151-
152148
# Optional: separate cluster for trace-based evaluators
153149
export TRACING_ES_URL="$(jq -r '.tracingEs.url // empty' <<<"$KBN_EVALS_CONFIG_JSON")"
154150
export TRACING_ES_API_KEY="$(jq -r '.tracingEs.apiKey // empty' <<<"$KBN_EVALS_CONFIG_JSON")"

.buildkite/scripts/steps/evals/run_suite.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ fi
1818
# The value should be the platform-level `pluginId` use-case identifier.
1919
# `@kbn/evals` defaults this to `kbn_evals`, but you can override via KBN_EVALS_TELEMETRY_PLUGIN_ID.
2020

21-
# Set a base run id from the Buildkite build. The evaluator fixture appends the
22-
# connector id to produce a unique run_id per model (e.g. bk-<build>-<connector>).
23-
# Correlation across models in the same build uses ci.buildkite.build_id which
24-
# is populated automatically from BUILDKITE_BUILD_ID in score_repository.ts.
21+
# Set a base build run ID from the Buildkite build. This is used as a seed for
22+
# generating deterministic per-task experiment IDs (not as the experiment_id itself).
23+
# Suite-run grouping in the UI uses metadata.ci.build_id which is populated
24+
# automatically from BUILDKITE_BUILD_ID in the Buildkite metadata.
2525
if [[ -z "${TEST_RUN_ID:-}" ]] && [[ -n "${BUILDKITE_BUILD_ID:-}" ]]; then
2626
export TEST_RUN_ID="bk-${BUILDKITE_BUILD_ID}"
2727
fi

docs/extend/plugin-list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ mapped_pages:
153153
| [enterpriseSearch](https://github.com/elastic/kibana/blob/main/x-pack/solutions/search/plugins/enterprise_search/README.md) | This plugin provides Kibana user interfaces for managing the Enterprise Search solution and its products, App Search and Workplace Search. |
154154
| [entityManager](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/entity_manager/README.md) | This plugin provides access to observed entity data, such as information about hosts, pods, containers, services, and more. |
155155
| [entityStore](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/entity_store/README.md) | Central place for Entities management and logs extraction. |
156-
| [evals](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/evals/README.md) | The Evals plugin provides an in-Kibana UI for browsing LLM evaluation run results, per-evaluator statistics, and OpenTelemetry traces produced by the @kbn/evals evaluation framework. |
156+
| [evals](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/evals/README.md) | The Evals plugin provides an in-Kibana UI for browsing LLM evaluation experiment results, per-evaluator statistics, and OpenTelemetry traces produced by the @kbn/evals evaluation framework. |
157157
| [eventLog](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/event_log/README.md) | The event log plugin provides a persistent history of alerting and action activities. |
158158
| [exploratoryView](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/exploratory_view/README.md) | A shared component for visualizing observability data types via lens embeddable. For further details. |
159159
| [features](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/features/README.md) | The features plugin enhance Kibana with a per-feature privilege system. |

packages/kbn-mock-idp-plugin/public/role_switcher.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ export const useAuthenticator = (reloadPage = false) => {
3333
body: JSON.stringify(params),
3434
});
3535

36-
if (reloadPage) {
37-
const form = createForm(
38-
services.http.basePath.prepend('/api/security/saml/callback'),
39-
response
40-
);
36+
const { acsUrl, ...samlFields } = response;
37+
const formAction = acsUrl ?? services.http.basePath.prepend('/api/security/saml/callback');
38+
39+
if (reloadPage || acsUrl) {
40+
const form = createForm(formAction, samlFields);
4141
form.submit();
4242
await new Promise(() => {});
4343
} else {
4444
await services.http.post('/api/security/saml/callback', {
45-
body: JSON.stringify(response),
45+
body: JSON.stringify(samlFields),
4646
asResponse: true,
4747
rawResponse: true,
4848
});

packages/kbn-mock-idp-plugin/server/plugin.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,13 @@ export const plugin: PluginInitializer<void, void, PluginSetupDependencies> = as
201201
const parsed = new URL(request.body.url, 'https://localhost');
202202
const relayState = parsed.searchParams.get('RelayState') ?? undefined;
203203

204+
// Kibana-bound ACS URLs are intentionally left to the `onPreResponse` rewrite above;
205+
// we only override here for external SPs (e.g. UIAM).
206+
const externalAcsUrl =
207+
samlRequestInfo?.acsUrl && !samlRequestInfo.acsUrl.startsWith(MOCK_IDP_SP_BASE_URL)
208+
? samlRequestInfo.acsUrl
209+
: undefined;
210+
204211
return response.ok({
205212
body: {
206213
SAMLResponse: await createSAMLResponse({
@@ -212,9 +219,13 @@ export const plugin: PluginInitializer<void, void, PluginSetupDependencies> = as
212219
? { authnRequestId: samlRequestInfo.requestId }
213220
: {}),
214221
...(samlRequestInfo?.issuer ? { spEntityId: samlRequestInfo.issuer } : {}),
222+
...(externalAcsUrl ? { acsUrl: externalAcsUrl } : {}),
215223
...serverlessOptions,
216224
}),
217225
...(relayState ? { RelayState: relayState } : {}),
226+
// Echoed alongside SAMLResponse so the browser's auto-submitted form posts to UIAM
227+
// instead of the default Kibana ACS endpoint (see mock_idp_page form action).
228+
...(externalAcsUrl ? { acsUrl: externalAcsUrl } : {}),
218229
},
219230
});
220231
} catch (err) {

packages/kbn-optimizer/limits.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ pageLoadAssetSize:
169169
securitySolutionEss: 38689
170170
securitySolutionServerless: 52082
171171
serverless: 7412
172-
serverlessObservability: 19300
172+
serverlessObservability: 21437
173173
serverlessSearch: 26287
174174
serverlessVectordb: 7618
175175
serverlessWorkplaceAI: 4855

scripts/evals.js

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -274,20 +274,15 @@ var ENV_DOCS = [
274274
example: 'TRACING_EXPORTERS=\'[{"http":{"url":"https://ingest.example.com/v1/traces"}}]\'',
275275
},
276276
{
277-
name: 'EVALUATIONS_ES_URL',
278-
description: 'Elasticsearch URL where evaluation results are exported.',
279-
example: 'EVALUATIONS_ES_URL=http://elastic:changeme@localhost:9200',
280-
},
281-
{
282-
name: 'EVALUATIONS_ES_API_KEY',
283-
description: 'API key for authenticating with the evaluations Elasticsearch cluster.',
284-
example: 'EVALUATIONS_ES_API_KEY=...',
277+
name: 'EVALUATIONS_KBN_URL',
278+
description:
279+
'Kibana URL used for eval score ingestion and dataset operations when targeting a non-local cluster.',
280+
example: 'EVALUATIONS_KBN_URL=http://elastic:changeme@localhost:5601',
285281
},
286282
{
287-
name: 'KBN_EVALS_SKIP_PREFLIGHT_EXPORT',
288-
description:
289-
'Skip the Elasticsearch export preflight check (not recommended for CI). Preflight runs a small sentinel write against the configured evaluations cluster.',
290-
example: 'KBN_EVALS_SKIP_PREFLIGHT_EXPORT=true',
283+
name: 'EVALUATIONS_KBN_API_KEY',
284+
description: 'API key for authenticating to EVALUATIONS_KBN_URL.',
285+
example: 'EVALUATIONS_KBN_API_KEY=...',
291286
},
292287
{
293288
name: 'SELECTED_EVALUATORS',
@@ -348,7 +343,7 @@ function runFastHelp() {
348343
logInfo(' stop [--service <name>] Stop backgrounded eval services');
349344
logInfo(' logs [--service <name>] Tail logs from eval services');
350345
logInfo(' scout Start Scout server for evals');
351-
logInfo(' clear-index Delete kibana-evaluations indices (reset export)');
346+
logInfo(' clear-index Delete .evaluation-scores indices (reset export)');
352347
logInfo(' run [--suite <id>] [...] Run an eval suite');
353348
logInfo(' list [--refresh] [--json] List eval suites');
354349
logInfo(' labels [suite-id ...] Create/sync GitHub eval suite labels');

src/cli/serve/serve.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ function tryConfigureServerlessSamlProvider(rawConfig, opts, extraCliOptions) {
462462
// Ensure the plugin is loaded in dynamically to exclude from production build
463463
const {
464464
MOCK_IDP_REALM_NAME,
465+
MOCK_IDP_UIAM_OAUTH_BASE_URL,
465466
MOCK_IDP_UIAM_SERVICE_URL,
466467
MOCK_IDP_UIAM_SHARED_SECRET,
467468
MOCK_IDP_UIAM_ORGANIZATION_ID,
@@ -515,6 +516,14 @@ function tryConfigureServerlessSamlProvider(rawConfig, opts, extraCliOptions) {
515516
lodashSet(rawConfig, 'xpack.security.uiam.ssl.verificationMode', 'none');
516517
lodashSet(rawConfig, 'mockIdpPlugin.uiam.enabled', true);
517518

519+
// SAML POST binding submits the response cross-origin to UIAM's ACS endpoint, so the
520+
// enforced `form-action` directive (default `'self'`) needs to allow the UIAM origin.
521+
const uiamOAuthOrigin = new url.URL(MOCK_IDP_UIAM_OAUTH_BASE_URL).origin;
522+
const existingFormAction = _.get(rawConfig, 'csp.form_action', []);
523+
if (!existingFormAction.includes(uiamOAuthOrigin)) {
524+
lodashSet(rawConfig, 'csp.form_action', [...existingFormAction, uiamOAuthOrigin]);
525+
}
526+
518527
if (!_.has(rawConfig, 'xpack.security.uiam.url')) {
519528
lodashSet(rawConfig, 'xpack.security.uiam.url', MOCK_IDP_UIAM_SERVICE_URL);
520529
}

0 commit comments

Comments
 (0)