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

[Serverless] Disable UI of Users, Roles, and Role Mappings #158186

Merged

Conversation

ElenaStoeva
Copy link
Contributor

Partially addresses #157756

Summary

This PR makes the UI of the following Security apps disable-able for serverless:

  • Users
  • Roles
  • Role Mappings

How to test:

  1. Start Elasticsearch with yarn es snapshot and Kibana with yarn serverless-{mode} where {mode} can be es, security, or oblt.
  2. Verify that the Users app is not accessible and its path (management/security/users) leads to the Stack Management landing page.
  3. Verify that the Roles app is not accessible and its path (management/security/roles) leads to the Stack Management landing page.
  4. Verify that the Role Mappings app is not accessible and its path (management/security/role_mappings) leads to the Stack Management landing page.

Test the Security apps in regular (non-serverless) mode:

  1. Start Elasticsearch with yarn es snapshot and Kibana with yarn start.
  2. Verify that Users, Roles, and Role Mappings apps work as expected.

@ElenaStoeva ElenaStoeva added Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes labels May 22, 2023
@ElenaStoeva ElenaStoeva self-assigned this May 22, 2023
@ElenaStoeva ElenaStoeva marked this pull request as ready for review May 22, 2023 16:00
@ElenaStoeva ElenaStoeva requested review from a team as code owners May 22, 2023 16:00
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

Copy link
Member

@legrego legrego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ElenaStoeva thanks for putting this PR together for us, much appreciated! I left a couple of comments below for your review.

src/plugins/management/public/types.ts Outdated Show resolved Hide resolved
x-pack/plugins/security/server/config.ts Outdated Show resolved Hide resolved
x-pack/plugins/security/server/config.ts Outdated Show resolved Hide resolved
@ElenaStoeva
Copy link
Contributor Author

Thanks a lot for the review @legrego! I made the suggested changes and left a couple of follow-up comments. Let me know your thoughts on these.

Copy link
Member

@legrego legrego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look great, thanks! One last request around unit tests below, then I think we're good to go.

x-pack/plugins/security/server/config.ts Show resolved Hide resolved
Copy link
Member

@legrego legrego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on green CI!

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
security 61.3KB 61.6KB +282.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 400 404 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 480 484 +4
total +6

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @ElenaStoeva

@ElenaStoeva ElenaStoeva merged commit 0a0ead2 into elastic:main May 23, 2023
@kibanamachine kibanamachine added v8.9.0 backport:skip This commit does not require backporting labels May 23, 2023
@ElenaStoeva ElenaStoeva deleted the serverless/disable-security-apps-ui branch May 24, 2023 09:26
delanni pushed a commit to delanni/kibana that referenced this pull request May 25, 2023
…58186)

Partially addresses elastic#157756

## Summary

This PR makes the UI of the following Security apps disable-able for
serverless:
- Users
- Roles
- Role Mappings


**How to test:**

1. Start Elasticsearch with `yarn es snapshot` and Kibana with yarn
`serverless-{mode}` where `{mode}` can be `es`, `security`, or `oblt`.
2. Verify that the Users app is not accessible and its path
(`management/security/users`) leads to the Stack Management landing
page.
3. Verify that the Roles app is not accessible and its path
(`management/security/roles`) leads to the Stack Management landing
page.
4. Verify that the Role Mappings app is not accessible and its path
(`management/security/role_mappings`) leads to the Stack Management
landing page.

Test the Security apps in regular (non-serverless) mode:
1. Start Elasticsearch with `yarn es snapshot` and Kibana with `yarn
start`.
2. Verify that Users, Roles, and Role Mappings apps work as expected.
ElenaStoeva added a commit that referenced this pull request Jul 24, 2023
…#162187)

This is a follow-up to #160671,
where the Management plugins were disabled using `contextRef`.

The configs for disabling the UI of the security management plugins were
added in #158186. In this PR, they
are changed so that they follow the same convention for disabling the
Management plugins - setting the default values of the configs to `true`
and explicitly setting them to `false` in the `serverless.yml` file.
This way, we have a clear view in `serverless.yml` of all
plugins/functionalities that have been disabled.
ThomThomson pushed a commit to ThomThomson/kibana that referenced this pull request Aug 1, 2023
…elastic#162187)

This is a follow-up to elastic#160671,
where the Management plugins were disabled using `contextRef`.

The configs for disabling the UI of the security management plugins were
added in elastic#158186. In this PR, they
are changed so that they follow the same convention for disabling the
Management plugins - setting the default values of the configs to `true`
and explicitly setting them to `false` in the `serverless.yml` file.
This way, we have a clear view in `serverless.yml` of all
plugins/functionalities that have been disabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants