-
Notifications
You must be signed in to change notification settings - Fork 66
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
feat: plugins as OCI artifacts #519
feat: plugins as OCI artifacts #519
Conversation
Signed-off-by: Akash Singhal <[email protected]>
…thub.com/deislabs/ratify into plugins-as-oci-artifacts
pkg/common/plugin/download.go
Outdated
}, | ||
Cache: auth.NewCache(), | ||
Credential: func(ctx context.Context, registry string) (auth.Credential, error) { | ||
authProvider, err := authprovider.CreateAuthProviderFromConfig(nil) |
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.
TODO: what should the config look like for specifying auth for pulling plugins. Should look & feel similar to oras
store config, - but plugins might (will probably?) come from a different registry than application images
Perhaps the config should read something like
source:
reference: noelfdpo.azurecr.io/sample-plugin:v1
authProvider:
name: azureWorkloadIdentity
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.
Agreed, we need to restructure our auth config. Curious do you think customer will use same identity for plugins /artifacts / certs from keyvault or will they use different clientIds?
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.
Late follow-up: I would expect to use the same app identity here, at least in Azure
So if you pulled plugins from a different registry than runtime images: it would still be the one "Ratify" Managed Identity that has AcrPull on both the "plugin registry" and the "normal one"
…s-as-oci-artifacts
Place behind RATIFY_DYNAMIC_PLUGINS flag
wip: force failed test for dynamic plugins enabled
…s-as-oci-artifacts
Add dynamic plugins usage guide Revert unrelated BATS changes
@susanshi This is now updated to use the the Please let me know if there's anything else on my side. Thanks! |
we have finished merging all RC required PRs, this PR is good to go with a rebase, Please rebase , we will hold off any changes into the main branch to avoid this being out of date again. thanks @noelbundick-msft . |
Signed-off-by: Akash Singhal <[email protected]>
Description
What this PR does / why we need it:
Adds the ability for Ratify to download plugins from OCI artifacts as they are registered, per #499
2023-01-10 community call demo: https://youtu.be/xRo8U-ag0y0?t=3047
This eliminates the need for users to build their own Ratify image, hack the Helm chart output, etc. It's an opt-in change that doesn't break how Ratify works today, but only enhances the experience if the
RATIFY_DYNAMIC_PLUGINS=1
feature flag is enabled, andsource
is specified in the configHere's a high level overview of the experience:
1. Making a plugin available
We start by uploading a plugin to a registry as an OCI artifact.
This could be done by
noelregistry.azurecr.io/usefulplugin:v1
, and you refer to that directlyHere's an example using the
sample
verifier in the repoIf there are "off the shelf" plugins already built by community partners, this might look something like
2. Using a plugin
A new
source
property has been added for verifier and referrerstore config. If specified, Ratify willThe plugin download process uses the same authProvider(s) that the
oras
built-in store usesThis works with both flavors of config - JSON and CRD. Below are examples of both
config.json
authProvider
- defaults todockerConfig
like the ORAS pluginCRD
Other info
Ratify emits info/debug logs when downloading plugins, ex:
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration
helm upgrade
to setfeatureFlags.RATIFY_DYNAMIC_PLUGINS=true
fails in CI, so one of the test cases is currently skippedChecklist: