Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Disable api calls that uses Kibana default internal user #212

Merged
merged 2 commits into from
Nov 23, 2020

Conversation

zhongnansu
Copy link
Member

@zhongnansu zhongnansu commented Nov 23, 2020

Issue #, if available:
We have security limitations for calling ES api with kibana default user in kibana.yml, which is the kibana server role. This PR removes the affected code and propose a solution.

Description of changes:

  • disable poller, since in the backend, it has already mark every scheduled task as scueess
  • add a new Kibana API POST .../reporting/genreateReport/{reportDefinitionId}, which calls the ES API
POST .../_reports/on_demand/{reportDefinitionId}
body: {reportDefinitionId: reportDefinitionId}
  • disable all api calls to update report status
  • change .../generateReport/{reportId} from a POST request to a GET request, because this call will not generate resource to the server, it just generate reports on the fly without saving anything. But .../generateReport/{reportId} does create a new instance to the report index.
  • TODO: UI now needs to call the above new API for the following instead of old POST ..../generateReport with a request body of complete parameters.
    • Generate button from report definition detail page, and the icon download as well
    • the second API call for the "create on-demand report definition" workflow

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@davidcui1225 davidcui1225 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhongnansu zhongnansu changed the title Disable api calls using Kibana default internal user Disable api calls that uses Kibana default internal user Nov 23, 2020
@zhongnansu zhongnansu merged commit 70ad7ec into opendistro-for-elasticsearch:dev Nov 23, 2020
zhongnansu added a commit to zhongnansu/kibana-reports that referenced this pull request Dec 4, 2020
zhongnansu added a commit to zhongnansu/kibana-reports that referenced this pull request Dec 7, 2020
zhongnansu added a commit to zhongnansu/kibana-reports that referenced this pull request Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants