lens icon indicating copy to clipboard operation
lens copied to clipboard

Connect to openshift cluster with OIDC

Open nadilas opened this issue 4 years ago • 7 comments

Describe the bug After installing v3.5.0 all I see in the application is: "Connecting ...", funnily the Online Status says: online

To Reproduce Steps to reproduce the behavior:

  1. Install v3.5.0 from scratch
  2. Add first cluster
  3. Open cluster
  4. See error

Expected behavior Cluster should load with the available namespace

Environment (please complete the following information):

  • Lens Version: v3.5.0
  • OS: Windows 10
  • Installation method (e.g. snap or AppImage in Linux): used latest windows installer

Logs: When you run the application executable from command line you will see some logging output. Please paste them here:

info: Update for version 3.5.0 is not available (latest version: 3.5.0, downgrade is disallowed).
error: Failed to connect to cluster namespace/cluster.address.com:443/user: 
{
   "name":"StatusCodeError",
   "statusCode":401,
   "message":"401 - {\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"Unauthorized\",\"reason\":\"Unauthorized\",\"code\":401}",
   "error":{
      "kind":"Status",
      "apiVersion":"v1",
      "metadata":{

      },
      "status":"Failure",
      "message":"Unauthorized",
      "reason":"Unauthorized",
      "code":401
   },
   "options":{
      "json":true,
      "timeout":10000,
      "headers":{
         "host":"48af61ed-33c3-4e7c-a2f8-17be18b61dc9.localhost:58202"
      },
      "uri":"http://127.0.0.1:58202/api-kube/version",
      "simple":true,
      "resolveWithFullResponse":false,
      "transform2xxOnly":false
   },
   "response":{
      "statusCode":401,
      "body":{
         "kind":"Status",
         "apiVersion":"v1",
         "metadata":{

         },
         "status":"Failure",
         "message":"Unauthorized",
         "reason":"Unauthorized",
         "code":401
      },
      "headers":{
         "cache-control":"no-store",
         "content-length":"129",
         "content-type":"application/json",
         "date":"Tue, 16 Jun 2020 10:52:48 GMT",
         "connection":"close"
      },
      "request":{
         "uri":{
            "protocol":"http:",
            "slashes":true,
            "auth":null,
            "host":"127.0.0.1:58202",
            "port":"58202",
            "hostname":"127.0.0.1",
            "hash":null,
            "search":null,
            "query":null,
            "pathname":"/api-kube/version",
            "path":"/api-kube/version",
            "href":"http://127.0.0.1:58202/api-kube/version"
         },
         "method":"GET",
         "headers":{
            "host":"48af61ed-33c3-4e7c-a2f8-17be18b61dc9.localhost:58202",
            "accept":"application/json"
         }
      }
   }
}

Additional context As far as I can see there is nothing running on localhost:58202 , is Lens supposed to start a process to listen there? Or is it a prerequisite I missed?

nadilas avatar Jun 16 '20 10:06 nadilas

Any updates?

nadilas avatar Aug 13 '20 22:08 nadilas

@nadilas Please could you test 3.6.0-beta.1 which was released today. Is this still an issue there?

nevalla avatar Aug 28 '20 09:08 nevalla

Hey @nevalla, here's the output:

StatusCodeError: 401 - {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Unauthorized","reason":"Unauthorized","code":401}

Also this little fellow shows up on startup:

error: Error: HttpError: 404 Not Found
"method: GET url: https://github.com/lensapp/lens/releases/download/v3.6.0-beta.2/latest.yml\n\nPlease double check that your authentication token is correct. Due to security reasons actual status maybe not reported, but 404.\n"

nadilas avatar Sep 01 '20 15:09 nadilas

Hey @nevalla, here's the output:

StatusCodeError: 401 - {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Unauthorized","reason":"Unauthorized","code":401}

The error indicates something is wrong with the access token?

Also this little fellow shows up on startup:

error: Error: HttpError: 404 Not Found
"method: GET url: https://github.com/lensapp/lens/releases/download/v3.6.0-beta.2/latest.yml\n\nPlease double check that your authentication token is correct. Due to security reasons actual status maybe not reported, but 404.\n"

This error seems to be some timing issue, because the new version was released just the same time you tried the. Did you aready try 3.6.0-rc.1? There was some fine-tuning made related to this issue.

nevalla avatar Sep 07 '20 13:09 nevalla

I’m logged in via the console just fine, both oc and kubectl are working alright. I am not using a token, I’m logging in usually via oc login

And yes I tried the 3.6.0-rc.1, I can reinstall tomorrow and give you feedback

nadilas avatar Sep 07 '20 16:09 nadilas

Might be related to #200, I assume this is still a problem with 4.1.4?

Nokel81 avatar Mar 24 '21 21:03 Nokel81

This also seemingly is blocking my usage of Lens, any update since?

martafolf avatar Jul 25 '22 18:07 martafolf