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

errors: add error for wild card scope validation #340

Merged
merged 2 commits into from
Jul 19, 2023

Conversation

sajayantony
Copy link
Contributor

No description provided.

@codecov-commenter
Copy link

Codecov Report

Merging #340 (ae9ac7b) into main (3981f69) will increase coverage by 0.07%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #340      +/-   ##
==========================================
+ Coverage   74.80%   74.88%   +0.07%     
==========================================
  Files          23       23              
  Lines        2203     2210       +7     
==========================================
+ Hits         1648     1655       +7     
  Misses        437      437              
  Partials      118      118              
Impacted Files Coverage Δ
verifier/trustpolicy/trustpolicy.go 91.69% <100.00%> (+0.21%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@Two-Hearts Two-Hearts left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@JeyJeyGao JeyJeyGao left a comment

Choose a reason for hiding this comment

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

LGTM

@sajayantony
Copy link
Contributor Author

❯ cat trustpolicy.json --plain
{
    "version": "1.0",
    "trustPolicies": [
        {
            "name": "notation-demos-images",
            "registryScopes": [ "localhost:5000/hello/*" ],
            "signatureVerification": {
                "level" : "strict"
            },
            "trustStores": [ "ca:notation-demos.io" ],
            "trustedIdentities": [
                "*"
            ]
        }
    ]
}

❯ ./bin/notation policy import ./trustpolicy.json
Existing trust policy configuration found, do you want to overwrite it? [y/N] y
Error: failed to validate trust policy: registry scope "localhost:5000/hello/*" with wild card(s) is not valid, make sure it is a fully qualified repository without the scheme, protocol or tag. For example domain.com/my/repository or a local scope like local/myOCILayout

Copy link
Contributor

@priteshbandi priteshbandi left a comment

Choose a reason for hiding this comment

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

LGTM

@priteshbandi priteshbandi merged commit f2cdfee into notaryproject:main Jul 19, 2023
shizhMSFT added a commit to notaryproject/notation that referenced this pull request Jul 28, 2023
- upgrade `notation-go` from `v1.0.0-rc.6` to `v1.0.0`
- upgrade dependencies for E2E tests
- update E2E test case to reflect
notaryproject/notation-go#340

---------

Signed-off-by: Shiwei Zhang <[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
Development

Successfully merging this pull request may close these issues.

5 participants