Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport: Deprecate the kibana reserved user (#54967) #55822

Merged
merged 5 commits into from
Apr 28, 2020

Conversation

legrego
Copy link
Member

@legrego legrego commented Apr 27, 2020

Backports #54967 to 7.x/7.8

… user (elastic#54967)

* deprecate the kibana reserved user; introduce kibana_system user

* fix license and test errors

* fix IdentityProviderAuthenticationIT tests

* test deprecation logging

* First pass at SetupPasswordTool updates

* fix checkstyle

* update docs

* update number of expected users

* update test to expect deprecation header

Co-authored-by: Elastic Machine <[email protected]>
@legrego
Copy link
Member Author

legrego commented Apr 27, 2020

@albertzaharovits why would this work on master, but not 7.x? They both appear to be using the same JDK 14...is there a different runtime target here where Map.of() isn't available?

https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+pull-request+oss-distro-docs/25732/console

15:14:22 > Task :x-pack:plugin:security:compileJava FAILED
15:14:22 /dev/shm/elastic+elasticsearch+pull-request+oss-distro-docs/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordTool.java:72: error: cannot find symbol
15:14:22 public static final Map<String, String> USERS_WITH_SHARED_PASSWORDS = Map.of(KibanaSystemUser.NAME, KibanaUser.NAME);
15:14:22 ^
15:14:22 symbol: method of(String,String)
15:14:22 location: interface Map
15:14:22 Note: Some input files use or override a deprecated API.
15:14:22 Note: Recompile with -Xlint:deprecation for details.
15:14:22 Note: Some input files use unchecked or unsafe operations.
15:14:22 Note: Recompile with -Xlint:unchecked for details.
15:14:22 1 error

@pgomulka pgomulka added the :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) label Apr 28, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (:Security/Authentication)

@albertzaharovits
Copy link
Contributor

@albertzaharovits why would this work on master, but not 7.x? They both appear to be using the same JDK 14...is there a different runtime target here where Map.of() isn't available?

Yes, that's exactly right, the target runtime for the 7.x branch is probably JDK11 which is before the Map.of API has been introduced. This is a common issue we hit. You have to use Collections.unmodifiableMap in the 7.x backport.

Also, please don't forget to update the docs/reference/migration/migrate_7_8.asciidoc . It should mention the user (and role) which have been deprecated and will be removed in 8.

@legrego legrego merged commit 47d2524 into elastic:7.x Apr 28, 2020
@legrego legrego deleted the backport/pr-54967 branch April 28, 2020 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants