fabric8-console icon indicating copy to clipboard operation
fabric8-console copied to clipboard

not sure if the new k8s client and websocket stuff detects properly stale tokens (meaning we should redirect to the login page)

Open jstrachan opened this issue 10 years ago • 5 comments

so that if a browser is left open for a while it keeps kinda working even though there's no way to connect back to the k8s REST service etc

jstrachan avatar Dec 17 '15 09:12 jstrachan

We should push for refresh tokens probably. Having to relogin is a bit rubbish tbh.

jimmidyson avatar Dec 17 '15 10:12 jimmidyson

Yeah, refresh token would be good, in the meantime we should handle the token expiry better, will take a look today.

gashcrumb avatar Dec 17 '15 12:12 gashcrumb

There's keepalive requests being made by hawtio-oauth, if one of these fail it it'll bump you over to the login page:

[hawtio-os-oauth] keepaliveStatus: 200 hawtio-core.js:81 [hawtio-os-oauth] keepalive response: Object {kind: "User", apiVersion: "v1", metadata: Object, identities: Array[1], groups: null} hawtio-core.js:81 [hawtio-os-oauth] keepaliveStatus: 200 hawtio-core.js:81 [hawtio-os-oauth] keepalive response: Object {kind: "User", apiVersion: "v1", metadata: Object, identities: Array[1], groups: null}

unless I suppose if the console stops sending these after some time...

gashcrumb avatar Dec 17 '15 14:12 gashcrumb

Ah, with longer times we try and poll less frequently... Could be a bug in there then.

gashcrumb avatar Dec 17 '15 14:12 gashcrumb

Hmm, that code seemed okay, though if we don't calculate a valid keepalive time it defaults to polling every 10 minutes, I tuned this down to 10 seconds in this commit -> https://github.com/hawtio/hawtio-oauth let's see if that helps.

gashcrumb avatar Dec 17 '15 14:12 gashcrumb