-
Notifications
You must be signed in to change notification settings - Fork 12
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
Inject secrets from provider:"secret"
tags
#252
Conversation
Following up on #252, this allows `DefaultCheck` to safely and accurately handle secrets application. The new signature for `DefaultCheck` is easier to extend without additional breaking changes. The downside to this design is that this makes `DefaultCheck` special. I think it's worth living with that until #212 is resolved. I'd like to merge shortly after #252 (and before #252 is released) so that user's don't rely on #252 injecting secrets when `CustomCheck` is implemented and `DefaultCheck` is not called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't claim to be super familiar with this code, but it looks mostly correct to me. There are a few possible small bugs to check though.
Part of #251 Right now, secrets are communicated in the schema and applied via SDKs. This doesn't consistently work as expected for explicit providers.
This was added in go1.22, while we still support go1.21.
3acd5ab
to
d3c9b59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's still a linter error, and maybe a test case or two to add, but I think you've covered all the potential bugs. So adding my stamp so you can land it whenever you're done.
also many thanks for all the explanations/answers to my n00b questions 🙇 |
fdef94a
to
cd96ba2
Compare
cd96ba2
to
4a5e543
Compare
Following up on #252, this allows `DefaultCheck` to safely and accurately handle secrets application. The new signature for `DefaultCheck` is easier to extend without additional breaking changes. The downside to this design is that this makes `DefaultCheck` special. I think it's worth living with that until #212 is resolved. I'd like to merge shortly after #252 (and before #252 is released) so that user's don't rely on #252 injecting secrets when `CustomCheck` is implemented and `DefaultCheck` is not called.
Following up on #252, this allows `DefaultCheck` to safely and accurately handle secrets application. The new signature for `DefaultCheck` is easier to extend without additional breaking changes. The downside to this design is that this makes `DefaultCheck` special. I think it's worth living with that until #212 is resolved. I'd like to merge shortly after #252 (and before #252 is released) so that user's don't rely on #252 injecting secrets when `CustomCheck` is implemented and `DefaultCheck` is not called.
Following up on #252, this allows `DefaultCheck` to safely and accurately handle secrets application. The new signature for `DefaultCheck` is easier to extend without additional breaking changes. The downside to this design is that this makes `DefaultCheck` special. I think it's worth living with that until #212 is resolved. I'd like to merge shortly after #252 (and before #252 is released) so that user's don't rely on #252 injecting secrets when `CustomCheck` is implemented and `DefaultCheck` is not called. Rational for the change: Ideally, most users will not need to implement check. By design, not implementing `CustomCheck` has the same behavior as implementing check with `return infer.DefaultCheck(...)`. If users do implement `CustomCheck`, then we don't want to make any assumptions about what behavior they want. This includes not applying defaults and not injecting secrets.
Following up on #252, this allows `DefaultCheck` to safely and accurately handle secrets application. The new signature for `DefaultCheck` is easier to extend without additional breaking changes. The downside to this design is that this makes `DefaultCheck` special. I think it's worth living with that until #212 is resolved. I'd like to merge shortly after #252 (and before #252 is released) so that user's don't rely on #252 injecting secrets when `CustomCheck` is implemented and `DefaultCheck` is not called. Rational for the change: Ideally, most users will not need to implement check. By design, not implementing `CustomCheck` has the same behavior as implementing check with `return infer.DefaultCheck(...)`. If users do implement `CustomCheck`, then we don't want to make any assumptions about what behavior they want. This includes not applying defaults and not injecting secrets.
Following up on #252, this allows `DefaultCheck` to safely and accurately handle secrets application. The new signature for `DefaultCheck` is easier to extend without additional breaking changes. The downside to this design is that this makes `DefaultCheck` special. I think it's worth living with that until #212 is resolved. I'd like to merge shortly after #252 (and before #252 is released) so that user's don't rely on #252 injecting secrets when `CustomCheck` is implemented and `DefaultCheck` is not called. Rational for the change: Ideally, most users will not need to implement check. By design, not implementing `CustomCheck` has the same behavior as implementing check with `return infer.DefaultCheck(...)`. If users do implement `CustomCheck`, then we don't want to make any assumptions about what behavior they want. This includes not applying defaults and not injecting secrets.
This PR has been shipped in release v0.21.0. |
This PR add explicit secret injection to
infer
. This is necessary for explicit providers in YAML, which does not correctly apply schema based secrets to provider config. This is what the bridge does.To guard against misbehaved or partially implemented SDKs, I have also added explicit secret injection to resources.
Fixes #251