elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.6k stars 8.21k forks source link

[discuss] Adding a new Core `encryption` service #180867

Open pgayvallet opened 6 months ago

pgayvallet commented 6 months ago

Discussion started in https://github.com/elastic/kibana/issues/178304:

We were discussing, a few weeks ago with @azasypkin, about how nice it would be to have a centralized way to manage encryption within Kibana. Something like an encryption service that could define a master key that consumers needing to use encryption could use as a base for their own keys (while also exposing the corresponding APIs to encrypt/decrypt based on our needs). It would allow to avoid manually defining the keys for all parts of Kibana that need to use encryption, (while still allowing the option for customers that really need/want it).

I'm opening this issue to discuss about what this new encryption service could look like, in term of features, responsibilities and APIs.

elasticmachine commented 6 months ago

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

elasticmachine commented 6 months ago

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

pgayvallet commented 6 months ago

cc @azasypkin @legrego and more globally @elastic/kibana-security, curious to have your thought on this, given you're probably all have a better vision than we do on what should a global/core encryption service look like.

pgayvallet commented 6 months ago

Just from our previous discussions, in terms of what the service could help us with:

What did I forget?

legrego commented 6 months ago

@pgayvallet your list looks good to me. To make Centralized "master" encryption key explicit, this would currently cover: 1) Session encryption 2) ESO encryption 3) Reporting encryption

One other use case I thought of is user preferences. I fully expect that solution teams will eventually need a way to securely store user-specific settings. Having a core encryption service would facilitate this as well.

azasypkin commented 6 months ago

What did I forget?

The list seems to cover the majority of the benefits I can think of at the moment, thanks! The only two things that might be worth mentioning explicitly, even though it's implied, are that 1) we'll hopefully have a single approach to rotate the encryption keys (declaratively via config and programmatically via APIs) and 2) detect encryption misconfigurations more easily.

I fully expect that solution teams will eventually need a way to securely store user-specific settings. Having a core encryption service would facilitate this as well.

++, I've already heard about the use cases that could benefit from this (e.g., user-level integrations with external systems like ChatGPT or CoPilot that might require us to store user-specific external credentials).

legrego commented 6 months ago

Next steps from our latest Core/Security sync:

We agreed that @elastic/kibana-security would produce an initial RFC, with Core contributing support for the API design.

pgayvallet commented 6 months ago

@legrego do you know already would be on charge of the RFC in the Security team? I'd gladly be the main contact point on Core's side.

legrego commented 6 months ago

@legrego do you know already would be on charge of the RFC in the Security team? I'd gladly be the main contact point on Core's side.

@pgayvallet no, we haven't planned this work yet. Thanks for offering to be our point of contact, we'll be sure to coordinate with you