Skip to content
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

Add support for retrieving data from OCI registries #272

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Blokje5
Copy link

@Blokje5 Blokje5 commented Sep 16, 2020

Fixes #271

Draft PR showcasing the OCI getter that is used in Conftest. Let me know if it would be something go-getter is interested in including upstream.

Several existing registries with OCI support can be detected and the URL will recieve the oci:// protocol. Alternatively, the oci:// protocol can be added to the URL for other (e.g. private) registries. The deis/ORAS library is used to fetch the OCI artifacts from the storage.

@hashicorp-cla
Copy link

hashicorp-cla commented Sep 16, 2020

CLA assistant check
All committers have signed the CLA.

@mdeggies mdeggies changed the base branch from master to main October 23, 2020 00:53
@LittleChimera
Copy link

This would be also useful for fetching kustomize layers!
@99 @azr?

@developer-guy
Copy link

Brilliant idea @Blokje5 👏 I really would love to get involved in this PR, @Blokje5 how can I get involved?

@Blokje5
Copy link
Author

Blokje5 commented Aug 13, 2021

@developer-guy If you want you can continue working on the PR. So far it was mostly a PoC of how to include ORAS in go-getter with rather minimal tests.

I am also waiting for feedback from some of the maintainers to see what they think of including this in go-getter.

@developer-guy
Copy link

kindly ping 🙋🏻‍♂️

@phisco
Copy link

phisco commented Jun 23, 2022

+1 for this to be addressed 🙏

@developer-guy
Copy link

kindly ping ☝️

@stevehipwell
Copy link

Is anyone still planning to work on this?

@developer-guy
Copy link

definitely me ! 🙈

@stevehipwell
Copy link

@developer-guy then Cosign verification of modules pulled over OCI?

@developer-guy
Copy link

of course we can add that verification logic into the pulling process

@stevehipwell
Copy link

@developer-guy I assume that we'd need frontend (e.g. Terraform) integration to make it useful as without configuring the verification we'd just be checking that someone (anyone) ran Cosign on the binary?

@developer-guy
Copy link

we'd just be checking that someone (anyone) ran Cosign on the binary.

We can add validation by checking the subject field that points out the person who created that signature if you want more granular control over the resource you pull by limiting people you can trust.

@stevehipwell
Copy link

@developer-guy I was questioning how the subject validation data would be passed in without frontend support? E.G. How would I validate a TF module from an OCI repo was signed by a specific party without Terraform providing the capability to pass the information through to this library?

@davidspek
Copy link

This would also unblock hashicorp/terraform#31463.

@Blokje5 Blokje5 marked this pull request as ready for review May 26, 2023 15:20
@Blokje5
Copy link
Author

Blokje5 commented May 26, 2023

Ok I am working on improving this PR, given that there are now also open questions in the Terraform community. I just updated it with later versions of the ORAS lib.

I still have a few open questions:

  • How is auth generally handled in go-getter? E.g. I can handle it like conftest (loading docker config settings), but maybe there is a preference for how authentication is handled in go-getter.
  • Regarding testing: Would it be ok to setup e.g. a registry in a docker container for tests? Or is it generally preferred to use a mock implementation (e.g. like https://github.com/oras-project/oras-go/blob/main/example_test.go#L110).

cc: @picatz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support OCI registries as a source
7 participants