-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
NP Licensing service info endpoint #51188
NP Licensing service info endpoint #51188
Conversation
Pinging @elastic/kibana-platform (Team:Platform) |
const response = await core.http.get(this.infoEndpoint); | ||
const response = await core.http.get(this.infoEndpoint, { | ||
headers: { | ||
'kbn-system-api': 'true', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right now all calls extend user session. I missed this point in the first PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not as part of this PR, but what do you think about introducing "system calls" as a first-class setting on the core http
service? I imagine this is something we'll come across in other apps too, wherever background work is performed not related to user actions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -76,18 +77,16 @@ export class LicensingPlugin implements Plugin<LicensingPluginSetup> { | |||
); | |||
this.licenseFetchSubscription = fetchSubscription; | |||
|
|||
const license$ = update$.pipe( | |||
tap(license => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The laziness tripped me up. We didn't store license and re-fetch a new one because there are no subscribers to license$.
💔 Build Failed |
💚 Build Succeeded |
* add NP licensing service info endpoint * call licensing/info and mark it as system to prevent session update * add integration api test for licensing/info endpoint * readonly for static data!
Licensing plugin on the server side polls elasticsearch every 30 sec, to get license data. Based on the data, the plugin calculates a hash sum and injects it in the |
Summary
This PR:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers