harbor/tests/apitests/python
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
..
bundle_data Add script of push cnab bunlde API test 2020-03-16 17:37:16 +08:00
library Adding tests for native docker registry APIs exposed by Harbor 2020-03-29 08:27:13 -07:00
sign_image.sh Add API test case sign image back to travis, despite codacy block it when pulling a pr. 2019-08-16 01:26:36 -07:00
test_add_member_to_private_project.py Update existing API tests for API V2.0 2020-02-26 21:38:39 +08:00
test_add_replication_rule.py Update existing API tests for API V2.0 2020-02-26 21:38:39 +08:00
test_add_sys_label_to_tag.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_assign_role_to_ldap_group.py drop table access log in migration (#11118) 2020-03-18 19:04:38 +08:00
test_assign_sys_admin.py Update existing API tests for API V2.0 2020-02-26 21:38:39 +08:00
test_copy_artifact_outside_project.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_create_delete_tag.py Add "order by" clause to avoid the duplicat rows 2020-03-30 16:42:43 +08:00
test_del_repo.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_edit_project_creation.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_garbage_collection.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_health_check.py Add e2e test case for health check API 2019-10-29 13:48:06 +08:00
test_ldap_admin_role.py drop table access log in migration (#11118) 2020-03-18 19:04:38 +08:00
test_ldap_ping.py Fix issue 6450 Test LDAP server error without save configuration 2019-04-18 14:24:21 +08:00
test_list_helm_charts.py Fix API TEST for chart Version 2020-04-01 11:55:22 +08:00
test_manage_project_member.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_project_level_cve_whitelist.py API test for project level CVE whitelist 2019-08-15 11:37:22 +08:00
test_project_level_policy_content_trust.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_project_quota.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_push_chart_by_helm3_chart_cli.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_push_cnab_bundle.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_push_index_by_docker_manifest.py Remove some content of verification for artifact addtion 2020-03-26 10:03:30 +08:00
test_registry_api.py Adding tests for native docker registry APIs exposed by Harbor 2020-03-29 08:27:13 -07:00
test_retention.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_robot_account.py Reenable token auth for cli 2020-04-04 00:05:58 +08:00
test_scan_image_artifact.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_sign_image.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_sys_cve_whitelists.py API test for system level CVE whitelist 2019-08-14 14:59:58 +08:00
test_system_level_scan_all.py Modify api test for test step of add addition 2020-03-18 17:32:10 +08:00
test_user_group.py Add Harbor API Test based on python API 2018-08-01 10:43:23 +08:00
test_user_view_logs.py Enable API logs test case (#11142) 2020-03-19 14:56:37 +08:00
testutils.py Fix API TEST for chart Version 2020-04-01 11:55:22 +08:00
update_docker_cfg.sh Add API test case of pushing index by docker manifest 2020-03-02 06:31:59 +00:00