-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
ClientID cannot be specified by user with Hydra v2.0.1 (incompatible with v2) #117
Comments
Hello there, |
I did very to hit correct end point. I started suddenly getting this error probably after getting a hydra chart update. My logs clearly show same error Sample of a failing request is below
|
I'm seeing this error too. My Hydra Maester logs look like:
And the corresponding Hydra logs look like:
Seems like Hydra Maester is trying to I have Hydra Maester and Hydra both installed with apiVersion: hydra.ory.sh/v1alpha1
kind: OAuth2Client
metadata:
name: oauth2-client-matching-service
spec:
grantTypes:
- client_credentials
scope: serviceToService:*
metadata:
serviceName: matching-service
secretName: oauth2-client-matching-service |
@yasha-spare Do not use Hydra Maester for now. it is clearly out of sync with the Hydra APIs in the latest Helm. Just register your clients manually by running the curl I posted |
Ah, is it actually the case that Hydra Maester just doesn't work with Hydra 2? Can any maintainers comment ... @Demonsthere or @aeneasr maybe? |
My logs indicated it is pretty clearly the case ... actually had a log saying client_id cannot be set manually |
Mine suggest that too (see logs above), but I also noticed this log FWIW, I'm happy to hop on a video call to debug together, if that would help for any maintainers looking at this. |
Yes, it is no longer supported to set the client ID. |
Yeah, I know with Hydra v2 you can't provide your own client ids, and it does seem that's what Hydra Maester is still trying to do. What's not clear to me is whether or not there's some way to make Hydra Maester work with Hydra v2? Or does it only work with Hydra v1? |
Hello there, |
We always accept contritbutions though :) :) |
Cool, ty for confirming, and totally get that there's always a lack of dev resources :) Spoke with my team today, we considered taking this on and pushing a contribution upstream, but ultimately decided against it - we don't have the dev resources either! Would take us awhile to ramp up as we aren't a Go shop, have no experience with writing K8s CRDs/controllers, no experience with kubebuilder, etc. If anyone else is curious about our workaround/Hydra Maester alternative:
|
As long as the k8 secret doesnt exist already, when you specify the secretName in the CR, hydra will create you a random client_id and client_secret which will then be saved to the k8 secret (named whatever you specified) so it is still possible to use the maestor with v2 as long as you dont mind what the client_id/secret are |
This is quite precious tip. Thanks. |
I assume in this context "new kubebuilder" refers to updating kubebuilder (and the controller runtime). And "API changes" refer to updating the Hydra client libs (and perhaps some minor schema changes to the CRs, eg. remove the ability to configure client ids). If this the above is the case I should be able to quickly bang out the changes (k8s and go is kind of my thing). Got to say I was quite surprised to see the hydra operator is a community maintained project, I acknowledge the resource constraints Ory corp is under but don't sleep on Kubernetes integration. |
Yeah, i mean we should update kubebuilder to the newest version, and work on refactoring the code into a |
Now with v2.2.0 this should work again right? |
Correct |
Sorry, this is hydra-maester |
Im running hydra-maester v0.0.28 with hydra 2.1.0 and that seems to work fine. Hydra-maester 0.29 and above have removed support for this. |
With Hydra 2.2.0 we can specify the ID again. However, if you try this today you will hit this error:
Which explicitly errors when the client ID is set, but not found. Because it assumes setting client ID is not allowed:
|
Maester 0.0.28 works fine with 2.2.0 wrt this specific issue. |
Preflight checklist
Describe the bug
I deploy Hydra v2.0.1 to k8s via Helm and I really love the idea to create OAuth2 clients via a CR.
However, with Hydra v2 it is no longer possible to change
on Hydra side:
Reproducing the bug
Deploy Hydra > v.2.0.0 and create a OAuth2Client CR for reconciliation by Hydra-Maester
Relevant log output
No response
Relevant configuration
No response
Version
v0.0.26
On which operating system are you observing this issue?
No response
In which environment are you deploying?
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: