Giter VIP home page Giter VIP logo

Comments (11)

gabemontero avatar gabemontero commented on July 21, 2024 1

from jenkins-plugin.

gabemontero avatar gabemontero commented on July 21, 2024

Yep, I see this as well putting in a bad token.

Cross referencing with our extended test, the extended test for failure supplies a bad cluster api url to confirm test failure. We don't have a test that supplies a bad token in jenkins_pipeline.go.

from jenkins-plugin.

gabemontero avatar gabemontero commented on July 21, 2024

Perhaps the http get of healthz/ready does not require a valid token ?!?! I have verified we are passing in the configured (invalid) token.

I'll experiment with some other uri endpoints

from jenkins-plugin.

gabemontero avatar gabemontero commented on July 21, 2024

Yep, that appears to be the case. I added an equivalent of oc get is -n openshift and that produced an auth error.

Conversely, if I go with the default token (the serviceaccount's token), the oc get is -n openshift succeeds.

@bparees - does rest call equivalent to oc get is -n openshift seem to you like a valid rest call to determine whether the supplied token carries the necessary authorization ?

from jenkins-plugin.

bparees avatar bparees commented on July 21, 2024

is there no generic endpoint we can hit to simply validate the token? @liggitt @deads2k

from jenkins-plugin.

gabemontero avatar gabemontero commented on July 21, 2024

there is the "/oapi/v1/users/~" endpoint, but it is messier to access that one from the java restclient

from jenkins-plugin.

bparees avatar bparees commented on July 21, 2024

my worry w/ the openshift NS suggestion is the day someone decides they don't want an openshift namespace.

from jenkins-plugin.

gabemontero avatar gabemontero commented on July 21, 2024

ok, i managed to hit "/oapi/v1/users/~" with relatively little pain from the java restclient after all ... pending endpoint correction from @liggitt @deads2k let's go with that

i'll submit pull momentarily

from jenkins-plugin.

liggitt avatar liggitt commented on July 21, 2024

/apis will return 401 with a bad token, and exists in both openshift and kube servers

from jenkins-plugin.

gabemontero avatar gabemontero commented on July 21, 2024

@livelace if you can try out the pre-release version of this change at https://ci.openshift.redhat.com/jenkins/view/All/job/openshift-pipeline-plugin/36/s3/download/openshift-pipeline.hpi

from jenkins-plugin.

livelace avatar livelace commented on July 21, 2024

@gabemontero It works, thanks! :)

from jenkins-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.