Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit bdb4966
Author: Angela Chuang <[email protected]>
Date:   Mon May 23 13:13:23 2022 +0100

    styling (elastic#132539)

    Co-authored-by: Kibana Machine <[email protected]>

commit a807c90
Author: Esteban Beltran <[email protected]>
Date:   Mon May 23 13:36:00 2022 +0200

    [Cases] Add a key to userActionMarkdown to prevent stale state (elastic#132681)

commit ba84602
Author: Tomasz Ciecierski <[email protected]>
Date:   Mon May 23 13:33:20 2022 +0200

    [Osquery] Change prebuilt saved queries to include prebuilt flag (elastic#132651)

commit 6b846af
Author: Faisal Kanout <[email protected]>
Date:   Mon May 23 14:11:04 2022 +0300

    [Actionable Observability] Update the Rule details design and clean up (elastic#132616)

    * Add rule status in the rule summary

    * Match design

    * Remove unused imports

    * code review

commit c993ff2
Author: Byron Hulcher <[email protected]>
Date:   Mon May 23 06:25:17 2022 -0400

    [Workplace Search] Add categories to source data for internal connectors (elastic#132671)

commit b59fb97
Author: Pablo Machado <[email protected]>
Date:   Mon May 23 12:02:43 2022 +0200

    [Security Solution] Update use_url_state to work with new side nav (elastic#132518)

    * Fix landing pages browser tab title

    * Fix new navigation url state

    * Fix unit tests

    Co-authored-by: Kibana Machine <[email protected]>

commit 693b3e8
Author: Tomasz Ciecierski <[email protected]>
Date:   Mon May 23 11:54:29 2022 +0200

    [Osquery] Add Osquery to Alert context menu (elastic#131790)

commit 2cddced
Author: Jordan <[email protected]>
Date:   Mon May 23 12:50:55 2022 +0300

    [Cloud Posture] Trendline query changes (elastic#132680)

commit 7591fb6
Author: Giorgos Bamparopoulos <[email protected]>
Date:   Mon May 23 10:37:03 2022 +0100

    Fix agent config indicator when applied through fleet integration (elastic#131820)

    * Fix agent config indicator when applied through fleet integration

    * Add synthrace scenario

    Co-authored-by: Kibana Machine <[email protected]>

commit 37d40d7
Author: Dominique Clarke <[email protected]>
Date:   Mon May 23 04:56:34 2022 -0400

    [Synthetics] fix browser type as default in monitor management (elastic#132572)

    Co-authored-by: Kibana Machine <[email protected]>

commit ae8b6c8
Author: Lucas F. da Costa <[email protected]>
Date:   Mon May 23 09:29:11 2022 +0100

    [Uptime] Fix bug causing all monitors to be saved to all locations [solves elastic#132314] (elastic#132325)

    Co-authored-by: Kibana Machine <[email protected]>

commit e0944d1
Author: Nodir Latipov <[email protected]>
Date:   Mon May 23 13:27:24 2022 +0500

    [Unified search] Use the DataViews service (elastic#130008)

    * feat: cleanup deprecated service and type

    * fix: rollback test

    * refact: replace deprecated type

    * refact: changed deprecation type

    * feat: added comments to deprecated imports that can't be cleaned up in this PR

    * refact: rollback query_string_input.test file

commit a3646eb
Author: Pablo Machado <[email protected]>
Date:   Mon May 23 10:17:12 2022 +0200

    [Security Solutions] Refactor breadcrumbs to support new menu structure (elastic#131624)

    * Refactor breadcrumbs to support new structure

    * Fix code style

    * Fix more code style

    * Fix unit test

    Co-authored-by: Kibana Machine <[email protected]>

commit 9649307
Author: István Zoltán Szabó <[email protected]>
Date:   Mon May 23 10:12:54 2022 +0200

    [DOCS] Updates alerting authorization docs with info on retaining API keys (elastic#132402)

    Co-authored-by: Lisa Cawley <[email protected]>

commit 40df1f3
Author: Tomasz Ciecierski <[email protected]>
Date:   Mon May 23 08:45:50 2022 +0200

    [Osquery] Add labels, move osquery schema link (elastic#132584)

commit fbaf058
Author: Jiawei Wu <[email protected]>
Date:   Sun May 22 17:14:23 2022 -0700

    [RAM] Add shareable rules list (elastic#132437)

    * Shareable rules list

    * Hide snooze panel in rules list

    * Address comments and added tests

    * Fix tests

    * Fix tests

    * Fix lint

    * Address design comments and fix tests

    Co-authored-by: Kibana Machine <[email protected]>

commit 383239e
Author: Kfir Peled <[email protected]>
Date:   Sun May 22 13:18:42 2022 +0300

    [Cloud Posture] Findings - Group by resource - Fixed bug not showing results (elastic#132529)

commit fb1eeb0
Author: Georgii Gorbachev <[email protected]>
Date:   Sat May 21 00:21:53 2022 +0200

    [Security Solution][Detections] Add new fields to the rule model: Related Integrations, Required Fields, and Setup (elastic#132409)

    **Addresses partially:** elastic/security-team#2083, elastic/security-team#558, elastic/security-team#2856, elastic/security-team#1801 (internal tickets)

    ## Summary

    **TL;DR:** With this PR, it's now possible to specify `related_integrations`, `required_fields`, and `setup` fields in prebuilt rules in https://github.com/elastic/detection-rules. They are returned within rules in the API responses.

    This PR:

    - Adds 3 new fields to the model of Security detection rules. These fields are common to all of the rule types we have.
      - **Related Integrations**. It's a list of Fleet integrations associated with a given rule. It's assumed that if the user installs them, the rule might start to work properly because it will start receiving source events potentially matching the rule's query.
      - **Required Fields**. It's a list of event fields that must be present in the source indices of a given rule.
      - **Setup Guide**. It's any instructions for the user for setting up their environment in order to start receiving source events for a given rule. It's a text. Markdown is supported. It's similar to the Investigation Guide that we show on the Details page.
    - Adjusts API endpoints accordingly:
      - These fields are for prebuilt rules only and are supposed to be read-only in the UI.
      - Specifying these fields in the request parameters of the create/update/patch rule API endpoints is not supported.
      - These fields are returned in all responses that contain rules. If they are missing in a rule, default values are returned (empty array, empty string).
      - When duplicating a prebuilt rule, these fields are being reset to their default value (empty array, empty string).
      - Export/Import is supported. Edge case / supported hack: it's possible to specify these fields manually in a ndjson doc and import with a rule.
      - The fields are being copied to `kibana.alert.rule.parameters` field of an alert document, which is mapped as a flattened field type. No special handling for the new fields was needed there.
    - Adjusts tests accordingly.

    ## Related Integrations

    Example (part of a rule returned from the API):

    ```json
    {
      "related_integrations": [
        {
          "package": "windows",
          "version": "1.5.x"
        },
        {
          "package": "azure",
          "integration": "activitylogs",
          "version": "~1.1.6"
        }
      ],
    }
    ```

    Schema:

    ```ts
    /**
     * Related integration is a potential dependency of a rule. It's assumed that if the user installs
     * one of the related integrations of a rule, the rule might start to work properly because it will
     * have source events (generated by this integration) potentially matching the rule's query.
     *
     *   NOTE: Proper work is not guaranteed, because a related integration, if installed, can be
     *   configured differently or generate data that is not necessarily relevant for this rule.
     *
     * Related integration is a combination of a Fleet package and (optionally) one of the
     * package's "integrations" that this package contains. It is represented by 3 properties:
     *
     *   - `package`: name of the package (required, unique id)
     *   - `version`: version of the package (required, semver-compatible)
     *   - `integration`: name of the integration of this package (optional, id within the package)
     *
     * There are Fleet packages like `windows` that contain only one integration; in this case,
     * `integration` should be unspecified. There are also packages like `aws` and `azure` that contain
     * several integrations; in this case, `integration` should be specified.
     *
     * @example
     * const x: RelatedIntegration = {
     *   package: 'windows',
     *   version: '1.5.x',
     * };
     *
     * @example
     * const x: RelatedIntegration = {
     *   package: 'azure',
     *   version: '~1.1.6',
     *   integration: 'activitylogs',
     * };
     */
    export type RelatedIntegration = t.TypeOf<typeof RelatedIntegration>;
    export const RelatedIntegration = t.exact(
      t.intersection([
        t.type({
          package: NonEmptyString,
          version: NonEmptyString,
        }),
        t.partial({
          integration: NonEmptyString,
        }),
      ])
    );
    ```

    ## Required Fields

    Example (part of a rule returned from the API):

    ```json
    {
      "required_fields": [
        {
          "name": "event.action",
          "type": "keyword",
          "ecs": true
        },
        {
          "name": "event.code",
          "type": "keyword",
          "ecs": true
        },
        {
          "name": "winlog.event_data.AttributeLDAPDisplayName",
          "type": "keyword",
          "ecs": false
        }
      ],
    }
    ```

    Schema:

    ```ts
    /**
     * Almost all types of Security rules check source event documents for a match to some kind of
     * query or filter. If a document has certain field with certain values, then it's a match and
     * the rule will generate an alert.
     *
     * Required field is an event field that must be present in the source indices of a given rule.
     *
     * @example
     * const standardEcsField: RequiredField = {
     *   name: 'event.action',
     *   type: 'keyword',
     *   ecs: true,
     * };
     *
     * @example
     * const nonEcsField: RequiredField = {
     *   name: 'winlog.event_data.AttributeLDAPDisplayName',
     *   type: 'keyword',
     *   ecs: false,
     * };
     */
    export type RequiredField = t.TypeOf<typeof RequiredField>;
    export const RequiredField = t.exact(
      t.type({
        name: NonEmptyString,
        type: NonEmptyString,
        ecs: t.boolean,
      })
    );
    ```

    ## Setup Guide

    Example (part of a rule returned from the API):

    ```json
    {
      "setup": "## Config\n\nThe 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration > \nAdministrative Templates > \nWindows PowerShell > \nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```\n",
    }
    ```

    Schema:

    ```ts
    /**
     * Any instructions for the user for setting up their environment in order to start receiving
     * source events for a given rule.
     *
     * It's a multiline text. Markdown is supported.
     */
    export type SetupGuide = t.TypeOf<typeof SetupGuide>;
    export const SetupGuide = t.string;
    ```

    ## Details on the schema

    This PR adjusts all the 6 rule schemas we have:

    1. Alerting Framework rule `params` schema:
        - `security_solution/server/lib/detection_engine/schemas/rule_schemas.ts`
        - `security_solution/server/lib/detection_engine/schemas/rule_converters.ts`
    2. HTTP API main old schema:
        - `security_solution/common/detection_engine/schemas/response/rules_schema.ts`
    3. HTTP API main new schema:
        - `security_solution/common/detection_engine/schemas/request/rule_schemas.ts`
    4. Prebuilt rule schema:
        - `security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_schema.ts`
    5. Import rule schema:
        - `security_solution/common/detection_engine/schemas/request/import_rules_schema.ts`
    6. Rule schema used on the frontend side:
        - `security_solution/public/detections/containers/detection_engine/rules/types.ts`

    Names of the fields on the HTTP API level:

    - `related_integrations`
    - `required_fields`
    - `setup`

    Names of the fields on the Alerting Framework level:

    - `params.relatedIntegrations`
    - `params.requiredFields`
    - `params.setup`

    ## Next steps

    - Create a new endpoint for returning installed Fleet integrations (gonna be a separate PR).
    - Rebase elastic#131475 on top of this PR after merge.
    - Cover the new fields with dedicated tests (gonna be a separate PR).
    - Update API docs (gonna be a separate PR).
    - Address the tech debt of having 6 different schemas (gonna create a ticket for that).

    ### Checklist

    - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
    - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

commit 788dd2e
Author: Andrew Goldstein <[email protected]>
Date:   Fri May 20 16:02:05 2022 -0600

    [Security Solution] Fixes sorting and tooltips on columns for non-ECS fields that are only one level deep (elastic#132570)

    ## [Security Solution] Fixes sorting and tooltips on columns for non-ECS fields that are only one level deep

    This PR fixes <elastic#132490>, an issue where Timeline columns for non-ECS fields that are only one level deep couldn't be sorted, and displayed incomplete metadata in the column's tooltip.

    ### Before

    ![test_field_1_actual_tooltip](https://user-images.githubusercontent.com/4459398/169208299-51d9296a-15e1-4eb0-bc31-a0df6a63f0c5.png)

    _Before: The column is **not** sortable, and the tooltip displays incomplete metadata_

    ### After

    ![after](https://user-images.githubusercontent.com/4459398/169414767-7274a795-015f-4805-8c3f-b233ead994ea.png)

    _After: The column is sortable, and the tooltip displays the expected metadata_

    ### Desk testing

    See the _Steps to reproduce_ section of <elastic#132490> for testing details.

commit 51ae020
Author: Constance <[email protected]>
Date:   Fri May 20 14:30:36 2022 -0700

    Upgrade EUI to v55.1.3 (elastic#132451)

    * Upgrade EUI to 55.1.3 backport

    * [Deprecation] Remove `watchedItemProps` from EuiContextMenu usage - should no longer be necessary

    * Update snapshots with new data-popover attr

    * Fix failing FTR test

    - Now that EuiContextMenu focus is restored correctly, there is a tooltip around the popover toggle that's blocking an above item that the test wants to click

    - swapping the order so that the tooltip does not block the clicked item should work

    * Fix 2nd maps FTR test with blocking tooltip

    Co-authored-by: Kibana Machine <[email protected]>

commit 642290b
Author: Nathan Reese <[email protected]>
Date:   Fri May 20 15:11:15 2022 -0600

    [maps] convert ESPewPewSource to typescript (elastic#132656)

    * [maps] convert ESPewPewSource to typescript

    * move @ts-expect-error moved by fix

commit eb6a061
Author: Brian Seeders <[email protected]>
Date:   Fri May 20 16:57:49 2022 -0400

    [docs] Add 'yarn dev-docs' for managing and starting dev docs (elastic#132647)

commit e0ea600
Author: Hannah Mudge <[email protected]>
Date:   Fri May 20 14:55:31 2022 -0600

    Add group 6 to FTR config (elastic#132655)

commit 41635e2
Author: Karl Godard <[email protected]>
Date:   Fri May 20 13:35:30 2022 -0700

    fixed search highlighting. was only showing highlighted text w/o context (elastic#132650)

    Co-authored-by: mitodrummer <[email protected]>

commit 791ebfa
Author: debadair <[email protected]>
Date:   Fri May 20 13:34:04 2022 -0700

    [DOCS] Remove obsolete license expiration info (elastic#131474)

    * [DOCS] Remove obsolete license expiration info

    As of elastic/elasticsearch#79671, Elasticsearch does a more stringent license check
    rather than operating in a semi-degraded mode.

    Closes elastic#127845
    Closes elastic#125702

    * Update docs/management/managing-licenses.asciidoc

    Co-authored-by: Kibana Machine <[email protected]>

commit e55bf40
Author: Nathan Reese <[email protected]>
Date:   Fri May 20 14:15:00 2022 -0600

    [Maps] create MVT_VECTOR when using choropleth wizard (elastic#132648)

commit 46cd729
Author: Jan Monschke <[email protected]>
Date:   Fri May 20 22:02:00 2022 +0200

    [SecuritySolution] Disable agent status filters and timeline interaction (elastic#132586)

    * fix: disable drag-ability and hover actions for agent statuses

    The agent fields cannot be queried with ECS and therefore should not provide Filter In/Out functionality nor should users be able to add their representative fields to timeline investigations. Therefore users should not be able to add them to a timeline query by dragging them.

    * chore: make code more readable

commit e857b30
Author: Vadim Kibana <[email protected]>
Date:   Fri May 20 20:36:59 2022 +0200

    remove human-readable automatic slug generation (elastic#132593)

    * remove human-readable automatic slug generation

    * make change non-breaking

    * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

    * remove test

    Co-authored-by: streamich <[email protected]>
    Co-authored-by: kibanamachine <[email protected]>

commit 6fc2fff
Author: Lisa Cawley <[email protected]>
Date:   Fri May 20 10:48:15 2022 -0700

    [ML] Minor edits in prebuilt job descriptions (elastic#132633)

commit ecca231
Author: Felix Stürmer <[email protected]>
Date:   Fri May 20 19:37:03 2022 +0200

    [Stack Monitoring] Convert setup routes to TypeScript (elastic#131265)

commit 065ea3e
Author: Byron Hulcher <[email protected]>
Date:   Fri May 20 13:12:49 2022 -0400

    [Workplace Search] Remove Custom API Source Integration tile (elastic#132538)

commit 583d2b7
Author: Byron Hulcher <[email protected]>
Date:   Fri May 20 13:12:32 2022 -0400

    [Workplace Search] Add documentation links for v8.3.0 connectors (elastic#132547)

commit c244883
Author: Nathan Reese <[email protected]>
Date:   Fri May 20 10:35:00 2022 -0600

    [maps] show marker size in legend (elastic#132549)

    * [Maps] size legend

    * clean-up

    * refine spacing

    * clean up

    * more cleanup

    * use euiTheme for colors

    * fix jest test

    * do not show marker sizes for icons

    * remove lodash

    Co-authored-by: Kibana Machine <[email protected]>

commit d70ae0f
Author: Quynh Nguyen <[email protected]>
Date:   Fri May 20 11:34:35 2022 -0500

    [ILM] Add warnings for managed system policies  (elastic#132269)

    * Add warnings to system/managed policies

    * Fix translations, policies

    * Add jest tests

    * Add jest tests to assert new toggle behavior

    * Add jest tests for edit policy callout

    * Fix snapshot

    * [ML] Update jest tests with helper, rename helper for clarity

    * [ML] Add hook for local storage to remember toggle setting

    * [ML] Fix naming

    Co-authored-by: Kibana Machine <[email protected]>

commit f70b4af
Author: Nicolas Chaulet <[email protected]>
Date:   Fri May 20 12:22:08 2022 -0400

    [Fleet] Fix rolling upgrade CANCEL and UI fixes (elastic#132625)

commit d9f141a
Author: Kevin Logan <[email protected]>
Date:   Fri May 20 11:37:35 2022 -0400

    [Security Solution] Telemetry for Event Filters counts on both user and global entries (elastic#132542)

commit 1b4ac7d
Author: Yaroslav Kuznietsov <[email protected]>
Date:   Fri May 20 17:54:13 2022 +0300

    [XY] Reference lines overlay fix. (elastic#132607)

commit 759f13f
Author: Nicolas Chaulet <[email protected]>
Date:   Fri May 20 10:39:09 2022 -0400

    [Fleet] Remove reference to non removable package feature (elastic#132458)

commit 7e15097
Author: Lisa Cawley <[email protected]>
Date:   Fri May 20 07:32:27 2022 -0700

    [ML] Adds placeholder text for testing NLP models (elastic#132486)

commit bc31053
Author: Dmitry Tomashevich <[email protected]>
Date:   Fri May 20 17:09:20 2022 +0300

    [Discover][Alerting] Implement editing of dataView, query & filters (elastic#131688)

    * [Discover] introduce params editing using unified search

    * [Discover] fix unit tests

    * [Discover] fix functional tests

    * [Discover] fix unit tests

    * [Discover] return test subject name

    * [Discover] fix alert functional test

    * Update x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/search_source_expression_form.tsx

    Co-authored-by: Julia Rechkunova <[email protected]>

    * Update x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/search_source_expression_form.tsx

    Co-authored-by: Matthias Wilhelm <[email protected]>

    * [Discover] hide filter panel options

    * [Discover] improve functional test

    * [Discover] apply suggestions

    * [Discover] change data view selector

    * [Discover] fix tests

    * [Discover] apply suggestions, fix lang mode toggler

    * [Discover] mote interface to types file, clean up diff

    * [Discover] fix saved query issue

    * Update x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.ts

    Co-authored-by: Matthias Wilhelm <[email protected]>

    * [Discover] remove zIndex

    * [Discover] omit null searchType from esQuery completely, add isEsQueryAlert check for useSavedObjectReferences hook

    * [Discover] set searchType to esQuery when needed

    * [Discover] fix unit tests

    * Update x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type_params.ts

    Co-authored-by: Matthias Wilhelm <[email protected]>

    * Update x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.ts

    Co-authored-by: Matthias Wilhelm <[email protected]>

    Co-authored-by: Julia Rechkunova <[email protected]>
    Co-authored-by: Matthias Wilhelm <[email protected]>

commit d344088
Author: Nathan Reese <[email protected]>
Date:   Fri May 20 08:06:25 2022 -0600

    [maps] Use label features from ES vector tile search API to fix multiple labels (elastic#132080)

    * [maps] mvt labels

    * eslint

    * only request labels when needed

    * update vector tile integration tests for hasLabels parameter

    * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

    * fix tests

    * fix test

    * only add _mvt_label_position filter when vector tiles are from ES vector tile search API

    * review feedback

    * include hasLabels in source data

    * fix jest test

    Co-authored-by: Kibana Machine <[email protected]>

commit 1d8bc7e
Author: Shivindera Singh <[email protected]>
Date:   Fri May 20 15:53:00 2022 +0200

    hasData service - hit search api in case of an error with resolve api (elastic#132618)

commit 7c37eda
Author: Tomasz Ciecierski <[email protected]>
Date:   Fri May 20 15:42:28 2022 +0200

    [Osquery] Fix pagination issue on Alert's Osquery Flyout (elastic#132611)

commit 2e51140
Author: Katerina Patticha <[email protected]>
Date:   Fri May 20 15:34:29 2022 +0200

    Show service group icon only when there are service groups (elastic#131138)

    * Show service group icon when there are service groups

    * Fix fix errors

    * Remove additional request and display  icon only for the service groups

    * Revert "Remove additional request and display  icon only for the service groups"

    This reverts commit 7ff2bc9.

    * Add dependencies

    Co-authored-by: Kibana Machine <[email protected]>

commit 24cbb32
Author: Yaroslav Kuznietsov <[email protected]>
Date:   Fri May 20 16:27:14 2022 +0300

    [XY] `pointsRadius`, `showPoints` and `lineWidth`. (elastic#130391)

    * Added pointsRadius, showPoints and lineWidth.

    * Added tests.

    Co-authored-by: Kibana Machine <[email protected]>

commit 1c2eb9f
Author: Sergi Massaneda <[email protected]>
Date:   Fri May 20 13:59:56 2022 +0100

    [Security Solution] New Side nav integrating links config  (elastic#132210)

    * Update navigation landing pages to use appLinks config

    * align app links changes

    * link configs refactor to use updater$

    * navigation panel categories

    * test and type fixes

    * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

    * types changes

    * shared style change moved to a separate PR

    * use old deep links

    * minor changes after ux meeting

    * add links filtering

    * remove duplicated categories

    * temporary increase of plugin size limit

    * swap management links order

    * improve performance closing nav panel

    * test updated

    * host isolation page filterd and some improvements

    * remove async from plugin start

    * move links register from start to mount

    * restore size limits

    * Fix use_show_timeline unit tests

    Co-authored-by: Pablo Neves Machado <[email protected]>
    Co-authored-by: kibanamachine <[email protected]>

commit 92ac7f9
Author: Katrin Freihofner <[email protected]>
Date:   Fri May 20 13:51:51 2022 +0200

    adds small styling updates to header panels (elastic#132596)
  • Loading branch information
klacabane committed May 23, 2022
1 parent 49a4c8f commit 3f9cba4
Show file tree
Hide file tree
Showing 452 changed files with 11,254 additions and 4,872 deletions.
1 change: 1 addition & 0 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ enabled:
- test/functional/apps/dashboard/group3/config.ts
- test/functional/apps/dashboard/group4/config.ts
- test/functional/apps/dashboard/group5/config.ts
- test/functional/apps/dashboard/group6/config.ts
- test/functional/apps/discover/config.ts
- test/functional/apps/getting_started/config.ts
- test/functional/apps/home/config.ts
Expand Down
192 changes: 22 additions & 170 deletions docs/management/managing-licenses.asciidoc
Original file line number Diff line number Diff line change
@@ -1,191 +1,43 @@
[[managing-licenses]]
== License Management

When you install the default distribution of {kib}, you receive free features
with no expiration date. For the full list of features, refer to
{subscriptions}.
By default, new installations have a Basic license that never expires.
For the full list of features available at the Free and Open Basic subscription level,
refer to {subscriptions}.

If you want to try out the full set of features, you can activate a free 30-day
trial. To view the status of your license, start a trial, or install a new
license, open the main menu, then click *Stack Management > License Management*.

NOTE: You can start a trial only if your cluster has not already activated a
trial license for the current major product version. For example, if you have
already activated a trial for 6.0, you cannot start a new trial until
7.0. You can, however, request an extended trial at {extendtrial}.

When you activate a new license level, new features appear in *Stack Management*.

[role="screenshot"]
image::images/management-license.png[]
To explore all of the available solutions and features, start a 30-day free trial.
You can activate a trial subscription once per major product version.
If you need more than 30 days to complete your evaluation,
request an extended trial at {extendtrial}.

At the end of the trial period, some features operate in a
<<license-expiration,degraded mode>>. You can revert to Basic, extend the trial,
or purchase a subscription.

TIP: If {security-features} are enabled, unless you have a trial license,
you must configure Transport Layer Security (TLS) in {es}.
See {ref}/encrypting-communications.html[Encrypting communications].
{kib} and the {ref}/start-basic.html[start basic API] provide a list of all of
the features that will no longer be supported if you revert to a basic license.
To view the status of your license, start a trial, or install a new
license, open the main menu, then click *Stack Management > License Management*.

[float]
[discrete]
=== Required permissions

The `manage` cluster privilege is required to access *License Management*.

To add the privilege, open the main menu, then click *Stack Management > Roles*.

[discrete]
[[update-license]]
=== Update your license

You can update your license at runtime without shutting down your {es} nodes.
License updates take effect immediately. The license is provided as a _JSON_
file that you install in {kib} or by using the
{ref}/update-license.html[update license API].

TIP: If you are using a basic or trial license, {security-features} are disabled
by default. In all other licenses, {security-features} are enabled by default;
you must secure the {stack} or disable the {security-features}.

[discrete]
[[license-expiration]]
=== License expiration

Your license is time based and expires at a future date. If you're using
{monitor-features} and your license will expire within 30 days, a license
expiration warning is displayed prominently. Warnings are also displayed on
startup and written to the {es} log starting 30 days from the expiration date.
These error messages tell you when the license expires and what features will be
disabled if you do not update the license.

IMPORTANT: You should update your license as soon as possible. You are
essentially flying blind when running with an expired license. Access to the
cluster health and stats APIs is critical for monitoring and managing an {es}
cluster.

[discrete]
[[expiration-beats]]
==== Beats

* Beats will continue to poll centrally-managed configuration.

[discrete]
[[expiration-elasticsearch]]
==== {es}

// Upgrade API is disabled
* The deprecation API is disabled.
* SQL support is disabled.
* Aggregations provided by the analytics plugin are no longer usable.
* All searchable snapshots indices are unassigned and cannot be searched.

[discrete]
[[expiration-watcher]]
==== {stack} {alert-features}

* The PUT and GET watch APIs are disabled. The DELETE watch API continues to work.
* Watches execute and write to the history.
* The actions of the watches do not execute.

[discrete]
[[expiration-graph]]
==== {stack} {graph-features}

* Graph explore APIs are disabled.

[discrete]
[[expiration-ml]]
==== {stack} {ml-features}
Licenses are valid for a specific time period.
30 days before the license expiration date, {es} starts logging expiration warnings.
If monitoring is enabled, expiration warnings are displayed prominently in {kib}.

* APIs to create {anomaly-jobs}, open jobs, send data to jobs, create {dfeeds},
and start {dfeeds} are disabled.
* All started {dfeeds} are stopped.
* All open {anomaly-jobs} are closed.
* APIs to create and start {dfanalytics-jobs} are disabled.
* Existing {anomaly-job} and {dfanalytics-job} results continue to be available
by using {kib} or APIs.
If your license expires, your subscription level reverts to Basic and
you will no longer be able to use https://www.elastic.co/subscriptions[Platinum or Enterprise features].

[discrete]
[[expiration-monitoring]]
==== {stack} {monitor-features}

* The agent stops collecting cluster and indices metrics.
* The agent stops automatically cleaning indices older than
`xpack.monitoring.history.duration`.

[discrete]
[[expiration-security]]
==== {stack} {security-features}

* Cluster health, cluster stats, and indices stats operations are blocked.
* All data operations (read and write) continue to work.

Once the license expires, calls to the cluster health, cluster stats, and index
stats APIs fail with a `security_exception` and return a 403 HTTP status code.

[source,sh]
-----------------------------------------------------
{
"error": {
"root_cause": [
{
"type": "security_exception",
"reason": "current license is non-compliant for [security]",
"license.expired.feature": "security"
}
],
"type": "security_exception",
"reason": "current license is non-compliant for [security]",
"license.expired.feature": "security"
},
"status": 403
}
-----------------------------------------------------

This message enables automatic monitoring systems to easily detect the license
failure without immediately impacting other users.

[discrete]
[[expiration-logstash]]
==== {ls} pipeline management

* Cannot create new pipelines or edit or delete existing pipelines from the UI.
* Cannot list or view existing pipelines from the UI.
* Cannot run Logstash instances which are registered to listen to existing pipelines.
//TBD: * Logstash will continue to poll centrally-managed pipelines

[discrete]
[[expiration-kibana]]
==== {kib}

* Users can still log into {kib}.
* {kib} works for data exploration and visualization, but some features
are disabled.
* The license management UI is available to easily upgrade your license. See
<<update-license>> and <<managing-licenses>>.

[discrete]
[[expiration-reporting]]
==== {kib} {report-features}

* Reporting is no longer available in {kib}.
* Report generation URLs stop working.
* Existing reports are no longer accessible.

[discrete]
[[expiration-rollups]]
==== {rollups-cap}

* {rollup-jobs-cap} cannot be created or started.
* Existing {rollup-jobs} can be stopped and deleted.
* The get rollup caps and rollup search APIs continue to function.
[[update-license]]
=== Update your license

[discrete]
[[expiration-transforms]]
==== {transforms-cap}
Licenses are provided as a _JSON_ file and have an effective date and an expiration date.
You cannot install a new license before its effective date.
License updates take effect immediately and do not require restarting {es}.

* {transforms-cap} cannot be created, previewed, started, or updated.
* Existing {transforms} can be stopped and deleted.
* Existing {transform} results continue to be available.
You can update your license from *Stack Management > License Management* or through the
{ref}/update-license.html[update license API].
64 changes: 49 additions & 15 deletions docs/user/alerting/alerting-setup.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,47 @@
<titleabbrev>Set up</titleabbrev>
++++

Alerting is automatically enabled in {kib}, but might require some additional configuration.
Alerting is automatically enabled in {kib}, but might require some additional
configuration.

[float]
[[alerting-prerequisites]]
=== Prerequisites
If you are using an *on-premises* Elastic Stack deployment:

* In the kibana.yml configuration file, add the <<general-alert-action-settings,`xpack.encryptedSavedObjects.encryptionKey`>> setting.
* For emails to have a footer with a link back to {kib}, set the <<server-publicBaseUrl, `server.publicBaseUrl`>> configuration setting.
* In the kibana.yml configuration file, add the
<<general-alert-action-settings,`xpack.encryptedSavedObjects.encryptionKey`>>
setting.
* For emails to have a footer with a link back to {kib}, set the
<<server-publicBaseUrl, `server.publicBaseUrl`>> configuration setting.

If you are using an *on-premises* Elastic Stack deployment with <<using-kibana-with-security, *security*>>:
If you are using an *on-premises* Elastic Stack deployment with
<<using-kibana-with-security, *security*>>:

* If you are unable to access {kib} Alerting, ensure that you have not {ref}/security-settings.html#api-key-service-settings[explicitly disabled API keys].
* If you are unable to access {kib} Alerting, ensure that you have not
{ref}/security-settings.html#api-key-service-settings[explicitly disabled API keys].

The alerting framework uses queries that require the `search.allow_expensive_queries` setting to be `true`. See the scripts {ref}/query-dsl-script-query.html#_allow_expensive_queries_4[documentation].
The alerting framework uses queries that require the
`search.allow_expensive_queries` setting to be `true`. See the scripts
{ref}/query-dsl-script-query.html#_allow_expensive_queries_4[documentation].

[float]
[[alerting-setup-production]]
=== Production considerations and scaling guidance

When relying on alerting and actions as mission critical services, make sure you follow the <<alerting-production-considerations,Alerting production considerations>>.
When relying on alerting and actions as mission critical services, make sure you
follow the
<<alerting-production-considerations,Alerting production considerations>>.

See <<alerting-scaling-guidance>> for more information on the scalability of Alerting.
See <<alerting-scaling-guidance>> for more information on the scalability of
Alerting.

[float]
[[alerting-security]]
=== Security

To access alerting in a space, a user must have access to one of the following features:
To access alerting in a space, a user must have access to one of the following
features:

* Alerting
* <<xpack-apm,*APM*>>
Expand All @@ -43,31 +55,53 @@ To access alerting in a space, a user must have access to one of the following f
* <<xpack-siem,*Security*>>
* <<uptime-app,*Uptime*>>

See <<kibana-feature-privileges, feature privileges>> for more information on configuring roles that provide access to these features.
Also note that a user will need +read+ privileges for the *Actions and Connectors* feature to attach actions to a rule or to edit a rule that has an action attached to it.
See <<kibana-feature-privileges, feature privileges>> for more information on
configuring roles that provide access to these features.
Also note that a user will need +read+ privileges for the
*Actions and Connectors* feature to attach actions to a rule or to edit a rule
that has an action attached to it.

[float]
[[alerting-restricting-actions]]
==== Restrict actions

For security reasons you may wish to limit the extent to which {kib} can connect to external services. <<action-settings>> allows you to disable certain <<action-types>> and allowlist the hostnames that {kib} can connect with.
For security reasons you may wish to limit the extent to which {kib} can connect
to external services. <<action-settings>> allows you to disable certain
<<action-types>> and allowlist the hostnames that {kib} can connect with.

[float]
[[alerting-spaces]]
=== Space isolation

Rules and connectors are isolated to the {kib} space in which they were created. A rule or connector created in one space will not be visible in another.
Rules and connectors are isolated to the {kib} space in which they were created.
A rule or connector created in one space will not be visible in another.

[float]
[[alerting-authorization]]
=== Authorization

Rules are authorized using an <<api-keys,API key>> associated with the last user to edit the rule. This API key captures a snapshot of the user's privileges at the time of edit and is subsequently used to run all background tasks associated with the rule, including condition checks like {es} queries and triggered actions. The following rule actions will re-generate the API key:
Rules are authorized using an <<api-keys,API key>> associated with the last user
to edit the rule. This API key captures a snapshot of the user's privileges at
the time of the edit. They are subsequently used to run all background tasks
associated with the rule, including condition checks like {es} queries and
triggered actions. The following rule actions will re-generate the API key:

* Creating a rule
* Updating a rule

When you disable a rule, it retains the associated API key which is re-used when
the rule is enabled. If the API key is missing when you enable the rule (for
example, in the case of imported rules), it generates a new key that has your
security privileges.

You can update an API key manually in
**{stack-manage-app} > {rules-ui}** or in the rule details page by selecting
**Update API key** in the actions menu.

[IMPORTANT]
==============================================
If a rule requires certain privileges, such as index privileges, to run, and a user without those privileges updates the rule, the rule will no longer function. Conversely, if a user with greater or administrator privileges modifies the rule, it will begin running with increased privileges.
If a rule requires certain privileges, such as index privileges, to run, and a
user without those privileges updates the rule, the rule will no longer
function. Conversely, if a user with greater or administrator privileges
modifies the rule, it will begin running with increased privileges.
==============================================
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"cover:report": "nyc report --temp-dir target/kibana-coverage/functional --report-dir target/coverage/report --reporter=lcov && open ./target/coverage/report/lcov-report/index.html",
"debug": "node --nolazy --inspect scripts/kibana --dev",
"debug-break": "node --nolazy --inspect-brk scripts/kibana --dev",
"dev-docs": "scripts/dev_docs.sh",
"docs:acceptApiChanges": "node --max-old-space-size=6144 scripts/check_published_api_changes.js --accept",
"es": "node scripts/es",
"preinstall": "node ./preinstall_check",
Expand Down Expand Up @@ -109,7 +110,7 @@
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/[email protected]",
"@elastic/ems-client": "8.3.2",
"@elastic/eui": "55.1.2",
"@elastic/eui": "55.1.3",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",
Expand Down
1 change: 1 addition & 0 deletions packages/elastic-apm-synthtrace/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
export { timerange } from './lib/timerange';
export { apm } from './lib/apm';
export { stackMonitoring } from './lib/stack_monitoring';
export { observer } from './lib/agent_config';
export { cleanWriteTargets } from './lib/utils/clean_write_targets';
export { createLogger, LogLevel } from './lib/utils/create_logger';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import { AgentConfigFields } from './agent_config_fields';
import { Metricset } from '../apm/metricset';

export class AgentConfig extends Metricset<AgentConfigFields> {
constructor() {
super({
'metricset.name': 'agent_config',
agent_config_applied: 1,
});
}

etag(etag: string) {
this.fields['labels.etag'] = etag;
return this;
}
}
Loading

0 comments on commit 3f9cba4

Please sign in to comment.