harbor/tests
Daniel Jiang 08f9ffa000 Reenable token auth for cli
Docker CLI fails if it's not logged in upon seeing "basic" realm challenging while pinging the "/v2" endpoint. (#11266)
Some CLI will send HEAD to artifact endpoint before pushing (#11188)(#11271)

To fix such problems, this commit re-introduce the token auth flow to the CLIs.

For a HEAD request to "/v2/xxx" with no "Authoirzation" header, the v2_auth middleware populates the
"Www-Authenticate" header to redirect it to token endpoint with proper
requested scope.

It also adds security context to based on the content of the JWT which has the claims of the registry.
So a request from CLI carrying a token signed by the "/service/token" will have proper permissions.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-04-04 00:05:58 +08:00
..
apitests/python Reenable token auth for cli 2020-04-04 00:05:58 +08:00
ci Add tls for trivy 2020-03-18 19:22:10 +08:00
e2e-image Add nightly test case of push docker manifest list 2020-04-01 06:51:13 +00:00
resources Merge pull request #11379 from danfengliu/add-nightly-test-of-push-helm-chart 2020-04-02 10:29:21 +08:00
robot-cases Merge pull request #11385 from jwangyangls/nightly-case-trivy-2 2020-04-02 11:14:21 +08:00
robot-indices Due to replication NG feature already in master branch, old replication UI test cases have been moved out of Jenkins pipeline, and here test case <Replication Of Pull Images from DockerHub To Self> and <Replication Of Push Images from Self To Harbor> has been finished and ready for duty. Other modification is add retry for keywords in UserProfile.robot (#7611) 2019-05-09 15:44:48 +08:00
testcases Add testcase for define harbor admin by LDAP group DN 2018-08-06 18:56:13 +08:00
.gitignore add make clean 2019-12-05 14:44:07 +08:00
ca.crt add test file for systeminfo.go (#1288) 2017-01-06 15:41:07 +08:00
configharbor.py Bump up the version of legacy APIs to v2.0 2020-02-14 13:16:30 +08:00
coverage4gotest.sh enhance[cicd] introduce github action for CICD 2019-12-17 18:36:33 +08:00
docker-compose.test.yml feat(cicd) fix redis container version for test (#11105) 2020-03-27 10:54:52 +08:00
generateCerts.sh use fix root CA for test 2019-08-14 13:58:20 +08:00
harbor_ca.crt verify permission of GetRetentionExecTaskLog 2019-08-29 15:01:53 +08:00
harbor_ca.key verify permission of GetRetentionExecTaskLog 2019-08-29 15:01:53 +08:00
harbor_ca.srl use fix root CA for test 2019-08-14 13:58:20 +08:00
hostcfg.sh Add switch to https 2020-03-18 19:22:10 +08:00
integration.sh feat(cicd) fix build base image 2020-03-26 10:55:40 +08:00
ldap_test.ldif Add user027 and user028 to ldap service, it was added in ldap_test.ldif for nightly test. (#8158) 2019-07-08 15:30:08 +08:00
ldapprepare.sh Retry when test ldap server load data fail 2017-12-14 22:36:27 +08:00
notarytest.sh add a 4443 ssl server to nginx config 2017-03-24 13:16:48 +08:00
private_key.pem * Add robot account authn & authz implementation. 2019-01-28 17:39:57 +08:00
pushimage.sh enhance[cicd] introduce github action for CICD 2019-12-17 18:36:33 +08:00
reg_config.yml Change the clair container to non root user 2019-11-04 11:36:39 +08:00
showtime.sh add make clean 2019-12-05 14:44:07 +08:00
startuptest.sh replace startuptest 2017-03-23 19:12:04 -07:00
swaggerchecker.sh chore[api]:rename API folder to api 2019-12-11 17:41:27 +08:00
testprepare.sh Fix travis failure: read the content of env instead of config_env as the config_env has been removed 2019-05-09 17:26:56 +08:00
userlogintest.sh Reactor backend api for authrization 2018-09-21 14:03:17 +08:00
validatecontainers.sh Provide Dockerfile and artifacts for building mariadb on photon OS. 2017-10-20 14:41:36 +08:00