Skip to content
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

Update Reporting documentation: ES configuration, avoiding Token expiration #208257

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/setup/configuring-reporting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ to enable the {kib} server to have screenshotting capabilities.
* <<install-reporting-packages>>
* <<set-reporting-server-host>>

tsullivan marked this conversation as resolved.
Show resolved Hide resolved
[float]
[[reporting-elasticsearch-configuration]]
=== Elasticsearch configuration
tsullivan marked this conversation as resolved.
Show resolved Hide resolved
Reporting relies on Elasticsearch to install a mapping template for the data stream that stores reports. Ensure that Elasticsearch allows built-in
tsullivan marked this conversation as resolved.
Show resolved Hide resolved
templates to be installed by keeping the `stack.templates.enabled` setting at the default value of `true`. For more information, see
{ref}/index-management-settings.html#stack-templates-enabled[Index management settings].

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure where is a great place to organize this information; it seems to minor to place at the top. I'm open to suggestions.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see what you mean. Maybe we could add it to the end? If you agree, you can commit my suggestion on line 34. It's an anchor link for this heading to match the rest of the headings

[float]
[[grant-user-access]]
=== Grant users access to reporting
Expand Down
13 changes: 11 additions & 2 deletions docs/user/reporting/reporting-csv-troubleshooting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,14 @@ image::https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt4758e67aa
[[reporting-troubleshooting-csv-token-expired]]
=== Token expiration

To avoid token expirations, use a type of authentication that doesn't expire (such as Basic auth) or run the export using scripts that query Elasticsearch directly.
In a custom script, you have the ability to refresh the auth token as needed, such as once before each query.
A relatively common type of error seen for CSV exports is: `security_exception Root causes: security_exception: token expired`.

These happen in deployments that use token-based authentication (SAML tokens) when creating the CSV report takes longer than time allows with the authentication that is cached in report job details.
tsullivan marked this conversation as resolved.
Show resolved Hide resolved

The thing to note about this type of error is that the deployment is stable, it's just the size of a requested report is too large to complete within the time allowed by the authentication token available to the Reporting task.
tsullivan marked this conversation as resolved.
Show resolved Hide resolved

==== Avoiding token expiration
Copy link
Contributor

@wajihaparvez wajihaparvez Jan 24, 2025

Choose a reason for hiding this comment

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

I think this heading is causing the build to fail. I've changed the heading level to see if it works.


* You can work around this error by creating smaller reports: instead of one report covering a large time range, create multiple reports that cover segmented time ranges.
tsullivan marked this conversation as resolved.
Show resolved Hide resolved
* Another workaround would be to increase `xpack.security.authc.token.timeout`, which is set to `20m` by default.
tsullivan marked this conversation as resolved.
Show resolved Hide resolved
* To avoid token expirations completely, use a type of authentication that doesn't expire (such as Basic auth) or run the export using scripts that query Elasticsearch directly.
Copy link
Member Author

Choose a reason for hiding this comment

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

I copied this text directly from the GH issue, so the word choices are probably not the best in its first draft.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks Tim! I've suggested a few changes for readability

tsullivan marked this conversation as resolved.
Show resolved Hide resolved
Loading