Skip to content

Commit

Permalink
Merge branch 'main' into change_navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Oct 1, 2024
2 parents 8d3ab8f + 3f90156 commit 14b14b1
Show file tree
Hide file tree
Showing 327 changed files with 13,451 additions and 5,130 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ x-pack/plugins/observability_solution/observability_onboarding/e2e @elastic/obs-
x-pack/plugins/observability_solution/observability_onboarding @elastic/obs-ux-logs-team @elastic/obs-ux-onboarding-team
x-pack/plugins/observability_solution/observability @elastic/obs-ux-management-team
x-pack/plugins/observability_solution/observability_shared @elastic/observability-ui
x-pack/packages/observability/synthetics_test_data @elastic/obs-ux-management-team
x-pack/packages/observability/observability_utils @elastic/observability-ui
x-pack/test/security_api_integration/plugins/oidc_provider @elastic/kibana-security
test/common/plugins/otel_metrics @elastic/obs-ux-infra_services-team
Expand Down
Binary file added docs/search/images/api-keys-search-bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/search/images/click-api-keys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/search/images/click-create-api-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/search/images/click-stack-management.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/search/images/cloud-id.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/search/images/manage-deployment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions docs/search/search-connection-details.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,72 @@
<titleabbrev>Connection details</titleabbrev>
++++

To connect to your {es} deployment, you need either a Cloud ID or an {es} endpoint, depending on the
deployment type you use. For secure connections, it’s recommended to use an API key for authentication.

* Learn how to <<find-cloud-id-cloud-self-managed, find your Cloud ID>> for Elastic Cloud or self-hosted deployments.
* Learn how to <<create-an-api-key-cloud-self-managed, create an API key>> for Elastic Cloud or self-hosted deployments.
* Learn how to <<find-cloud-id-serverless, find your {es} endpoint or Cloud ID>> for a serverless deployment.
* Learn how to <<create-an-api-key-serverless, create an API key>> for a serverless deployment.

[float]
=== Elastic Cloud and self-hosted deployments

[float]
[[find-cloud-id-cloud-self-managed]]
==== Find your Cloud ID

. Navigate to the Elastic Cloud home page.
. In the main menu, click *Manage this deployment*.
+
[.screenshot]
image::manage-deployment.png[width=750]
. The Cloud ID is displayed on the right side of the page.
+
[.screenshot]
image::cloud-id.png[width=750]

[float]
[[create-an-api-key-cloud-self-managed]]
==== Create an API key

. To navigate to *API keys*, use the <<kibana-navigation-search,*global search bar*>>.
+
[.screenshot]
image::api-keys-search-bar.png[width=750]
. Click *Create API key*.
+
[.screenshot]
image::click-create-api-key.png[width=750]
. Enter the API key details, and click *Create API key*.
. Copy and securely store the API key, as it will not be shown again.

[float]
=== Serverless deployments

[float]
[[find-cloud-id-serverless]]
==== Find your Elasticsearch endpoint

. Navigate to the serverless project's home page.
. Scroll down to the *Copy your connection details* section, and copy the *Elasticsearch endpoint*.
+
[.screenshot]
image::serverless-connection-details.png[width=750]

[NOTE]
====
The *Cloud ID* is also displayed in the Copy your connection details section, which you can use with specific client libraries and connectors.
====

[float]
[[create-an-api-key-serverless]]
==== Create an API key

. Navigate to the serverless project's home page.
. Scroll down to the *Add an API Key* section, and click *New*.
+
[.screenshot]
image::serverless-create-an-api-key.png[width=750]
. Enter the API key details, and click *Create API key*.
. Copy and securely store the API key, as it will not be shown again.
2 changes: 1 addition & 1 deletion docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ responses to the client from the {kib} server, and specifies what value is used.
Header names and values to send on all responses to the client from the {kib} server. *Default: `{}`*

[[server-shutdownTimeout]] `server.shutdownTimeout`::
Sets the grace period for {kib} to attempt to resolve any ongoing HTTP requests after receiving a `SIGTERM`/`SIGINT` signal, and before shutting down. Any new HTTP requests received during this period are rejected with a `503` response. *Default: `30s`*
Sets the grace period for {kib} to attempt to resolve any ongoing HTTP requests after receiving a `SIGTERM`/`SIGINT` signal, and before shutting down. Any new HTTP requests received during this period are rejected, because the incoming socket is closed without further processing. *Default: `30s`*

[[server-host]] `server.host`::
This setting specifies the host of the
Expand Down
24 changes: 11 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@
"@formatjs/ts-transformer": "^3.13.14",
"@google/generative-ai": "^0.7.0",
"@grpc/grpc-js": "^1.8.22",
"@hapi/accept": "^5.0.2",
"@hapi/boom": "^9.1.4",
"@hapi/cookie": "^11.0.2",
"@hapi/h2o2": "^9.1.0",
"@hapi/hapi": "^20.2.2",
"@hapi/hoek": "^9.2.1",
"@hapi/inert": "^6.0.4",
"@hapi/wreck": "^17.1.0",
"@hapi/accept": "^6.0.3",
"@hapi/boom": "^10.0.1",
"@hapi/cookie": "^12.0.1",
"@hapi/h2o2": "^10.0.4",
"@hapi/hapi": "^21.3.10",
"@hapi/hoek": "^11.0.4",
"@hapi/inert": "^7.1.0",
"@hapi/wreck": "^18.1.0",
"@hello-pangea/dnd": "16.6.0",
"@kbn/aad-fixtures-plugin": "link:x-pack/test/alerting_api_integration/common/plugins/aad",
"@kbn/ace": "link:packages/kbn-ace",
Expand Down Expand Up @@ -689,6 +689,7 @@
"@kbn/observability-onboarding-plugin": "link:x-pack/plugins/observability_solution/observability_onboarding",
"@kbn/observability-plugin": "link:x-pack/plugins/observability_solution/observability",
"@kbn/observability-shared-plugin": "link:x-pack/plugins/observability_solution/observability_shared",
"@kbn/observability-synthetics-test-data": "link:x-pack/packages/observability/synthetics_test_data",
"@kbn/observability-utils": "link:x-pack/packages/observability/observability_utils",
"@kbn/oidc-provider-plugin": "link:x-pack/test/security_api_integration/plugins/oidc_provider",
"@kbn/open-telemetry-instrumented-plugin": "link:test/common/plugins/otel_metrics",
Expand Down Expand Up @@ -1057,7 +1058,7 @@
"blurhash": "^2.0.1",
"borc": "3.0.0",
"brace": "0.11.1",
"brok": "^5.0.2",
"brok": "^6.0.0",
"byte-size": "^8.1.0",
"cacheable-lookup": "6",
"camelcase-keys": "7.0.2",
Expand Down Expand Up @@ -1552,10 +1553,7 @@
"@types/geojson": "^7946.0.10",
"@types/getos": "^3.0.0",
"@types/gulp": "^4.0.6",
"@types/hapi__cookie": "^10.1.3",
"@types/hapi__h2o2": "^8.3.3",
"@types/hapi__hapi": "^20.0.9",
"@types/hapi__inert": "^5.2.3",
"@types/hapi__cookie": "^12.0.5",
"@types/has-ansi": "^3.0.0",
"@types/he": "^1.1.1",
"@types/history": "^4.7.9",
Expand Down
22 changes: 14 additions & 8 deletions packages/core/http/core-http-router-server-internal/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,18 +270,24 @@ export class Router<Context extends RequestHandlerContextBase = RequestHandlerCo
}: {
request: Request;
responseToolkit: ResponseToolkit;
handler: RequestHandlerEnhanced<P, Q, B, typeof request.method>;
handler: RequestHandlerEnhanced<
P,
Q,
B,
// request.method's type contains way more verbs than we currently support
typeof request.method extends RouteMethod ? typeof request.method : any
>;
routeSchemas?: RouteValidator<P, Q, B>;
}) {
let kibanaRequest: KibanaRequest<P, Q, B, typeof request.method>;
let kibanaRequest: KibanaRequest<
P,
Q,
B,
typeof request.method extends RouteMethod ? typeof request.method : any
>;
const hapiResponseAdapter = new HapiResponseAdapter(responseToolkit);
try {
kibanaRequest = CoreKibanaRequest.from(request, routeSchemas) as KibanaRequest<
P,
Q,
B,
typeof request.method
>;
kibanaRequest = CoreKibanaRequest.from(request, routeSchemas);
} catch (error) {
this.logError('400 Bad Request', 400, { request, error });
return hapiResponseAdapter.toBadRequest(error.message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ export async function createCookieSessionStorageFactory<T extends object>(
}
},
},
validateFunc: async (req: Request, session: T | T[]) => {
validate: async (req: Request, session: T | T[]) => {
const result = cookieOptions.validate(session);
if (!result.isValid) {
clearInvalidCookie(req, result.path);
}
return { valid: result.isValid };
return { isValid: result.isValid };
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { createServer, getServerOptions, setTlsConfig, getRequestId } from '@kbn
import type { Duration } from 'moment';
import { Observable, Subscription, firstValueFrom, pairwise, take } from 'rxjs';
import apm from 'elastic-apm-node';
// @ts-expect-error no type definition
import Brok from 'brok';
import type { Logger, LoggerFactory } from '@kbn/logging';
import type { InternalExecutionContextSetup } from '@kbn/core-execution-context-server-internal';
Expand Down Expand Up @@ -722,7 +721,6 @@ export class HttpServer {
// validation applied in ./http_tools#getServerOptions
// (All NP routes are already required to specify their own validation in order to access the payload)
validate,
// @ts-expect-error Types are outdated and doesn't allow `payload.multipart` to be `true`
payload: [allow, override, maxBytes, output, parse, timeout?.payload].some(
(x) => x !== undefined
)
Expand Down
2 changes: 1 addition & 1 deletion packages/deeplinks/security/deep_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ export enum SecurityPageName {
entityAnalyticsManagement = 'entity_analytics-management',
entityAnalyticsAssetClassification = 'entity_analytics-asset-classification',
coverageOverview = 'coverage-overview',
notesManagement = 'notes-management',
notes = 'notes',
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import * as rt from 'io-ts';
import { Either } from 'fp-ts/lib/Either';
import { AlertSchema } from './alert_schema';
import { EcsSchema } from './ecs_schema';
import { LegacyAlertSchema } from './legacy_alert_schema';
const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/;
export const IsoDateString = new rt.Type<string, string, unknown>(
Expand Down Expand Up @@ -88,6 +89,6 @@ const ObservabilitySloAlertOptional = rt.partial({
});

// prettier-ignore
export const ObservabilitySloAlertSchema = rt.intersection([ObservabilitySloAlertRequired, ObservabilitySloAlertOptional, AlertSchema, LegacyAlertSchema]);
export const ObservabilitySloAlertSchema = rt.intersection([ObservabilitySloAlertRequired, ObservabilitySloAlertOptional, AlertSchema, EcsSchema, LegacyAlertSchema]);
// prettier-ignore
export type ObservabilitySloAlert = rt.TypeOf<typeof ObservabilitySloAlertSchema>;
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,15 @@ const ObservabilityUptimeAlertOptional = rt.partial({
value: schemaStringArray,
})
),
'location.id': schemaString,
'location.name': schemaString,
'location.id': schemaStringArray,
'location.name': schemaStringArray,
'monitor.id': schemaString,
'monitor.name': schemaString,
'monitor.state.id': schemaString,
'monitor.tags': schemaStringArray,
'monitor.type': schemaString,
'observer.geo.name': schemaString,
'observer.geo.name': schemaStringArray,
'observer.name': schemaStringArray,
'tls.server.hash.sha256': schemaString,
'tls.server.x509.issuer.common_name': schemaString,
'tls.server.x509.not_after': schemaDate,
Expand Down
Loading

0 comments on commit 14b14b1

Please sign in to comment.