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

Wrong jsonPath to get sensitive parameters with latest 1.4.0 #416

Closed
llavaud opened this issue Jun 5, 2024 · 2 comments · Fixed by #417
Closed

Wrong jsonPath to get sensitive parameters with latest 1.4.0 #416

llavaud opened this issue Jun 5, 2024 · 2 comments · Fixed by #417
Labels
bug Something isn't working is:triaged

Comments

@llavaud
Copy link

llavaud commented Jun 5, 2024

What happened?

It seems this PR #406 introduced a bug.
With an AWS IAM AccessKey, I endup with the following error, because of a wrong jsonPath (spec.forProvider.status.atProvider.secret)

cannot store sensitive parameters into params: cannot expand wildcard for xp resource: cannot expand wildcards for segments: \"spec.forProvider.status.atProvider.secret\": spec.forProvider.status: not an object"

How can we reproduce it?

  1. use the latest provider-aws-iam 1.5.0 builded with the latest upjet 1.4.0
  2. create an AWS IAM AccessKey resource and look for the reconcile error in the object status
@llavaud llavaud added the bug Something isn't working label Jun 5, 2024
@llavaud llavaud changed the title Wrong jsonPath to get sensitive parameters Breaking change with latest 1.4.0 / wrong jsonPath to get sensitive parameters Jun 5, 2024
@llavaud llavaud changed the title Breaking change with latest 1.4.0 / wrong jsonPath to get sensitive parameters Wrong jsonPath to get sensitive parameters with latest 1.4.0 Jun 5, 2024
@ulucinar
Copy link
Collaborator

ulucinar commented Jun 6, 2024

Hi @llavaud,
Thanks for reporting this issue. I've successfully reproduced it. The root cause of the issue is for resources with sensitive attributes and a non-object spec.forProvider.status or spec.initProvider.status field, the fieldpath library's ExpandWildcards errors instead of returning an empty set of expanded parameters. For more context, please refer to the description of #417.

We've prepared an upjet fix and consume it in crossplane-contrib/provider-upjet-aws#1344.

Thank you!

@ulucinar
Copy link
Collaborator

ulucinar commented Jun 6, 2024

The fix is expected with the v1.6.0 version of the provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working is:triaged
Projects
None yet
2 participants