Huawei / dockyard

Container & Artifact Repository
Apache License 2.0
269 stars 67 forks source link

content scan feature #165

Open liangchenye opened 8 years ago

liangchenye commented 8 years ago

Snapshot : scan backend

updateservice/snapshot is an interface, developers could add different plugins to do their scan work. Now I just adding a simple 'appv1' plugin which get the md5 of an appv1 package.

why call it 'Snapshot'

In the traditional repositories provider, like SUSE/Redhat distribution host servers, their are not only provide simple metadata, but also provide detail information. It helps user to 'search' required packages and download them.

why under updateservice

In TUF framework, there is a similar snapshot concept. If a package admin want to provide a secure snapshot service to his user, he/she can signature/encrypt snapshot.

How does it work -- Plugin mode

Just like other services under updateservice, we can develop/use Snapshot by a single interface. The interface will choose the suitable scan plugin.

Plugin Developer

There are two key functions:

Plugin User provides should choose the right plugin and calling it. He/she can query the scan status by callbackID and collected the scan result by this ID too.

I added four APIs:

liangchenye commented 8 years ago

I'll keep update this document and add to README once it become mature. Any suggest are welcomed.

liangchenye commented 8 years ago

Update.

Add two types of Snapshot: Simple Snapshot and Group Snapshot