Hello everyone,
I am currently testing the (free) RoR plugin for Kibana and I am experiencing an issue with the JWT passthrough authentication.
Kibana version: Kibana 9.4.3
RoR version: 1.70.3_es9.4.3 ![]()
Kibana runs as 2 replicas in Kubernetes behind a standard Service, with round-robin load balancing between pods, no client stickiness.
Our Kibana config:
readonlyrest_kbn.store_sessions_in_index: true
readonlyrest_kbn.jwt_query_param: "jwt"
readonlyrest_kbn.sessions_refresh_after: 250
readonlyrest_kbn.cookiePass: "<redacted>"
The store_sessions_in_index: truesetting does not prevent cross-node auth failures; a pod’s write of a new established session to the sessions index is delayed and lazily-triggered upon accessing a resource. What that means is, when i go to my kibana[.]com deployment and hit a different node than the one responsible for the login, i get instantly redirected to the log out screen and the logs show an authentication failure:
[warning][plugins][ReadonlyREST][indexBasedSessionManager] Failed to decode session for SID <sid>: Session not found in index
[debug] [plugins][ReadonlyREST][indexBasedSessionManager] SID <sid> not found in in-index session storage either: giving up.
However, when i navigate to kibana[.]com/app/kibana, this triggers a write to the sessions index and the session is discovered by all nodes.
Logs capturing this bug:
12:16:50.498- session created (SID
3d1abf5a...) on node A (getTenancyId/
authenticationFacade“User request identity for a direct request” logged with this
SID).
- session created (SID
12:16:50.690,12:17:44.362,12:17:52.410- node B independently answers three separate requests carrying the same SID with “Session not found in index… giving up”, spanning over a minute after creation.
12:18:21.318- first
IndexRequest(POST /.readonlyrest_kbn_sessions/_doc/3d1abf5a...)
for this SID appears in Elasticsearch’s own ROR access log. This is ~91 seconds after the session was created.
- first
- Node A’s own
indexSessionRepositorypolling (Fetched all sessions from index, found: N) ran continuously every ~250-280ms for the entire gap and never incremented
until this write landed — confirming the delay is real, not a logging artifact.
Is this intended behaviour, or a misconfiguration on my end? Is there a way to make the initial session write synchronous (or bounded to a known maximum delay), rather than opportunistic/request-triggered on the owning node?
Thank you so much!