Commit graph

522 commits

Author SHA1 Message Date
Nikola Grcevski
8512037aaa
[7.x] Deprecation of transient cluster settings (#78794) (#79288)
This PR changes uses of transient cluster settings to
persistent cluster settings.

The PR also deprecates the transient settings usage.

Relates to #49540
2021-10-15 19:06:33 -04:00
Przemyslaw Gomulka
d8a6a7af1f
Setting to disable x-opaque-id in logs throttling backport(#78911) (#78982)
Introduces a setting cluster.deprecation_indexing.x_opaque_id_used.enabled to disable use of
x-opaque-id in RateLimitingFilter. This will be used for deprecation
logs indexing and will not affect logging to files (it uses different
instance of RateLimitingFilter with this flag enabled by default)

Changes the indices backing a deprecation log data stream to be hidden.

Refactors DeprecationHttpIT to be more reliable

relates #76292
closes #77936

backport #78911
2021-10-12 14:25:57 +02:00
James Rodewig
cc3396e76b
[DOCS] Re-add docs for multiple data paths (MDP) (#78342) (#78384)
We deprecated support for multiple data paths (MDP) in 7.13. However,
we won't remove support until after 8.0.

Changes:

* Reverts PR #72267, which removed MDP docs
* Removes a related item from the 8.0 breaking changes.
2021-09-28 09:40:02 -04:00
Przemyslaw Gomulka
7b028645aa
[doc] Improve documentation for deprecation logging (#78326) (#78330)
adding a section on WARN messages

relates #77030
2021-09-27 11:07:10 -04:00
Przemyslaw Gomulka
4ef3a58a46
Change default deprecation logger level to CRITICAL backport(#77030) (#77482)
This commit changes default deprecation logger level to CRITICAL, where default means deprecations emitted by DeprecationLogger#critical method.
It also introduces WARN deprecations which are emitted by DeprecationLogger#warn Those log lines emitted at WARN are meant to indicate that a functionality is deprecated but will not break at next major version.
relates #76754
2021-09-27 13:43:16 +02:00
Adam Locke
2174b4642d
[DOCS] Update remote cluster docs (#77043) (#78212)
* [DOCS] Update remote cluster docs

* Add files, rename files, write new stuff

* Plethora of changes

* Add test and update snippets

* Redirects, moved files, and test updates

* Moved file to x-pack for tests

* Remove older CCS page and add redirects

* Cleanup, link updates, and some rewrites

* Update image

* Incorporating user feedback and rewriting much of the remote clusters page

* More changes from review feedback

* Numerous updates, including request examples for CCS and Kibana

* More changes from review feedback

* Minor clarifications on security for remote clusters

* Incorporate review feedback

Co-authored-by: Yang Wang <ywangd@gmail.com>

* Some review feedback and some editorial changes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Yang Wang <ywangd@gmail.com>
# Conflicts:
#	docs/reference/modules/network.asciidoc
#	docs/reference/modules/remote-clusters.asciidoc
#	x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc
#	x-pack/docs/en/security/ccs-clients-integrations/index.asciidoc

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-09-23 12:13:03 +02:00
István Zoltán Szabó
e426ce8673
[DOCS] Fixes broken links. (#78233) 2021-09-23 10:36:41 +02:00
James Rodewig
a6a9ea2fb0
[DOCS] Fix ESS install lead-in (#77887) (#77890)
Replaces the hard-coded ESS lead-in with the docs attribute.

Previously, this copy omitted Microsoft Azure. This ensures these docs are better maintained.
2021-09-16 12:18:42 -04:00
James Rodewig
586fe11cf4
[DOCS] Re-add KEYSTORE_PASSWORD example to Docker install docs (#77588) (#77590)
PR #77155 updated the keystore instructions for Docker. However, it removed an
example that included the `KEYSTORE_PASSWORD` env variable.

This replaces a docker compose example with the original example from PR #51123.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-09-10 17:58:40 -04:00
James Rodewig
633cfec6aa
[DOCS] Fix keystore creation instructions for Docker (#77155) (#77559)
Currently, our Docker install docs instruct users to directly bind-mount the `elasticsearch.keystore` file. This can lead to errors:

* If the keystore file doesn't already exist, Docker's `-v` flag will create `elasticsearch.keystore` as a directory. This will block the creation of the keystore file.
* To add or update secure settings, the container needs access to other files in the `config` directory, such as `keystore.tmp`.

This updates the Docker install docs to instruct users to bind-mount the `config` directory rather than `elasticsearch.keystore`. It also adds troubleshooting tips for errors related to the keystore.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: Stef Nestor <steffanie.nestor@gmail.com>
2021-09-10 11:20:53 -04:00
David Turner
6d81038c09 Clarify 'runs in the foreground' (#76709)
Users following the installation guide sometimes get stuck, reporting
that Elasticsearch has "hung" after running `./bin/elasticsearch`
because it doesn't exit, it just sits there in the foreground waiting
for something to happen. We do say that it "runs in the foreground" in
the docs but that's not clear enough, maybe folks expect it to declare
it started up successfully or to open a browser window for them or
something.

This commit expands the docs to clarify what users should expect from
running Elasticsearch from the command line and what they should do
next.
2021-09-06 12:29:38 +01:00
Rory Hunter
ed33dafeb7 Change env var prefix in Docker settings support (#76192)
Closes #76148. Previously, in #74327, we added support for setting
Elasticsearch settings in the Docker image via environment variables.
However there are scenarios e.g in Kubernetes where it is easy to
accidentally define environment variables that the ES startup process
rejects.

Work around this by using the more explicit env var prefix
`ES_SETTING_`.
2021-08-09 10:15:22 +01:00
James Rodewig
6d622afa89
[DOCS] Correct docs for deprecation logging (#75361) (#75461)
By default, `logger.deprecation.level` logs messages at the `DEPRECATION` level. This updates
and reorganizes the related docs.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: Robin Clarke <robin.clarke@elastic.co>
2021-07-19 11:10:15 -04:00
Rory Hunter
f3b25f43c5 Accept settings in snake case in Docker image (#74327)
Closes #74036. Since some orchestration platforms forbid periods in
environment variable names, allow Docker users to pass settings to ES
using an alternative name scheme. For example:

    bootstrap.memory_lock

...becomes:

    ES_BOOTSTRAP_MEMORY__LOCK

The setting name is uppercased, prefixed, all underscores are converted
to double underscores, and all periods are converted to underscores.
2021-07-09 19:59:42 +01:00
David Turner
ba38417def Generalize TCP retxn docs to cover remote clusters (#74732)
Today the docs on setting `tcp_retries2` only talk about intra-cluster
connections, but in fact this setting is equally important to the
resilience of remote cluster connections too. This commit rewords these
docs to cover both cases.

Relates #34405
2021-07-05 13:38:50 +01:00
James Rodewig
93f3182b3d
[DOCS] Remove PrintCompressedOopsMode JVM option (#73741) (#73953)
Changes:
* Removes a reference to the
  `-XX:+UnlockDiagnosticVMOptions -XX:+PrintCompressedOopsMode` JVM option. This
  option is no longer supported.
* Combines `Xms/Xmx` recommendations for compressed oops.

Closes #71644.

Co-authored-by: Rick Boyd <boyd.richardj@gmail.com>
2021-06-09 09:53:42 -04:00
James Rodewig
99fb2002f4 [DOCS] Remove outdated OSS homebrew tap (#73688)
With
230b860d95,
the `elastic/tap/elasticsearch-oss` tap was removed from Homebrew. This
removes outdated references to the tap from our docs.

It also notes that Homebrew installs the latest version of Elasticsearch.
# Conflicts:
#	docs/reference/setup/install/brew.asciidoc
2021-06-02 14:12:36 -04:00
James Rodewig
ac1ce3e6d3
[DOCS] Note only ES should lock path.data files (#73596) (#73611)
If another service, such as an antivirus or backup program, opens and
locks files in the `path.data` directory, Elasticsearch may return errors.
2021-06-01 10:45:48 -04:00
Dan Hermann
74388c5192
[DOCS] Include link to ES_TMPDIR with docs on jna.tmpdir (#72845) (#72890) 2021-05-10 11:06:49 -05:00
James Rodewig
e764c188f7
[DOCS] Clarify location of custom JVM options files (#72656) (#72680)
Clarify the files to be modified are in the `jvm.options.d/` folder

Co-authored-by: Leaf-Lin <39002973+Leaf-Lin@users.noreply.github.com>
2021-05-04 08:36:27 -04:00
debadair
5220e4c05c
[DOCS] Edit JVM settings info. Closes #72259 (#72350) (#72436)
* [DOCS] Edit JVM settings info. Closes #72259

* Apply suggestions from code review

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

* Incorporated review feedback.
2021-04-28 19:23:27 -07:00
Henning Andersen
c6a2751c14 [DOCS] Disable shard allocation - data nodes only (#72265)
When doing a rolling restart we recommend disabling shard allocation to
avoid unnecessary recoveries. However, this advise is unnecessary or
even harmful when restarting nodes that do not carry any data like a
pure ML node.
2021-04-27 11:21:56 +02:00
Ryan Ernst
d58d9941e2
Add multiple data paths deprecation to docs (#71312)
This commit adds a deprecation note to the multiple data paths doc. It also removes mention of multiple paths support in the setup settings table.

relates #71205
2021-04-05 16:29:17 -07:00
James Rodewig
c757f9e4e7
[DOCS] Fix double spaces (#71082) (#71120) 2021-03-31 11:43:34 -04:00
Adam Locke
c677bd0fc0
[DOCS] [7.x] Overhaul TLS security docs (#68946) (#70880)
* Removing security overview and condensing.

* Adding new security file.

* Minor changes.

* Removing link to pass build.

* Adding minimal security page.

* Adding minimal security page.

* Changes to intro.

* Add basic and basic + http configurations.

* Lots of changes, removed files, and redirects.

* Moving some AD and LDAP sections, plus more redirects.

* Redirects for SAML.

* Updating snippet languages and redirects.

* Adding another SAML redirect.

* Hopefully fixing the ci/2 error.

* Fixing another broken link for SAML.

* Adding what's next sections and some cleanup.

* Removes both security tutorials from the TOC.

* Adding redirect for removed tutorial.

* Add graphic for Elastic Security layers.

* Incorporating reviewer feedback.

* Update x-pack/docs/en/security/securing-communications/security-basic-setup.asciidoc

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>

* Update x-pack/docs/en/security/securing-communications/security-minimal-setup.asciidoc

Co-authored-by: Yang Wang <ywangd@gmail.com>

* Update x-pack/docs/en/security/securing-communications/security-basic-setup.asciidoc

Co-authored-by: Yang Wang <ywangd@gmail.com>

* Update x-pack/docs/en/security/index.asciidoc

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>

* Update x-pack/docs/en/security/securing-communications/security-basic-setup-https.asciidoc

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>

* Apply suggestions from code review

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>
Co-authored-by: Yang Wang <ywangd@gmail.com>

* Additional changes from review feedback.

* Incorporating reviewer feedback.

* Incorporating more reviewer feedback.

* Clarify that TLS is for authenticating nodes

Co-authored-by: Tim Vernum <tim@adjective.org>

* Clarify security between nodes

Co-authored-by: Tim Vernum <tim@adjective.org>

* Clarify that TLS is between nodes

Co-authored-by: Tim Vernum <tim@adjective.org>

* Update title for configuring Kibana with a password

Co-authored-by: Tim Vernum <tim@adjective.org>

* Move section for enabling passwords between Kibana and ES to minimal security.

* Add section for transport description, plus incorporate more reviewer feedback.

* Moving operator privileges lower in the navigation.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>
Co-authored-by: Yang Wang <ywangd@gmail.com>
Co-authored-by: Tim Vernum <tim@adjective.org>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>
Co-authored-by: Yang Wang <ywangd@gmail.com>
Co-authored-by: Tim Vernum <tim@adjective.org>
2021-03-25 14:07:27 -04:00
James Rodewig
1560bf071b
[DOCS] Disambiguate logs and data in path settings docs (#70629) (#70642) 2021-03-22 10:51:18 -04:00
Jason Tedor
79e8aaec3d
Introduce ES_JAVA_HOME (#68954)
This commit introduces a dedicated envirnoment variable ES_JAVA_HOME to
determine the JDK used to start (if not using the bundled JDK). This
environment variable will replace JAVA_HOME. The reason that we are
making this change is because JAVA_HOME is a common environment variable
and sometimes users have it set in their environment from other JDK
applications that they have installed on their system. In this case,
they would accidentally end up not using the bundled JDK despite their
intentions. By using a dedicated environment variable specific to
Elasticsearch, we avoid this potential for conflict. With this commit,
we introduce the new environment variable, and deprecate the use of
JAVA_HOME. We will remove support for JAVA_HOME in a future commit.
2021-02-17 12:44:34 -05:00
debadair
cdcf59302f
[DOCS] Update package description. (#68565) (#68566)
* [DOCS] Update package description.

* Fixed xref
2021-02-04 17:11:27 -08:00
Mark Vieira
2d1e8b3abd Update sources with new SSPL+Elastic-2.0 license headers
As per the new licensing change for Elasticsearch and Kibana this commit
moves existing Apache 2.0 licensed source code to the new dual license
SSPL+Elastic license 2.0. In addition, existing x-pack code now uses
the new version 2.0 of the Elastic license. Full changes include:

- Updating LICENSE and NOTICE files throughout the code base, as well
  as those packaged in our published artifacts
- Update IDE integration to now use the new license header on newly
  created source files
- Remove references to the "OSS" distribution from our documentation
- Update build time verification checks to no longer allow Apache 2.0
  license header in Elasticsearch source code
- Replace all existing Apache 2.0 license headers for non-xpack code
  with updated header (vendored code with Apache 2.0 headers obviously
  remains the same).
- Replace all Elastic license 1.0 headers with new 2.0 header in xpack.
2021-02-02 18:07:23 -08:00
James Rodewig
541c429976
[DOCS] Fix typo (#68193) (#68288)
Changed PGP Keys to GPG Keys

Co-authored-by: Sriraag Sridhar <53432553+sriraagworks@users.noreply.github.com>
2021-02-01 09:28:53 -05:00
David Turner
b2861bc804 Expand and consolidate networking docs (#68051)
Today's network config docs are split into "Network", "HTTP" and
"Transport" pages, with unclear relationships between them. We often
encounter users with weird configs that indicate they don't really
understand how these settings all relate. In fact these pages are all
very interrelated, and the HTTP and Transport pages are almost all only
for advanced users. This commit brings these docs into a single page and
rewords some things to try and guide users away from the advanced
settings unless their configuration needs all the extra complexity.

It also adds a section entitled "Binding and publishing" which clarifies
the meanings of the `bind_host` and `publish_host` parameters. This is
also a common source of confusion amongst users.

It also clarifies that many of these settings accept a list of
addresses, and warns that this may not be what you want. Closes #67956.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-02-01 13:37:29 +00:00
James Rodewig
674210f5df
[DOCS] Make cat API verbose query param explicit (#67300) (#67305) 2021-01-12 08:33:50 -05:00
James Rodewig
45a1086aaf
[DOCS] Clarify memlock settings in /etc/security/limits.conf (#66694) (#66998) 2021-01-05 09:19:05 -05:00
Ioannis Kakavas
c0b24df307
Ensure CI is run in FIPS 140 approved only mode (#66804)
We were depending on the BouncyCastle FIPS own mechanics to set
itself in approved only mode since we run with the Security
Manager enabled. The check during startup seems to happen before we
set our restrictive SecurityManager though in
org.elasticsearch.bootstrap.Elasticsearch , and this means that
BCFIPS would not be in approved only mode, unless explicitly
configured so.

This commit sets the appropriate JVM property to explicitly set
BCFIPS in approved only mode in CI and adds tests to ensure that we
will be running with BCFIPS in approved only mode when we expect to.
It also sets xpack.security.fips_mode.enabled to true for all test clusters
used in fips mode and sets the distribution to the default one. It adds a
password to the elasticsearch keystore for all test clusters that run in fips
mode.
Moreover, it changes a few unit tests where we would use bcrypt even in
FIPS 140 mode. These would still pass since we are bundling our own
bcrypt implementation, but are now changed to use FIPS 140 approved
algorithms instead for better coverage.

It also addresses a number of tests that would fail in approved only mode
Mainly:

    Tests that use PBKDF2 with a password less than 112 bits (14char). We
    elected to change the passwords used everywhere to be at least 14
    characters long instead of mandating
    the use of pbkdf2_stretch because both pbkdf2 and
    pbkdf2_stretch are supported and allowed in fips mode and it makes sense
    to test with both. We could possibly figure out the password algorithm used
    for each test and adjust password length accordingly only for pbkdf2 but
    there is little value in that. It's good practice to use strong passwords so if
    our docs and tests use longer passwords, then it's for the best. The approach
    is brittle as there is no guarantee that the next test that will be added won't
    use a short password, so we add some testing documentation too.
    This leaves us with a possible coverage gap since we do support passwords
    as short as 6 characters but we only test with > 14 chars but the
    validation itself was not tested even before. Tests can be added in a followup,
    outside of fips related context.

    Tests that use a PKCS12 keystore and were not already muted.

    Tests that depend on running test clusters with a basic license or
    using the OSS distribution as FIPS 140 support is not available in
    neither of these.

Finally, it adds some information around FIPS 140 testing in our testing
documentation reference so that developers can hopefully keep in
mind fips 140 related intricacies when writing/changing docs.
2020-12-24 15:35:28 +02:00
James Rodewig
8021b7de3c
[DOCS] Fix outdated heap references (#66646) (#66711) 2020-12-21 14:14:05 -05:00
Mark Vieira
c43e27ea64 Update heap setting documentation in light of machine dependent heap (#66567) 2020-12-18 11:15:26 -08:00
David Turner
519c50fbd8 Fix Log4J config example in docs (#66386)
We lost the `logger.transport.name` line in #65169 and I incorrectly
extrapolated from what was left and mangled it further in #66318. This
commit fixes things.
2020-12-15 17:43:06 +00:00
David Turner
24715232cd Give a less dangerous example of logger config (#66318)
Today the docs use `logger.org.elasticsearch.transport: TRACE` as the
example for adjusting the logger config. This is a dangerous thing to
suggest since that's one of the most verbose loggers we have. An
accidental copy-and-paste of this example into a busy cluster can
cause damage.

This commit suggests `logger.org.elasticsearch.discovery: DEBUG`
instead, which is much more benign.

It also corrects the order of the levels and notes that `DEBUG` and
`TRACE` are only for expert use.
2020-12-15 17:04:51 +00:00
James Rodewig
acdc34b671
[DOCS] Note tar.gz does not include systemd (#66298) (#66344) 2020-12-15 10:13:38 -05:00
Rory Hunter
c04dfdeff9
Make it possible to use Stack logging in Docker (#66171)
Backport of #65778.

Closes #62758.

Include the Stack log4j config in the Docker image, in order to
make it possible to write logs in a container environment in the
same way as for an archive or package deployment. This is useful
in situations where the user is bind-mounting the logs directory
and has their own arrangements for log shipping.

To use stack logging, set the environment variable `ES_LOG_STYLE`
to `file`. It can also be set to `console`, which is the same as
not specifying it at all.

The Docker logging config is now auto-generated at image build time,
by running the default config through a transformer program when
preparing the distribution in an image builder step.

Also, in the docker distribution `build.gradle`, I changed a helper
closure into a class with a static method in order to fix an
issue where the Docker image was always being rebuilt, even when
there were no changes.
2020-12-10 19:09:02 +00:00
James Rodewig
ea7d8d1151
[DOCS] Update reference documentation that mentions CMS (#50542) (#65733)
Relates to https://github.com/elastic/elasticsearch/issues/46973

Co-authored-by: Evgenia Badyanova <evgenia.badiyanova@elastic.co>
2020-12-02 08:10:55 -05:00
David Turner
0d2af7b75c Add snapshots to important config list (#65338)
The _Important Elasticsearch configuration_ docs lists a number of items
that you should consider before moving to production. Today this list
does not include configuring snapshots, even though they're very
important to have in production. This commit addresses that omission,
removes some repetition from the introductory paragraphs, and notes that
this config is handled for you on Cloud.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2020-11-23 14:34:57 +00:00
James Rodewig
f4af82c6b9
[DOCS] Clarify logger-package relationship (#65169) (#65211)
Updates the logging level docs to better clarify the relationship
between loggers and their Java packages.
2020-11-18 10:44:48 -05:00
James Rodewig
97fcc6193e
[DOCS] Document reloadable Watcher settings (#64998) (#65072) 2020-11-16 09:18:35 -05:00
James Rodewig
0a082fb6fe
[DOCS] Improve docs for Windows DOS/UNC paths in path.* settings (#64668) (#64804) 2020-11-09 11:14:25 -05:00
James Rodewig
522111c2e3
[DOCS] Document off-heap swaps under mlocks (#64667) (#64700) 2020-11-06 07:57:43 -05:00
James Rodewig
94dc7d7fbc
[DOCS] Add tab widget for default log locations (#64510) (#64587) 2020-11-04 08:33:40 -05:00
James Rodewig
a9d6f888ab
[DOCS] Add redirect for heap size (#64507) (#64508) 2020-11-02 17:01:24 -05:00
James Rodewig
5dbb1be543
[DOCS] Note heap size must be set to same min and max (#64090) (#64475)
Co-authored-by: C.J. Jameson <cjcjameson@users.noreply.github.com>
2020-11-02 09:22:26 -05:00
Rory Hunter
a28c549931
Make ES files inside Docker container world readable (#64419)
Backport of #64274.

Running the Elasticsearch Docker image with a different GID is
possible but trappy, since at present all the ES files are only
readable by the user and group. This PR documents a Docker CLI flag
that fixes this situation, by ensuring the container user is added
to the default group (which is `root`, GID 0).

I also added a test for this case, and refactored the Docker tests
to use a builder pattern for constructing the `docker run` command.
The existing code was becoming unwieldy and hard to change.
2020-10-30 19:05:42 +00:00