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

Hotfix: only verify authentication to registry if creds exist #1893

Merged
merged 15 commits into from
Jul 10, 2023

Conversation

Noxsios
Copy link
Contributor

@Noxsios Noxsios commented Jul 7, 2023

Description

Fixes what I broke.

This does re-architect some portions of OrasRemote and locks it down more. Everything in *remote.Registry is no longer exposed to outside usage and users of this remote client are restricted to the public receiver methods written in pkg/oci.

The context is now private as it really should not be edited outside of private receivers within OrasRemote.

During the writing of this PR I found out that ORAs already handles scopes at the request level and there is zero need to handle scopes yourself. I have not checked if I never had to do this, or if ORAs updated.

Related Issue

Fixes #1881
Fixes #1795
Fixes #1821

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

@Noxsios Noxsios linked an issue Jul 7, 2023 that may be closed by this pull request
@netlify
Copy link

netlify bot commented Jul 7, 2023

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 70f6657
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/64aa4bbe54d767000842a5a2

mjnagel
mjnagel previously approved these changes Jul 7, 2023
Copy link
Contributor

@mjnagel mjnagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳

Copy link
Contributor

@Racer159 Racer159 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Racer159 Racer159 merged commit 8039eb8 into main Jul 10, 2023
@Racer159 Racer159 deleted the 1881-zarf-02800281-unauthenticated-oci-registry-error branch July 10, 2023 14:58
cmwylie19 pushed a commit that referenced this pull request Jul 10, 2023
## Description

Fixes what I broke.

This does re-architect some portions of OrasRemote and locks it down
more. Everything in `*remote.Registry` is no longer exposed to outside
usage and users of this remote client are restricted to the public
receiver methods written in `pkg/oci`.

The context is now private as it really should not be edited outside of
private receivers within OrasRemote.

During the writing of this PR I found out that ORAs already handles
scopes at the request level and there is zero need to handle scopes
yourself. I have not checked if I never had to do this, or if ORAs
updated.

## Related Issue

Fixes #1881 
Fixes #1795 
Fixes #1821 

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow)
followed

---------

Signed-off-by: razzle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants