Project

Profile

Help

Story #3857

As a user, i want Crane to be able to serve Docker registry content directly as well as be alble to use redirects

Added by dag over 1 year ago. Updated 7 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
2.18.0
Blocks Release:
Target Release - Crane:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

Description

Problem

Pulp allows to distribute Docker content via rsync to a remote server. There is a possible scenario where a Crane instance is running on this remote server to provide a local Docker registry.

Currently in this scenario Crane would serve 302 redirects to the actual files served by a web server on the same machine.

This creates a problem when trying to restrict access to these files:
  • The Docker client is able to handle basic authentication, when accessing a registry. However when the Docker client follows a redirect it seems to forget any authentication data. Thus with Crane it is possible to restrict access to the 302 redirects but not to the actual files.

Solution

  • Add an option to Crane to either serve Files locally or provide redirects.
  • Use "X-Sendfile" support of flask when serving locally.
  • Support V1 and V2 Docker API versions

Associated revisions

Revision 03fc5ad0 View on GitHub
Added by dag over 1 year ago

Implement option to serve local content

Implement option to send Docker files directly from local paths
instead of creating a HTTP redirects. The local paths can be created by
a Pulp Docker web distributor or by a rsync distributor.

Example crane.conf:

```
[general]
debug: true
data_dir: /var/www/pub/docker/
endpoint: localhost:5000

[serve_content]
enable: true
```

closes #3857
https://pulp.plan.io/issues/3857

History

#1 Updated by dag over 1 year ago

Here is the corresponding pull request https://github.com/pulp/crane/pull/93

#2 Updated by dkliban@redhat.com over 1 year ago

  • Status changed from NEW to POST
  • Assignee set to dag

#3 Updated by dag about 1 year ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#4 Updated by dkliban@redhat.com about 1 year ago

  • Sprint/Milestone set to 2.18.0

#5 Updated by dkliban@redhat.com about 1 year ago

  • Platform Release set to 2.18.0

#6 Updated by dkliban@redhat.com about 1 year ago

  • Project changed from Docker Support to Crane

#7 Updated by ttereshc 12 months ago

  • Status changed from MODIFIED to ON_QA

#8 Updated by ttereshc 12 months ago

  • Status changed from ON_QA to CLOSED - CURRENTRELEASE

#9 Updated by bmbouter 7 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF