-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
API: add POST based API #112
Comments
This is might be a little tricky because we'd have to be able to determine all of the metadata usually passed in the JSON body of a POST to |
@jzelinskie seems like a query param, content-type, or path could differentiate that stuff. |
There's also always multipart. @philips would that work or is the construction of the multipart request too high of a barrier for local development? |
Hello, you could have a look at github.com/wemanity-belgium/hyperclair. It try to address that problem, with an easier cli to interact with clair |
Related to #148.
|
As @jgsqware mentioned, what about at least posting the content of individual layers? That would remove the need of having an HTTP server able to serve layer, and thus, simplify Clair's integration and security management. In that case, Hyperclair/clairctl would still ease of proper image posting. It should be an easy change and non-breaking in regard to the API. |
I still think that we may definitely accept images as well, maybe through another API call. To do so, we might extend the worker.DataDetector interface and wrap worker.Process. |
Agree with @Quentin-M, it should be 2 different way to upload. The advantage i can see of pushing image than layer tarball, is to avoid to push so layer already pushed to clair. |
However, the work of metadata extraction from images/manifests is already done in clairctl, so we can move it quite easily to a process in clair |
True. While accepting posted layers would ease usage (as explained above), accepting posted images would ease usage even further, to the point where no client side logic would be required anymore, however, users might end up pushing data that have already been analyzed (which may or may not be a drawback for some use cases). In my opinion, both solutions could be provided by Clair eventually. At first, we should accept posted layers (no API change, little code change) and get #164 in. |
for POST layer: what do you prefer:
|
Two queries:
Any pointers would be helpful. This is one of the reasons we are not using clair as the infra team sees this as a security issue. |
We’re declaring bug bankruptcy as part of the release process for a new major version of Clair. Please open a ticket in our issue tracker if you feel this still needs to be addressed, and we'll triage as part of our v4 development process. Thanks! |
For playing around with clair it would be much nicer if I could POST the image for analysis instead of going through hoops, as analyze-local-images does, to pull from a web server. This is a local development nicety but I bet it would make it easier for people to participate. It certainly tripped me up while I tried to use
analyze-local-images
.The text was updated successfully, but these errors were encountered: