yebinama / paclair

Paclair is a Python3 Cli tool to interact with Coreos's Clair (https://github.com/coreos/clair).
Apache License 2.0
27 stars 13 forks source link

Allow to defined the Docker registry token #11

Closed jpthiery closed 5 years ago

jpthiery commented 5 years ago

Since some Docker registry like AWS ECR not provide a Token URL, we can push to clair some layer to analyse from the private registry.

In order to allow paclair to retrive private docker image layer from AWS ECR, this Pull Request propose to allow to define the ̀token` using conf.

In a our case, we may use the AWS CLI to fetch this token, then inject it to paclair.

yebinama commented 5 years ago

Hi, thanks for the PR. Sorry for the delay, I wasn't available recently. This seems like a great addition, I'll review it this week-end.

jpthiery commented 5 years ago

Don't worry, it's fine ;) I may want to improve test coverage since existing mock not tests headers which i change. I'm not sure to not breack existing behavior.

I will produce documentation update to explain news entry.

jpthiery commented 5 years ago

For information, i have successfully produce a a report from Docker image stored in an private ECR repository this morning using change wrote in this PR.

yebinama commented 5 years ago

I may want to improve test coverage since existing mock not tests headers which i change. I'm not sure to not breack existing behavior.

Maybe the default value of token_type should be 'Bearer' instead of 'Basic'.

dustinvanbuskirk commented 5 years ago

+1 can't wait to see ECR supported. Is there any type of workaround to make ECR work with current version while I'm waiting on this PR to work through the process?

dustinvanbuskirk commented 5 years ago

@yebinama Are you going to cut a new revision for release 3.0 for pip installation? Or are you waiting for documentation before doing that?

yebinama commented 5 years ago

@dustinvanbuskirk I'll do a new release probably ths week-end.

jpthiery commented 5 years ago

Yes, i may proposed a documentation PR to allow you to adopt this feature. I try to done it this week.

yebinama commented 5 years ago

I've added some documentation to release the 3.1.0 version saturday.

dustinvanbuskirk commented 5 years ago

Been working on a custom Docker image to support registry scans as part of CI pipeline.

https://github.com/codefresh-contrib/cfstep-paclair/pull/4/commits/2746cfefc6b8aad3fcf10e32148b63a5f0d01d46

Was waiting on the release to put in my own PR.

Thank you both for your contributions.