Skip to content

Viewing Canvas workpads causes incorrect session timeout #56157

@legrego

Description

@legrego

Kibana version: Tested on 7.5.1 and 7.5.3, likely exists in other versions.

Describe the bug:
When Kibana is configured to use an auth provider which leverages the ES Token service (essentially anything except the basic auth provider), then viewing a Canvas workpad will eventually fail for users due to an expired session.

Kibana's security plugin is responsible for automatically refreshing these token-backed sessions, but the /api/interpreter/fns route has special handling which is preventing the security plugin from sending the updated session cookie to the end-user.

When viewing a Canvas workpad on auto-refresh, often the only request made to Kibana is /api/interpreter/fns. Since this is the only route getting hit, and this route does not send the cookie correctly, we end up ending the user's session.

Steps to reproduce:

  1. Configure Kibana with the token auth provider, or similar provider
  2. Create Canvas workpad, set to auto-refresh. It's important that this workpad does not use a Timelion data source.
  3. Wait 20 minutes
  4. Notice the workpad fails to update after ~20 minutes, and the user session is terminated.

Expected behavior:
The session should be refreshed via a Set-Cookie response header, like all other Kibana routes.

Any additional context:
https://discuss.elastic.co/t/losing-a-session-in-a-canvas

Big thanks to Dennis_Rietvink for reporting and helping diagnose the issue.

Workaround
Including a timelion expression as part of your workpad should workaround this issue, as this calls a different endpoint, which correctly handles session updates.

/cc @elastic/kibana-security

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:CanvasTeam:PresentationPresentation Team for Dashboard, Input Controls, and Canvas t//bugFixes for quality problems that affect the customer experienceimpact:highAddressing this issue will have a high level of impact on the quality/strength of our product.loe:needs-researchThis issue requires some research before it can be worked on or estimated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions