[File Data Visualizer] Fixing security plugin use in filebeat config generation#98264
Conversation
|
Pinging @elastic/ml-ui (:ml) |
peteharverson
left a comment
There was a problem hiding this comment.
Tested and LGTM. Just left a minor comment!
| await ml.dataVisualizerFileBased.startImportAndWaitForProcessing(); | ||
|
|
||
| await ml.testExecution.logTestStep('creates filebeat config'); | ||
| await ml.dataVisualizerFileBased.selectCreateFileBeatConfig(); |
There was a problem hiding this comment.
Nit - Filebeat is one word, so this should be selectCreateFilebeatConfig I think.
| }); | ||
| }, | ||
|
|
||
| async selectCreateFileBeatConfig() { |
There was a problem hiding this comment.
Nit - Filebeat is one word, so this should be selectCreateFilebeatConfig I think.
| > { | ||
| public setup() {} | ||
| public setup(core: CoreSetup, plugins: FileDataVisualizerSetupDependencies) { | ||
| setSetupServices(plugins); |
There was a problem hiding this comment.
@elastic/kibana-security Would it be possible to expose authc on start as well as setup? File data visualizer uses authc outside of plugin setup.
@jgowdyelastic From my understanding, setup services should only be used during setup and not after the plugin has started.
There was a problem hiding this comment.
@nreese No objections from me. IMO the services exposed by authc are more appropriate for the start phase anyway
There was a problem hiding this comment.
authc is just used here to get the current username.
@elastic/kibana-security what is the correct way to get the current user at runtime?
There was a problem hiding this comment.
authc.getCurrentUser() is the best way to get the current user
There was a problem hiding this comment.
@legrego is this something that could be done for 7.13?
If not, I think i'll have to keep this change as is 7.13 and change it for future versions once authc is available.
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
|
Closing in favour of #98312 |
The file beat config generator requires the security setup contract, but was incorrectly using the start contract.
This PR separates the file data visuaizer plugin's setup and start dependencies so the correct
securityis used.Adds a basic functional test to ensure the flyout opens correctly when the link is clicked.