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] Core licensing service #187296

Closed
TinaHeiligers opened this issue Jul 1, 2024 · 12 comments
Closed

[Security in Core] Core licensing service #187296

TinaHeiligers opened this issue Jul 1, 2024 · 12 comments
Assignees
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc won't fix

Comments

@TinaHeiligers
Copy link
Contributor

TinaHeiligers commented Jul 1, 2024

Part of #186574
The security plugin depends on the licensing service.
Once security implementations move to Core, this dependency won't be possible.

Moving licensing to Core would solve this, however, security is under the proprietary license, while Core is under the dual license.

Scope:

  1. figure out what to do about licensing and agree on a plan (Phase 2)
  2. implement the plan (Phase 3)
@botelastic botelastic bot added the needs-team Issues missing a team label label Jul 1, 2024
@TinaHeiligers TinaHeiligers added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Jul 1, 2024
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jul 1, 2024
@TinaHeiligers TinaHeiligers changed the title Core licensing service (some Security Services depend on licensing) (issue not created yet) [Security in Core] Core licensing service Jul 1, 2024
@pgayvallet pgayvallet added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Jul 2, 2024
@elasticmachine
Copy link
Contributor

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

@pgayvallet
Copy link
Contributor

Pinging the security team for visibility

@pgayvallet
Copy link
Contributor

I will try to summarize, please correct me if anything is wrong or incomplete:

So, the primary purpose of moving the licensing APIs to Core is that it's a prerequisite to move parts of the security plugin's implementation into Core.

ATM, for the parts of the security APIs we're exposing from Core, we're using a registration pattern, so that the security plugin registers its implementation during setup, allowing Core to re-expose it to consumers during start (and only during start, we can't -by design- expose them during setup with that approach).

I however doubt that we will be able to follow the same patterns for the licensing plugin / API, especially given security depends on it. Having the same delegation / registration at setup, constraining us to only be able to internally use and re-expose them during start, will likely become problematic (especially if we try applying the same patterns for other components/features we'll be trying to integrate into Core).

So the more I think about it, the more I believe we will have no other choice than effectively moving the licensing plugin's implementation into Core (or at least utilizing it directly, it could also be done by moving the implementation in some package that Core would import).

The question emerging from there is simply the... licensing of licensing (funny, right?)

Atm licensing is an x-pack plugin. And atm, 100% of Core's code is under our dual licensing (aka the old "OSS"). If we want to move the licensing implementation into Core, I think I only see two options:

  • Switching the code of the licensing implementation from single to dual licensing (xpack->"oss")
  • having the "Core licensing implementation" package being single-licensed (xpack)
    • which, FWIW, introduces a precedent, as atm, 100% of Core is "OSS"

And I'm not sure who would to able to take the decision on either of those options. @lukeelmers do you have any idea?

@lukeelmers
Copy link
Member

lukeelmers commented Jul 2, 2024

And I'm not sure who would to able to take the decision on either of those options. @lukeelmers do you have any idea?

Part of this is a legal/product question that I'm also wondering about in relation to our sustainable architecture initiative -- I will dig into this further and see if I can get some clarity on the consequences of moving some single-licensed code to being dual-licensed.

@lukeelmers
Copy link
Member

@pgayvallet @TinaHeiligers Okay, after doing some digging, I can confirm that any code which requires non-free (Gold+) licenses must remain single-licensed under ELv2. We can discuss more about the "why" internally, but I think this means that given the current structure of the repo, we'd need to keep the licensing plugin under x-pack.

That said, if we were to revisit the structure of the repository as we have been discussing and handle our license differentiation without x-pack, it may be possible to still have this live as a part of core in the long-run. (e.g. if we did something like src/platform/core/ELv2 or whatever we'd call it).

@pgayvallet
Copy link
Contributor

it may be possible to still have this live as a part of core in the long-run. (e.g. if we did something like src/platform/core/ELv2 or whatever we'd call it).

Yeah, this is our most viable and realistic option now (we will likely need it for security too)

@TinaHeiligers
Copy link
Contributor Author

we will likely need it for security too

@pgayvallet for all of security?

If so, we'll need to figure out what to do with packages/core/security if we're going to move the implementation to the package as originally planned.

@pgayvallet
Copy link
Contributor

for all of security?

For anything implementation-related (so any concrete code) that currently lives in the security plugin, given Luke's answer.

@TinaHeiligers
Copy link
Contributor Author

I propose closing this given the reason in #187296 (comment).

We can revisit it at a later stage.

@TinaHeiligers
Copy link
Contributor Author

TinaHeiligers commented Aug 29, 2024

Reopening to discuss if we could expose the apis from the licensing lifetime contracts is possible and if that is enough for now It would be similar to how we expose authc and audit logging from core.security, and the User Profile from core.userProfile

@SiddharthMantri Let me know if you want to chat more about the details.

@TinaHeiligers
Copy link
Contributor Author

We discussed if there's any benefit for plugin developers in exposing the licensing APIs from core and there isn't.
Closing this issue. We can reopen at a later stage.

@TinaHeiligers TinaHeiligers added won't fix and removed Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! labels Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc won't fix
Projects
None yet
Development

No branches or pull requests

5 participants