Skip to content

Commit

Permalink
Merge branch 'main' into issue-129932-rules-list-shareable
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed May 22, 2022
2 parents d19b987 + 383239e commit 1c31509
Show file tree
Hide file tree
Showing 83 changed files with 1,320 additions and 540 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].
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/elasticsearch-canary@8.2.0-canary.2",
"@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
103 changes: 103 additions & 0 deletions scripts/dev_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
#!/bin/bash
set -euo pipefail

KIBANA_DIR=$(cd "$(dirname "$0")"/.. && pwd)
WORKSPACE=$(cd "$KIBANA_DIR/.." && pwd)/kibana-docs
export NVM_DIR="$WORKSPACE/.nvm"

DOCS_DIR="$WORKSPACE/docs.elastic.dev"

# These are the other repos with docs currently required to build the docs in this repo and not get errors
# For example, kibana docs link to docs in these repos, and if they aren't built, you'll get errors
DEV_DIR="$WORKSPACE/dev"
TEAM_DIR="$WORKSPACE/kibana-team"

cd "$KIBANA_DIR"
origin=$(git remote get-url origin || true)
GIT_PREFIX="git@github.com:"
if [[ "$origin" == "https"* ]]; then
GIT_PREFIX="https://github.com/"
fi

mkdir -p "$WORKSPACE"
cd "$WORKSPACE"

if [[ ! -d "$NVM_DIR" ]]; then
echo "Installing a separate copy of nvm"
git clone https://github.com/nvm-sh/nvm.git "$NVM_DIR"
cd "$NVM_DIR"
git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" "$(git rev-list --tags --max-count=1)")"
cd "$WORKSPACE"
fi
source "$NVM_DIR/nvm.sh"

if [[ ! -d "$DOCS_DIR" ]]; then
echo "Cloning docs.elastic.dev repo..."
git clone --depth 1 "${GIT_PREFIX}elastic/docs.elastic.dev.git"
else
cd "$DOCS_DIR"
git pull
cd "$WORKSPACE"
fi

if [[ ! -d "$DEV_DIR" ]]; then
echo "Cloning dev repo..."
git clone --depth 1 "${GIT_PREFIX}elastic/dev.git"
else
cd "$DEV_DIR"
git pull
cd "$WORKSPACE"
fi

if [[ ! -d "$TEAM_DIR" ]]; then
echo "Cloning kibana-team repo..."
git clone --depth 1 "${GIT_PREFIX}elastic/kibana-team.git"
else
cd "$TEAM_DIR"
git pull
cd "$WORKSPACE"
fi

# The minimum sources required to build kibana docs
cat << EOF > "$DOCS_DIR/sources-dev.json"
{
"sources": [
{
"type": "file",
"location": "$KIBANA_DIR"
},
{
"type": "file",
"location": "$DEV_DIR"
},
{
"type": "file",
"location": "$TEAM_DIR"
}
]
}
EOF

cd "$DOCS_DIR"
nvm install

if ! which yarn; then
npm install -g yarn
fi

yarn

if [[ ! -d .docsmobile ]]; then
yarn init-docs
fi

echo ""
echo "The docs.elastic.dev project is located at:"
echo "$DOCS_DIR"
echo ""

if [[ "${1:-}" ]]; then
yarn "$@"
else
yarn dev
fi
2 changes: 1 addition & 1 deletion src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ export const LICENSE_OVERRIDES = {
'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts
'@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
'@elastic/ems-client@8.3.2': ['Elastic License 2.0'],
'@elastic/eui@55.1.2': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@55.1.3': ['SSPL-1.0 OR Elastic License 2.0'],
'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry
};
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export function FieldSearch({
})}
</EuiPopoverTitle>
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
items={(availableFieldTypes as string[]).map((type) => (
<EuiContextMenuItem
key={type}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,7 @@ class SavedObjectFinderUi extends React.Component<
</EuiFilterButton>
}
>
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
items={this.getSortOptions()}
/>
<EuiContextMenuPanel items={this.getSortOptions()} />
</EuiPopover>
{this.props.showFilter && (
<EuiPopover
Expand Down Expand Up @@ -411,7 +408,6 @@ class SavedObjectFinderUi extends React.Component<
}
>
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
items={this.props.savedObjectMetaData.map((metaData) => (
<EuiContextMenuItem
key={metaData.type}
Expand Down
13 changes: 0 additions & 13 deletions src/plugins/share/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,6 @@ const url = await shortUrls.create({
});
```

You can make the short URL slug human-readable by specifying the
`humanReadableSlug` flag:

```ts
const url = await shortUrls.create({
locator,
params: {
dashboardId: '123',
},
humanReadableSlug: true,
});
```

Or you can manually specify the slug for the short URL using the `slug` option:

```ts
Expand Down
Loading

0 comments on commit 1c31509

Please sign in to comment.