This commit update the project API to support "reuse_sys_cve_whitelist"
setting in project metadata and "cve_whitelist" in project request.
Also modify the interceptor to support project level CVE whitelist if
the reuse flag is false.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
* Refactor scan all api
This commit is to let scan all api using admin job to handle schedule
management. After the PR, GC and scan all share unified code path.
Signed-off-by: wang yan <wangyan@vmware.com>
* update admin job api code according to review comments
Signed-off-by: wang yan <wangyan@vmware.com>
* Update test code and comments per review
Signed-off-by: wang yan <wangyan@vmware.com>
This commit is to make the expiration of robot account configurable
1, The expiration could be set by system admin in the configuation page or
by /api/config with robot_token_expiration=60, the default value is 30 days.
2, The expiration could be shown in the robot account infor both on UI and API.
Signed-off-by: wang yan <wangyan@vmware.com>
This commit is to do:
1, Add post response on creating robot account
2, Lower-case the attribute of response
Signed-off-by: wang yan <wangyan@vmware.com>
* Support master role for project member create and update apis
Signed-off-by: He Weiwei <hweiwei@vmware.com>
* Fix description for role_id in swagger.yaml
Signed-off-by: He Weiwei <hweiwei@vmware.com>
It looks like the Swagger for `ChartVersions` and `ChartVersionDetails`
were missing fields to properly generate a client.
This fixes the problem by adding the correct `refs` so that the client
produces an output when making an API call.
In Go, this generates something like:
```Go
/*GetChartrepoRepoChartsNameVersionOK handles this case with default header values.
Successfully retrieved the chart version
*/
type GetChartrepoRepoChartsNameVersionOK struct {
Payload *models.ChartVersionDetails
}
...
/*GetChartrepoRepoChartsNameOK handles this case with default header values.
Retrieved all versions of the specified chart
*/
type GetChartrepoRepoChartsNameOK struct {
Payload models.ChartVersions
}
```
Signed-off-by: Dan Norris <dan.norris@netapp.com>
* Return 409 when user trigger another "scan all"
This commit fixes#6418, that when multiple "scan all" jobs are
triggered, the API should not return 500.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
* Update swagger to add 409 to scanAll API
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
Add API test case for garbage collection, and add swagger.yaml, GC and chart feature were updated in swagger.yaml.
Signed-off-by: danfengliu <danfengl@vmware.com>