Skip to content

[Backport] Avoid NPE in set_security_user without security#53543

Merged
tvernum merged 1 commit intoelastic:7.xfrom
tvernum:backport/7.x/52691-Avoid-NPE-in-set
Mar 17, 2020
Merged

[Backport] Avoid NPE in set_security_user without security#53543
tvernum merged 1 commit intoelastic:7.xfrom
tvernum:backport/7.x/52691-Avoid-NPE-in-set

Conversation

@tvernum
Copy link
Copy Markdown
Contributor

@tvernum tvernum commented Mar 13, 2020

If security was disabled (explicitly), then the SecurityContext would
be null, but the set_security_user processor was still registered.

Attempting to define a pipeline that used that processor would fail
with an (intentional) NPE. This behaviour, introduced in #52032, is a
regression from previous releases where the pipeline was allowed, but
was no usable.

This change restores the previous behaviour (with a new warning).

Backport of: #52691

If security was disabled (explicitly), then the SecurityContext would
be null, but the set_security_user processor was still registered.

Attempting to define a pipeline that used that processor would fail
with an (intentional) NPE. This behaviour, introduced in elastic#52032, is a
regression from previous releases where the pipeline was allowed, but
was no usable.

This change restores the previous behaviour (with a new warning).

Backport of: elastic#52691
@tvernum tvernum merged commit 74dbdb9 into elastic:7.x Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant