-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Remove securityOss plugin #113946
Remove securityOss plugin #113946
Conversation
State includes access URL parameters and whether or not anonymous access is enabled. Moved the server and client side code, and updated the share plugin consumer accordingly. Got rid of a bit of dead code in the process.
The securityOss plugin provided an insecure cluster service that the security plugin augmented using its own security checkup service. I combined the two into the latter. That was the last dependency on the securityOss plugin, so this allowed me to completely remove the plugin.
123cc98
to
126d1fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Author's notes for reviewers.
x-pack/plugins/security/server/routes/security_checkup/get_state.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/security/public/anonymous_access/anonymous_access_service.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/security/public/security_checkup/security_checkup_service.tsx
Show resolved
Hide resolved
The insecure cluster warning could be shown in two different scenarios: 1. The Kibana security plugin is not available 2. Kibana security is available, but Elasticsearch security is disabled Scenario 1 is no longer possible with this PR. Scenario 2 never had a functional test suite because up to this point we did not have a way to run the functional test server in that manner. This commit removes the tests for Scenario 1, and we'll need to add new tests for Scenario 2 in the 8.0 release when our functional testing tooling supports it.
I had to remove the functional tests as described in bc8ac43:
I'll create an issue for adding the new functional tests, and update this comment with a link. Edit: tracking this in #114049. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, everything seems to be working as expected. I just have a couple of minor comments below, but otherwise looking good!
src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker
Show resolved
Hide resolved
x-pack/plugins/security/public/security_checkup/security_checkup_service.tsx
Show resolved
Hide resolved
x-pack/plugins/security/public/security_checkup/security_checkup_service.test.ts
Show resolved
Hide resolved
x-pack/plugins/security/server/routes/security_checkup/get_state.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the edits!
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Public APIs missing exports
Page load bundle
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppServices code changes LGTM.
💔 Backport failedThe backport operation could not be completed due to the following error: The backport PRs will be merged automatically after passing CI. To backport manually run: |
# Conflicts: # .eslintrc.js # .github/CODEOWNERS # api_docs/security_oss.mdx # packages/kbn-optimizer/limits.yml # scripts/functional_tests.js # x-pack/plugins/translations/translations/ja-JP.json # x-pack/plugins/translations/translations/zh-CN.json
* Remove securityOss plugin (#113946) # Conflicts: # .eslintrc.js # .github/CODEOWNERS # api_docs/security_oss.mdx # packages/kbn-optimizer/limits.yml # scripts/functional_tests.js # x-pack/plugins/translations/translations/ja-JP.json # x-pack/plugins/translations/translations/zh-CN.json * Add unintentionally removed translations * Fix jest test
Resolves #104152.
Note: we don't ship the OSS distribution anymore, but the security plugin can be disabled in 7.16 (it won't be disable-able in 8.0+).
If someone is using the Default distribution of 7.16 and they have the security plugin disabled, then they won't see the Security Checkup message when they open Kibana for the first time. This edge case is an acceptable tradeoff to eliminating an entire plugin that we don't need anymore.
This PR also deprecates the
security.showInsecureClusterWarning: false
setting, renaming it toxpack.security.showInsecureClusterWarning: false
. This setting does not appear in our documentation.Testing
Existing functionality was refactored, here are the steps to test and make sure it still works as expected.
1. Insecure cluster toast
Kibana shows the toast when all three of these conditions are true:
To test this:
yarn es snapshot -E xpack.security.enabled=false
You should see the toast now.
You can dismiss the toast, or you can disable the warning in kibana.yml using either
security.showInsecureClusterWarning: false
orxpack.security.showInsecureClusterWarning: false
.(I deprecated the former in favor of the latter)
2. Share Public URL
When anonymous access is enabled with another form of authentication, using the Share menu on a supported app (such as Dashboard) should show a switch for the Public URL. Enabling that will add an auth provider hint for the anonymous auth provider.
To test this:
If you configure Kibana without the anonymous auth provider, or with only the anonymous auth provider, the switch should not be displayed.