Commit Graph

29 Commits (0.20.0)

Author SHA1 Message Date
David 11c1b68cfe
chore: remove refs to deprecated io/ioutil (#778)
Co-authored-by: guoguangwu <guoguangwu@magic-shield.com>
2024-11-06 10:46:52 +01:00
clem59170 3e261382bf
Update gcr.go
refactor indentation
2024-04-10 11:52:01 +02:00
crafa 0462d1607d Refactor GCR Credentials Handling to Support Workload Identity
This commit updates the GCR (Google Container Registry) credentials handling
in Keel's GCR extension to add support for Google Cloud's Workload Identity,
while maintaining compatibility with the existing authentication method via
the GOOGLE_APPLICATION_CREDENTIALS environment variable.

Changes include:
- Removed the `credentials` string field from the CredentialsHelper struct.
  Credentials are now determined dynamically based on the runtime environment.
- Added `readCredentialsFromFile()` and `getWorkloadIdentityTokenCredentials()`
  functions to abstract the credential reading and token obtaining processes.
- Updated `GetCredentials` method to try reading the GOOGLE_APPLICATION_CREDENTIALS
  file first, falling back to Workload Identity if necessary.
- Extended registry URL check in `GetCredentials` to support Google Container Registry (`gcr.io`) and
  Google Artifact Registry URLs (`pkg.dev`).
- Adding pubSub boolean check for activating pubSub.

These changes allow for the use of both JSON key files and Workload Identity
for GCP authentication when polling instead of using pubSub.
2024-04-10 11:15:02 +02:00
Martin Emrich 017ebbac9d Accept AWS ECR token for any AWS account ECR, might resolve #441 2020-12-30 15:39:16 +01:00
Karolis Rusenas 19facc2fe3 check for nil creds 2020-06-07 14:07:28 +01:00
Karolis Rusenas 55e342e29f updated return 2020-06-06 13:50:36 +01:00
Karolis Rusenas f526b2f87a should return an err 2020-06-06 13:50:25 +01:00
Karolis Rusenas 22ebc5b422 avoiding not initialised cred helper 2019-10-03 14:16:55 +01:00
Karolis 2e60104e80
Merge pull request #438 from spaghettifunk/aws_iam_role
Changed creation of AWS Session object
2019-09-04 11:36:53 +01:00
Davide Berdin 896c51f608 reverting changes in tests 2019-09-03 14:17:36 +02:00
Davide Berdin 43b8eb8f52 created aws session differently 2019-09-03 13:51:28 +02:00
Karolis Rusenas 06d275f5ad don't return early 2019-08-18 23:33:37 +01:00
Karolis Rusenas a5b0b147cc if creds helper couldn't return anything, don't return nil 2019-08-18 22:37:34 +01:00
Sean Clemmer cafd5aea61 Support polling GCR 2019-07-31 13:51:04 -07:00
Karolis Rusenas 84d5e3e75d removing debug info 2018-08-29 23:40:29 +01:00
Karolis Rusenas cdb190ad86 don't show errors as public images won't have any creds 2018-08-29 23:40:18 +01:00
Karolis Rusenas aad1c28d00
Merge pull request #240 from hk01-digital/feature/ecr-login-by-repo-region
feature: perform aws ecr login by repo region from registry url
2018-07-31 09:05:51 +03:00
kagahehk01 f75e7bfd46 refactor registry parsing
add test for registry parsing function
2018-07-28 21:38:06 +08:00
kagahehk01 bfdee651c8 credentialshelper: fix ecr 401 caused by secret credentialhelper, and mute error log in searching credentialhelpers 2018-07-24 00:42:02 +08:00
kagahehk01 04607b5762 - remove ecr login with default region
- fetch region from ecr repo url and login
2018-07-23 19:26:11 +08:00
Karolis Rusenas 3d97b2ed90 checking token during init 2018-04-29 22:00:31 +01:00
Karolis Rusenas 72faa5566a cache for credentials 2018-04-29 19:47:33 +01:00
Karolis Rusenas 286508d60d secret manager used as a cred helper 2018-04-28 22:01:07 +01:00
Karolis Rusenas 7fa199e29b using tracked image type 2018-04-28 22:00:52 +01:00
Karolis Rusenas b42ad8eb07 cred test 2018-04-25 22:49:16 +01:00
Karolis Rusenas 414b4a5508 cleanup 2018-04-25 22:44:45 +01:00
Karolis Rusenas 977563383c aws cred helper 2018-04-25 22:02:44 +01:00
Karolis Rusenas 963373bfc7 aws credentials 2018-04-24 22:46:16 +01:00
Karolis Rusenas 8b76743ddb generic cred helper 2018-04-24 22:46:12 +01:00