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

[Security in Core] Move security plugin's config to core #186863

Open
kc13greiner opened this issue Jun 25, 2024 · 8 comments
Open

[Security in Core] Move security plugin's config to core #186863

kc13greiner opened this issue Jun 25, 2024 · 8 comments
Labels
enhancement New value added to drive a business result Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@kc13greiner
Copy link
Contributor

kc13greiner commented Jun 25, 2024

As part of the ongoing work to make security a core service, the config should be moved from xpack.security.* to core.security.*

This work will entail:

  • moving the schema registration
  • adding config deprecation
  • exposing the config type from core for the security plugin to be able to use
    ... To be continued!
@kc13greiner kc13greiner added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! enhancement New value added to drive a business result labels Jun 25, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@pgayvallet
Copy link
Contributor

Note that the security plugin will still need to access its config too (for the parts were the logic is delegated from the plugin to core), so basically we need to find a way to have the security config being accessible from both Core and the security plugin.

This could be achieve by various hacky ways:

  • Having a custom "deprecation" to duplicate xpack.security.* to core.security.*
  • Having a rename deprecation to move xpack.security.* to core.security.* and changing the security plugin's configPath to core.security
  • could we find something better?

@azasypkin
Copy link
Member

could we find something better?

Not necessarily better, but as an additional option - since the configuration is known before setup, Core can potentially somehow provide only necessary configuration bits to the security plugin as part of the "registerSecurityDelegate" flow as well.

Having a rename deprecation to move xpack.security.* to core.security.* and changing the security plugin's configPath to core.security

Would it be feasible to apply renaming only to specific segments of the xpack.security.* configuration so that we can do this migration gradually? If so, this approach might be the way to go since we'll need to suport the old security configuration for quite some time and phase it out carefully.

@pgayvallet
Copy link
Contributor

Would it be feasible to apply renaming only to specific segments of the xpack.security.* configuration so that we can do this migration gradually?

Yeah, we absolutely can. the only thing with this approach (having only some props moved, so some accessible only by Core and some accessible only by the security plugin) is that we can't have props that needs to be accessed by both. And I wonder if that's not already the case for the FIPS PR?

@legrego
Copy link
Member

legrego commented Jul 8, 2024

As part of thehttps://github.com//issues/174578, the config should be moved from xpack.security.* to core.security.*

I have concerns with this premise. Our goal of moving security into core is to provide a better DX for us and other Kibana Contributors. Moving yml configuration impacts our administrators, and the benefit of this is not clear to me. If anything, this may add to their confusion, as we have strived for consistency where possible between Kibana's security config and ES's security config. ES, as far as I know, has no plans to move away from the xpack.security.* config space.

@azasypkin
Copy link
Member

Moving yml configuration impacts our administrators, and the benefit of this is not clear to me. If anything, this may add to their confusion, as we have strived for consistency where possible between Kibana's security config and ES's security config.

That's a good point, thanks! I think it's worth having a broader discussion though. If it turns out that it's just xpack.security.* that strives to stay consistent with Elasticsearch, then the value our users/admins get might be very limited in the grand scheme of things, since the prefix itself is probably the only thing that looks similar to the ES config.

That being said, core.security.* is not necessarily better (even though I feel like x-pack is a thing of the past when it comes to how we present "security" functionality to our users today) and it'd make sense to outline pros and cons, but consistency with ES config might not be as strong of a reason to constrain ourselves as it seems, at least for a new functionality and functionality that doesn't map 1:1.

@TinaHeiligers
Copy link
Contributor

@azasypkin we meed to pick up moving security plugin's config to core discussion soon. Phase 2 is finished, we're in Phase 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

No branches or pull requests

6 participants