elastic / kibana

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

Check license on plugin setup #160348

Open JordanSh opened 1 year ago

JordanSh commented 1 year ago

Summary

Currently, the license status is checked using the <CloudPosturePage /> component, which wraps each page. However, this approach can lead to human error if not noticed during every review. To address this, it is suggested to explore checking the license during the setup stage. Currently, certain actions and initializations are performed even when the license is insufficient, which could potentially expose our APIs.

The licenseManagement plugin should be considered for setup deficiencies. This PR provides some examples of using it during the setup stage, which can serve as a learning reference.

Tasks:

elasticmachine commented 1 year ago

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

tehilashn commented 1 year ago

@JordanSh - what will happen in cases where the license changes in the same session?