-
Notifications
You must be signed in to change notification settings - Fork 15
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
Resource status field contains request body with sensitive data and proxy value is not considered from environment variables #39
Comments
Hey, Thank you for your contribution. To ensure that sensitive data from the response body is stored securely and not displayed in the status, you should add You can refer to the example for more details. Your secretInjectionConfigs:
- secretRef:
name: response-refresh-token
namespace: default
secretKey: extracted-token
responsePath: .body.refresh_token With this configuration, the response should be updated to look like this: Body: {"access_token":"{{response-secret:namespace:accesstoken}}","expires_in":3600,"refresh_token":"{{response-refresh-token:default:extracted-token}}","token_type":"Bearer"} This will ensure that the refresh_token is stored securely in a Kubernetes secret and not exposed in the status. Let me know if this helps! |
Hi @arielsepton, Thanks for looking into this issue. I am already using this and is writing the response to a secret. I was talking about the input itself. Spec:
Deletion Policy: Orphan
For Provider:
Body: {
"grant_type": "refresh_token",
"refresh_token": "{{ request_secret:namespace:key }}"
} The response of the secret is masked as you said but I can see the refresh token I have used in the request in the status of disposable request. Response: I tried testing the API via postman to see if this key is returned in the response but it didn't. I don't know why the key from request body is added to the response. The actual response looks like {
"access_token": "redacted",
"expires_in": "3600",
"token_type": "Bearer"
} |
Thank you for the clarification @iamshinto If I understand correctly, your Additionally, you mentioned that you are seeing an extra field in the response of the request when using |
Nevermind, the response has this field. I tested with the wrong API. Thanks again @arielsepton |
What happened?
We used disposable request to make an API call to generate access token. The provider is not considering the proxy environment variables added to the provider pod. We have created a PR #38 to read proxy from environment for the http client.
After building the provider locally with the proxy settings as descirbed in PR #38 we were able to make the API call. The disposable request is working as expected but the object status has the sensitive token data populated. Would you be so kind to look into this and mitigate this issue.
status:
How can we reproduce it?
Please use PR #38 to build and create disposable request againt any API with access token in the request body
What environment did it happen in?
Crossplane version: 14.5
Regards,
Shinto Vincent
The text was updated successfully, but these errors were encountered: