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

Feat/update secrets on expected response #79

Conversation

arielsepton
Copy link
Member

Prevent Secret Creation/Update on Unexpected Response in DisposableRequest

Overview

This PR addresses an issue where DisposableRequest resources were incorrectly updating secrets even when the API response did not match the expectedResponse condition. The expected behavior is that secrets should only be created or updated when the API response passes the expectedResponse check.

Currently, if the response is unexpected, the DisposableRequest does not become ready, but secret injection still occurs, resulting in invalid or incomplete data being injected into the secret. This behavior is problematic because it can lead to unintended or incorrect secret values being propagated.

Changes Made

  • Updated the functionality to ensure that secret injection only occurs when the response passes the expectedResponse check.

This change ensures that secrets will only be created and updated when the response is valid and meets the criteria specified by the user in expectedResponse.

Fixes #78

I have:

  • Read and followed Crossplane's [contribution process].
  • Run make reviewable test to ensure this PR is ready for review.

Ariel Septon added 2 commits January 3, 2025 20:44
@arielsepton arielsepton merged commit b88c356 into crossplane-contrib:main Jan 3, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

secretInjectionConfig applied when expectedResponse is false
1 participant