Act as an OIDC IdP to access to private repos #23670
eriksw
started this conversation in
Suggest an Idea
Replies: 2 comments 2 replies
-
|
Thanks for submitting the idea. Quick questions:
|
Beta Was this translation helpful? Give feedback.
1 reply
-
|
One problem we have is that we want to remove the use of all shared secrets from the Renovate App at runtime. In other words the only secrets passed to the running container will be user-scoped ones, such as the app token (scoped to their org) or any secrets configured in hostRules. Wouldn't OIDC as described require having a single private key passed to every job? i.e. if one malicious user can compromise it then they could compromise other user secrets? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Tell us more.
I want to allow Renovate to access private repos without needing to make any long-lived cloud provider credentials such as Google Service Account Keys or AWS IAM User Access Keys. This can be accomplished if Renovate acts as an OpenID Connect (OIDC) Identity Provider (IdP) because providers like Google Cloud, AWS, and more support acting as an OIDC Relying Party (RP).
This would be useful because it is generally regarded as a best practice to disable the ability to create Service Account keys at the Google Cloud organization level using "Organization Policy" controls, and it'd be nice to not have to make exceptions to that to allow Renovate to check the versions of dependencies in private repos.
Here's the brief, high-level version of what would be involved:
/.well-known/...locations.To get a bit more specific:
A hostRule configuration for access to an Artifact Registry docker repo might look something like this:
The JWT signed by Renovate would probably include a few claim details like this (subsetted from what tokens issued by Github Actions include):
Specific References:
principalSet://...representing the identity provider configuration and optionally/recommended the desired attribute values. (This can get as fine-grained as you want it to.)Unfortunately, I do think there would probably need to be RP (Relying Party)-specific code in Renovate due to differing ways that you exchange the token that Renovate signs for actual credentials usable for accessing cloud provider resources. The overwhelming majority of the work would be reusable from one provider to the next, but there would almost always need to be some work done per cloud and repo type.
Lastly, I do want to make clear that this is about a lot more than just Docker dependencies. On the GCP side there's private git repositories plus all the many kinds of repos in Artifact Registry (Maven, RPM, Apt, NPM, Python, Go, probably more on the way.) On the AWS side there's all the stuff CodeArtifact supports, plus of course CodeCommit (git) and ECR (Docker).
Beta Was this translation helpful? Give feedback.
All reactions