fix(737): handle credentials resolution correctly#1191
Conversation
#### What this PR does / why we need it Credentials error handling from #1191 #### Which issue(s) this PR fixes Contributes: open-component-model/ocm-project#737 --------- Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
c28d940 to
b39efdd
Compare
4af4fcf to
26bbdb5
Compare
30d1c05 to
d7c359a
Compare
e86cfc6 to
fa8567a
Compare
jakobmoellerdev
left a comment
There was a problem hiding this comment.
could we add a test case for the fallback behavior somehow? apart from that lgtm
I tried but I couldn't break |
|
Had to update the credentials implementation to behave as expected |
4cfd40a to
85f6568
Compare
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
8f1b4c1 to
bfe04be
Compare
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 14926537 | Triggered | Generic High Entropy Secret | bfe04be | cli/cmd/cmd_test.go | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
48101a4 to
555e79a
Compare
|
6267a33 to
beb5c32
Compare
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
beb5c32 to
3c091b0
Compare
<!-- markdownlint-disable MD041 --> #### What this PR does / why we need it After the changes in #1191, the credential resolution is broken as we attempt to resolve credentials with the consumer identity returned for ctf from dockerconfig credential repository in the fallback logic to any consumer identity type of our credential resolution. This is a preliminary fix for the issue, unblocking us. A broader scoped issue will be created as follow up. #### Which issue(s) this PR fixes <!-- Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Contributes to open-component-model/ocm-project#737 --------- Signed-off-by: Fabian Burth <fabian.burth@sap.com>
On-behalf-of: SAP matthias.bruns@sap.com
What this PR does / why we need it
During debugging issues with mounting .ocmconfig files into Docker containers, we had hard time finding the real root case for the issue.
In case we don’t find Docker a credential helper, but the config directs to a docker credential helper, we should fall back to a plain credential plugin / helper.
Which issue(s) this PR fixes
Contributes: open-component-model/ocm-project#737