mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-28 19:47:58 +01:00
2064a1cd6d
1. Add basic authorizer for registry which modify the request to add basic authorization header to request based on configuration. 2. Set basic auth header for proxy when accessing registry 3. Switche the registry to use basic auth by default and use the basic authorizer to access Harbor. 4. Make necessary change to test cases, particularly "test_robot_account.py" and "docker_api.py", because the error is changed after siwtched to basic auth from token auth. #10604 is opened to track the follow up work. Signed-off-by: Daniel Jiang <jiangd@vmware.com>
54 lines
1.3 KiB
Django/Jinja
54 lines
1.3 KiB
Django/Jinja
version: 0.1
|
|
log:
|
|
level: {{log_level}}
|
|
fields:
|
|
service: registry
|
|
storage:
|
|
cache:
|
|
layerinfo: redis
|
|
{{storage_provider_info}}
|
|
maintenance:
|
|
uploadpurging:
|
|
enabled: false
|
|
delete:
|
|
enabled: true
|
|
{% if storage_redirect_disabled %}
|
|
redirect:
|
|
disable: true
|
|
{% endif %}
|
|
redis:
|
|
addr: {{redis_host}}:{{redis_port}}
|
|
password: {{redis_password}}
|
|
db: {{redis_db_index_reg}}
|
|
http:
|
|
addr: :5000
|
|
secret: placeholder
|
|
debug:
|
|
addr: localhost:5001
|
|
auth:
|
|
htpasswd:
|
|
realm: harbor-registry-basic-realm
|
|
path: /etc/registry/passwd
|
|
validation:
|
|
disabled: true
|
|
notifications:
|
|
endpoints:
|
|
- name: harbor
|
|
disabled: false
|
|
url: {{core_url}}/service/notifications
|
|
timeout: 3000ms
|
|
threshold: 5
|
|
backoff: 1s
|
|
ignoredmediatypes:
|
|
- application/vnd.docker.image.rootfs.diff.tar.gzip
|
|
- application/vnd.docker.image.rootfs.foreign.diff.tar.gzip
|
|
- application/vnd.oci.image.layer.v1.tar
|
|
- application/vnd.oci.image.layer.v1.tar+gzip
|
|
- application/vnd.oci.image.layer.v1.tar+zstd
|
|
- application/vnd.oci.image.layer.nondistributable.v1.tar
|
|
- application/vnd.oci.image.layer.nondistributable.v1.tar+gzip
|
|
- application/vnd.oci.image.layer.nondistributable.v1.tar+zstd
|
|
- application/octet-stream
|
|
compatibility:
|
|
schema1:
|
|
enabled: true |