1. Get and set orm from context.
2. Add WithTransaction decorator make func run in transaction.
3. Support nested transaction by Savepoint.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
This commit updates `prepare` and templates to populate the credential
for registry for basic authentication.
A temporary flag `registry_use_basic_auth` was added to avoid breakage.
It MUST be removed before the release.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
1. Replace all keywords without using waiting;
2. Add a debug line in Go Into Repo for UI hung trouble shooting.
Signed-off-by: danfengliu <danfengl@vmware.com>
In Helm pipeline, harbor access address is by domain name instead of IP, so cert directory should be created by domain name.
Signed-off-by: danfengliu <danfengl@vmware.com>
We'll support manifest list, so this commit removes the manifest list middleware who blocks the manifest list pushing
Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit disables XSRF check for "service/token" so that when
containerd sends `POST` it will not return 403 and containerd can
fallback to `GET` to complete the workflow.
Fixes#10305
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
This commit will make the "tokenreview" security filter onboard
user if the request carries a valid token. If the "skipsearch" flag in
http_auth setting is set to false the onboard will fail.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
1, Leverage go v1.13 new error feature
2, Define genernal error OCI format, so that /v2 API could return a OCI compatible error
Signed-off-by: wang yan <wangyan@vmware.com>
1. Define the controller/manager interface for artifact and tag
2. Provide a null implementation for artifact manager
Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit adds several handlers to handle registry requests, some of the handlers aren't implemented yet, will be done later
Signed-off-by: Wenkai Yin <yinw@vmware.com>
Seperate the HasAdminRole(In DB) with the privileges from external auth, and use user.HasAdminPrivilege to check
Signed-off-by: stonezdj <stonezdj@gmail.com>
1. Change parameter in Keyword Body Of Admin Push Signed Image to an
optional one.
2. Loose the restriction for Quotas error message verification.
3. Get cert for notary from API instead of local file.
Signed-off-by: Danfeng Liu (c) <danfengl@vmware.com>