You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
currently runc run has a command line option --no-new-keyring which disables the creation of an isolated kernel keyring for the process. This is kind of weird - I think this should be part of the OCI spec as it is just a specification of resource allocation, like having a new namespace. I can write up a proposal for this; obviously though this will be a breaking change so want to know what anyone else thinks.
On Wed, Feb 14, 2018 at 01:45:24PM +0000, Justin Cormack wrote:
This is kind of weird - I think this should be part of the OCI spec
as it is just a specification of resource allocation, like having a
new namespace.
I agree. Tying this behavior to an OCI spec would allow managers like
CRI-O to drive this behavior in a runtime-agnostic way. Currently
CRI-O exposes it via the runc-specific flag
(cri-o/cri-o#1302), which makes swapping in other
runtimes difficult (cri-o/cri-o#1260).
… obviously though this will be a breaking change so want to know
what anyone else thinks.
Initially "session" is probably the only supported value, but it is extensible in future. In theory setting the process keyring might make sense too, but almost all use cases use session.
--no-new-keyring would correspond to an empty keyrings list; the first example above corresponds to the current default.
Would you ever need multiple keyrings of the same type? I can't think of a reason, if it's possible at all. If it's not possible, I recommend using an object with ring-type keys:
I followed what we do for namespaces, where you also can't have more than one of a type. The problem is if name is empty, which is the normal null case for create a new keyring, then the session object is empty as far as Go is concerned. Its a bit of a Go-kernel mismatch where we are trying to distinguish between not set and null.
On Thu, Feb 15, 2018 at 04:56:30PM +0000, Justin Cormack wrote:
I followed what we do for namespaces…
I think the namespace structure would have been easier to use if it
had been an object (#598). I'm not clear on why the runtime-spec
maintainers preferred to stick with an array there. If it was because
of existing implementations for a namespaces array, that reasoning
wouldn't apply to the new keyrings property. If that reasoning was
because they really prefer arrays with an additional duplicate
restriction (vs. an object with our generic key restriction [1]), then
yeah, they'll probably want an array here (and I'd be interested in
hearing what that reason is).
The problem is if `name` is empty, which is the normal null case for
create a new keyring, then the session object is empty as far as Go
is concerned. Its a bit of a Go-kernel mismatch where we are trying
to distinguish between not set and null.
Activity
wking commentedon Feb 14, 2018
justincormack commentedon Feb 15, 2018
I think the most general interface would be for creating a new session keyring to match the config for namespaces
joining an existing keyring/creating a new named on as session keyring:
Initially "session" is probably the only supported value, but it is extensible in future. In theory setting the process keyring might make sense too, but almost all use cases use session.
--no-new-keyringwould correspond to an emptykeyringslist; the first example above corresponds to the current default.If this looks sane I will do a spec PR.
wking commentedon Feb 15, 2018
Would you ever need multiple keyrings of the same type? I can't think of a reason, if it's possible at all. If it's not possible, I recommend using an object with ring-type keys:
justincormack commentedon Feb 15, 2018
I followed what we do for namespaces, where you also can't have more than one of a type. The problem is if
nameis empty, which is the normal null case for create a new keyring, then the session object is empty as far as Go is concerned. Its a bit of a Go-kernel mismatch where we are trying to distinguish between not set and null.wking commentedon Feb 15, 2018
justincormack commentedon Feb 16, 2018
Ah yes, you can distinguish between empty but nil map value and non existent one, if you try. So default as per current behaviour could be
specs-go/config: add keyring support