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

Simple signing policies fail if multiple matching pull secrets are in scope #209

Closed
jhart1685 opened this issue Nov 18, 2020 · 1 comment · Fixed by #211
Closed

Simple signing policies fail if multiple matching pull secrets are in scope #209

jhart1685 opened this issue Nov 18, 2020 · 1 comment · Fixed by #211
Assignees

Comments

@jhart1685
Copy link
Member

What commit ID of Portieris did you experience the problem with?

v0.9.0

What went wrong?

My deployment has 3 imagePullSecrets in scope for the registry containing my images.
Two of those contain credentials that do not have access to the image. The third pull secret has good credentials.
When using a simple signing policy, Portieris blocks the deploy with access denied.. and this in the logs:

responder.go:87] simple: Error reading manifest <REDACTED>: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

What should have happened differently?

Portieris should have tried all matching pull secrets in this case.

How can it be reproduced?

As per description.
I expect that the pull secrets are iterated by Portieris in alphabetical order, so it may be important to have the bad credentials in a secret closer to the start of the alphabet than the good ones.

Any other relevant information

The following code looks like it is supposed to handle this: https://github.com/IBM/portieris/blob/master/pkg/verifier/simple/imagePolicy.go#L64-L71
However, in local debugging, I can see the error being returned from line 60 instead.

@jhart1685 jhart1685 self-assigned this Nov 18, 2020
@jhart1685
Copy link
Member Author

The fix for this is likely a small code change. But I feel we need an e2e test that catches this problem first.

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 a pull request may close this issue.

1 participant