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

Allow API Version to be explicitly specified in env var or cmd options #21

Merged
merged 2 commits into from Sep 18, 2018

Conversation

PeteGoo
Copy link
Contributor

@PeteGoo PeteGoo commented Sep 16, 2018

We have an Anchore engine where access to the swagger.json endpoint is restricted and hence the detection of api versions fails. This results in a call to get_image that presumes an older api and sends a payload on the get request resulting in a 403 from CloudFront in this case.

To remedy this, I have added an explicit option for specifying the api version either via environment variable or cli option. When this has been specified, the version check will be skipped.

Hopefully other people will find this useful.

Signed-off-by: Peter Goodman <pete@petegoo.com>
Signed-off-by: Peter Goodman <pete@petegoo.com>
@zhill
Copy link
Member

zhill commented Sep 17, 2018

Thanks @PeteGoo ! I'll review and update this ticket tomorrow, but at first glance this seems like a reasonable approach and PR.

@zhill
Copy link
Member

zhill commented Sep 18, 2018

@PeteGoo , this looks good thanks! I'll go ahead and merge it. There will likely be changes in this area of the client for upcoming releases as well due to some upcoming changes in the service side to present version information more efficiently.

@zhill zhill merged commit 3085c25 into anchore:master Sep 18, 2018
@PeteGoo PeteGoo deleted the AllowSkipApiVersionCheck branch May 28, 2019 20:30
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.

None yet

2 participants