docker: implement --auth-proxy option #11
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enables per-request WebDAV backend configuration via
--auth-proxywhile fully supporting anonymous access (no client credentials) when the flag is omitted.Core Flow
mc alias set … <bearer_token> 12345678) → signs S3 request.--auth-key ,12345678→ validates SigV4 using fixed secret (wildcard AccessKey).--auth-proxypresent →auth-proxy.pyreceives:{"pass": "<bearer_token>", "user": "<session_id>"}bearer_token = i["pass"]--auth-proxyabsent →$REMOTE_NAME:mc alias set … "" "")Key Change:
docker/startupowncloud/ocisathttps://localhost:9200:OCIS_LOG_LEVEL=debug PROXY_ENABLE_BASIC_AUTH=true IDM_CREATE_DEMO_USERS=true OCIS_INSECURE=true ./ocis/bin/ocis serverdocker build -t jankari/rclone-webdav-proxy .Per-user mode (private OCIS account)
Run the docker container:
PROXY_ARGS="--auth-proxy /usr/local/bin/auth-proxy.py --auth-key ,12345678 --no-check-certificate -vv"mc alias set myproxy http://localhost:8080 <access-token-from owncloud/ocis> 12345678List the buckets:
mc ls myproxyAnonymous mode (public link – no credentials)
where
unique identifier of the public file linkis the last part of the public link created by ocismc alias set myproxy http://localhost:8080 "" ""List the buckets:
mc ls myproxy