hawtio / hawtio-oauth

OAuth integration plugins for hawtio 2.x
Apache License 2.0
6 stars 14 forks source link

Hawtio becomes unresponsive - osOauth continuously fetching user profile #22

Closed saiello closed 2 years ago

saiello commented 3 years ago

I bumped into this problem installing hawtio-online through its operator, but I was able to reproduce with hawtio-oauth and CRC.

To reproduce

  1. Start crc

  2. Increase the accessTokenMaxAgeSeconds

apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
  name: cluster
spec:
  identityProviders:
  - htpasswd:
      fileData:
        name: htpass-secret
    mappingMethod: claim
    name: developer
    type: HTPasswd
  tokenConfig:
    accessTokenMaxAgeSeconds: 63072000
  1. Configure Hawtio-oauth example to use CRC

  2. Start Hawtio-oauth

    KUBERNETES_MASTER=`oc whoami --show-server` yarn start --sourcemap 

Result

After a successful login, keepalive starts firing request against openshift user profile api and eventually the browser page become unresponsive.

GET https://api.crc.testing:6443/apis/user.openshift.io/v1/users/~ net::ERR_INSUFFICIENT_RESOURCES

Root Cause

The root cause seems to be the $interval of angularJS with very high interval value.

In this case keepalive has been started with an interval value of ~15768000 ( 63072000 / 4 ).