Skip to content
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

OAuth2 client CRD metadata issue #71

Closed
taras-strypko opened this issue Jun 3, 2021 · 2 comments · Fixed by #72 or ory/k8s#277
Closed

OAuth2 client CRD metadata issue #71

taras-strypko opened this issue Jun 3, 2021 · 2 comments · Fixed by #72 or ory/k8s#277

Comments

@taras-strypko
Copy link

taras-strypko commented Jun 3, 2021

Hi folks,

Any reason why in recent release metadata type in hydra.ory.sh_oauth2clients.yaml has changed from object to byte string?

Expected:

   metadata:
      description: Metadata is abritrary data
      type: object

Actual:

   metadata:
      description: Metadata is abritrary data
      format: byte
      type: string

The only way I found to set object there is to base64encode the json string. But, in our case it breaks IDP, as we should do base64 decoding there.
And, it also seems that Hydra /clients endpoint didn't change in that perspective - metadata is still an object.

Previously, we were able to specify it in our yaml like this:

metadata:
    type: internal

And get response from hydra with appropriate object:

 {
   ...
   metadata: {
       'type': 'internal'
   }

And now if we want to specify object, we specify base64 encoded json string in yaml:

metadata: eyJ0eXBlIjoiaW50ZXJuYWwifQ==

And we get it as-is from hydra /clients endpoints:

 {
   ...
   metadata: "eyJ0eXBlIjoiaW50ZXJuYWwifQ=="
 }

Please, let me know if it was done purposely or is maybe some auto-generation issue?
I can do the PR, just let me know if I'm missing some puzzle here.

@colunira @aeneasr @Demonsthere

@Demonsthere
Copy link
Collaborator

Hello there. If I see correctly this was changed in #68 when we updated the crd to match new openAPI specs. The crd is auto generated from code by kubebuilder. IMHO we would need to specify that it an object type with kubebuilder annotations and regenerate the crd

romanlytvyn added a commit to romanlytvyn/hydra-maester that referenced this issue Jun 3, 2021
Demonsthere added a commit that referenced this issue Jun 4, 2021
fix: oauth client metadata as object in CRD (#71)
aeneasr pushed a commit to ory/k8s that referenced this issue Jun 4, 2021
@romanlytvyn
Copy link
Contributor

@Demonsthere @aeneasr Would it be possible to release a new maester image version along with updated helm chart?
This issue is currently blocking us from upgrading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants