Conversation
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
mtrmac
left a comment
There was a problem hiding this comment.
I think this highlights the basic design trade-offs:
- We can add
--tls-detailsas a global option.- That automatically forwards it to libimage, and hopefully affects all image operations (but not any other operations), for fairly little work.
- We will still need to scope/audit all other TLS users, and use the
--tls-detailsoption. - At a first glance it’s a bit unsatisfactory to have
registry.PodmanConfig().TLSDetailsFilecontain only the path, not the parsed data. The parsing code would have to be repeated in many users. There is probably a trivially way to do better here, I didn’t spend much time looking. - This doesn’t affect remote processes at all; how would the option get to the remote server??!
- We can add it as a per-operation option
- Rather more tedious, but we would ~clearly delineate where we expect it to work and where it isn’t ready yet.
- Clearly generalizes to remote operation: add the
basetls.Config.MarshalTextformat as an option field. - Right now
libimage.CopyOptionsignores theSystemContextfield AFAICT. We don’t need to change that, we can add a newlibimage.CopyOptions.BaseTLSConfig(perhaps preferringCopyOptionsbut falling back to the initialization-time runtimeSystemContext).
| Retry uint `schema:"retry"` | ||
| RetryDelay string `schema:"retrydelay"` | ||
| TLSVerify bool `schema:"tlsVerify"` | ||
| BaseTLSConfig string `schema:"baseTLSConfig"` |
There was a problem hiding this comment.
Does this really need to be manually, separately from pkg/bindings/images.PullOptions? it It seems tedious and error-prone.
There was a problem hiding this comment.
We can't guarantee the bindings are always used with the API? But maybe I'm misunderstanding the question
There was a problem hiding this comment.
I was expecting some kind of
var query pkg/bindings/images.PullOptions
if err := query.FromParams(r.URL.Query()); …using exactly the same type on the client and server side, not a duplicate re-declaration; and mirroring the existing query.ToParams.
3336e4b to
d43ef94
Compare
|
OK a minimal smoke test is promising: # cat tls-details-pqc-only.yaml
minVersion: "1.3"
namedGroups:
- "X25519MLKEM768"
# bin/podman --tls-details tls-details-pqc-only.yaml pull --retry 0 quay.io/foo
Trying to pull quay.io/foo:latest...
Error: unable to copy from source docker://quay.io/foo:latest: initializing source docker://quay.io/foo:latest: pinging container registry quay.io: Get "https://quay.io/v2/": EOF
# bin/podman --tls-details tls-details-pqc-only.yaml push --retry 0 quay.io/libpod/alpine
Getting image source signatures
Error: trying to reuse blob sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0 at destination: pinging container registry quay.io: Get "https://quay.io/v2/": EOF("EOF" is how the Note that this does not yet include even |
|
@containers/podman-maintainers RFC on the approach. (In containers/container-libs#619 , Paul suggests not supporting the option for remote at all, or maybe exposing it as an option for the remote server only. That would certainly simplify things.) |
Well my point is that it is already exposed for the server because it is a global option, |
I think so, the way the current version of this PR initializes the runtime. I suppose machine creation would still need extra code to copy the file + set the flag, or maybe we would leave that for users to do manually. |
d43ef94 to
3200d63
Compare
|
Updated:
At this point I think this is valuable to understand the scope of the option — perhaps just by titles of the commits . |
30bd0f2 to
d50fbbb
Compare
I’d welcome comments on the |
fd5dfb8 to
872b563
Compare
cmd/podman/kube/play.go
Outdated
| return nil, err | ||
| } | ||
| baseTLSConfig := basetls.TLSConfig() | ||
| var transport *http.Transport // nil means http.DefaultTransport |
There was a problem hiding this comment.
Do we need to add proxy info here or does that carry over from the default transport if not explicitly overridden?
There was a problem hiding this comment.
Oops, yes we do. I’ll need to fix that everywhere.
There was a problem hiding this comment.
Fixed, along with nil dereferences due to Go’s interface type weirdness.
mheon
left a comment
There was a problem hiding this comment.
Approach LGTM but this looks like a real pain to bring back to earlier versions which I really do not like.
|
(Though I also see no real alternative...) |
The approach where we set (Paul preferred the latter, and I do agree that would be much easier.) |
1c7eb5c to
bae7bc4
Compare
I want to see other tests' outcomes. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
64a0485 to
ebcd021
Compare
ebcd021 to
d886a47
Compare
I'm hitting a timeout in "build each commit" and I don't yet want to consolidate them. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This is only looking at plain pull, and does not correctly handle remote operation. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Assume that we are going to use the global runtime options instead. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This will make it easier to add one more option, and removes a risk of passing options in an incorrect order. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
There are no external users, so make that clearer. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
We will add another user. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Right now, this correctly handles pullOptions.credentials which were ignored previously (admittedly that field is never set by anything...); in the future, it will ensure the two c/image users won't get out of sync again. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
... to centralize the conversion from entities.PodmanConfig to bindings.Options, we will add more code there. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
It's _probably_ not used here, but it's easier to keep things consistent. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Probably unnecessary, but it's easier to keep things consistent. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Sadly it seems we can't _remove_ the --tls-details flag from the FlagSet returned by GetBudFlags, so just try to ensure consistent behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
It shouldn't actually affect anything, but it's easier to set it than worry. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2012b64 to
790334a
Compare
|
This is now the full scope of everything I could find. |
This exposes containers/container-libs#623 , looking for ways to do that.
Absolutely untested at this point.
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?