-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs/policy.json.md: Separate transports from names #166
docs/policy.json.md: Separate transports from names #166
Conversation
be3fe94
to
7acd885
Compare
Spun off from the discussion starting in [1], this commit decouples image names from the transport used to fetch them. That makes for easier mirroring (no more need for dockerRepository). This commit also decouples by-name reference from by-digest reference, since in the digest case you have a crypographic hash on the images. The only remaining concern for such references is whether the transport can be trusted to not contain malicious images (protecting the naive user from requesting a malicious image by digest), and nameOnly allows you to block digests over transports you don't trust users to pull from responsibly. [1]: containers#59 (comment) Signed-off-by: W. Trevor King <wking@tremily.us>
7acd885
to
4ed95ec
Compare
Related discussion (with lots of complications due to packing transport/namespace information into image names) in #72. |
Sorry, no. As we have discussed elsewhere, names must have semantics, and for the purpose of identifying the appropriate set of policy requirements the namespace of possible names must have an allocation mechanism which prevents conflicts. This PR seems to invent a new category of names, with an entirely new semantics (assuming a structure for tags which makes “prefixes” meaningful—or is that supposed to be a literal string prefix? That doesn’t work for version numbers at all), and gives up on the allocation mechanism.
There is no assumption that image identities are reusable across transports; in fact the (Yes, then there is a concept that any such So, if you want to invent some new kind of names, that would be a new Meanwhile, as #59 (comment) argues, for usability it is very desirable to base the policy on names which the user is already using.
It doesn’t. When the user says
When the system administrator says that all images from $transport:$hostname are rejected, it would be pretty bad to allow the users to pull any of them simply by using a digest. Sure, in some cases the user may be expected to know a trusted digest, and to exercise a due care when obtaining it, but the organization may simply reject $hostname for trust/code quality reasons, or have a policy that there must be a verifiable end-to-end-signature for every pulled image (to be recorded in a log, perhaps), whether or not the user used a digest.
In fact #72 is all about image names having transport-dependent semantics: various ways to refer to the same image must always result in the same policy scope search, and for every two distinct images it must be possible to define different policies. How various transports canonicalize names is inherently transport-specific ( The PR also makes quite a few undocumented changes, like combining the transport name and path into a single string; from a quick look most of them seem not to be an improvement, but I may just have missed some of them. Anyway, the giving up on namespace semantics (or assuming that there is a single one which will fit everyone) is a show-stopper to me. @runcom Any comments before I close this? |
nope, closing :) |
On Mon, Nov 21, 2016 at 07:20:04AM -0800, Miloslav Trmač wrote:
I don't think this is true. If Alice and Bob both name busybox:1.25.1
It is supposed to be literal string prefixing. How does it break down
It's even worse than that. As the master-branch of this repitory With this PR, there are no such restrictions. You can just name the
I can submit a transport-agnostic transport wrapper if it would help
To make that explicit, I'd expect this to be: $ tool pool --transport sometransport:mylocalmirror/something/which/contains/a/copy@of!busybox --name busybox:latest with a policy like: { and matchRepository would where the pubkeys are from [1](or wherever Notary serves the
Agreed, which is why you want a global ‘reject’ and per-transport
I'd rather punt that to the user/publishers to sort out. String If you need more flexibility, you should be able to configure { But it seems overly magical hard-code too much of that sort of thing |
Fix a pasto in an error message
Spun off from the discussion in #59, this commit decouples image names from the transport used to fetch them. That makes for easier mirroring (no more need for
dockerRepository
, etc.).This commit also decouples by-name reference from by-digest reference, since in the digest case you have a cryptographic hash on the images. The only remaining concern for such references is whether the transport can be trusted to not contain malicious images (protecting the naive user from requesting a malicious image by digest), and
nameOnly
allows you to block digests over transports you don't trust users to pull from responsibly.If folks feel like this approach has legs, I'm happy to work up the backing Go as well.