-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oauth-openshift "invalid resource name" error due to not unescaping client_id for service account #136
Comments
I tried reverting this commit from May this year c2d7de5 since I thought that seemed to fit timewise and touched some very much related lines of code, then I rebuilt my own image after also patching the Dockerfile.rhel to use public images rather than Redhat private ones:
Finally I tagged and pushed that image into my Openshift CRC's registry and referenced that image in the Deployment for oauth-server. Again I had to resort to a bit of hackery to be able to test in time before the authentication-operator reset things back to the original state by scaling down the authentication operator to 0 replicas, then edit oauth-server deployment, then quickly test. But I was able to login successfully in ArgoCD when that oauth-server image was deployed and the request logged in the oauth-server log looks the same like the one mentioned before that caused an error.
So something definitely changed behavior either directly because of that commit or commits in the https://github.com/openshift/osin library since that was updated in that commit. |
I'm not sure how but some auto-update of the Openshift authentication operator and oauth-openshift seems to have made this problem disappear for me. I haven't found anything specific in the commit logs I have looked at that would explain this but now I do not get the aforementioned errors. If someone happens to know what the underlying problem and fix was here it would be good to know about it. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
When configuring ArgoCD to use Openshift OAuth for authentication the login works but the final code exchange fails like this inside oauth-openshift
After much digging I figured out that verbosity level 10 would dump HTTP traffic in the logs and how to increase the log level of oauth-openshift to --v=10 instead of --v=2. What I did was to scale down the
authentication-operator
Deployment in theopenshift-authentication-operator
namespace to 0, then manually edited theoauth-openshift
Deployment in theopenshift-authentication
namespace to use --v=10.I have not figured out what exactly has changed here but having ArgoCD do Openshift OAuth login worked fine for me about 6 months ago. After having looked quite a lot at ArgoCD and ArgoCD Operator it seems to in the end boil down to a problem in Openshift OAuth itself.
Expected result
The final code exchange works ok.
Actual result
As you can see from the log snippet above it looks like the GET request has query parameters URI escaped with a single level of escaping (which is expected and appropriate). But the error makes it seem like oauth-openshift does not unescape the
client_id
parameter at all.Questions
client_id
specifically should not be URI escaped by the client making the request? I.e. do you deem it correct behavior that Openshift OAuth should NOT do one level of URI unescaping on the client_id?Related issues
The text was updated successfully, but these errors were encountered: