-
Notifications
You must be signed in to change notification settings - Fork 10
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
properly support CIDR syntax for insecure registries #34
Comments
@mtrmac WDYT |
I’m really not thrilled about the concept:
To implement this at least minimally correctly, the registry client would have to make a DNS lookup, make a secure/insecure decision based on the results, and then connect to the HTTP/HTTPS server based on the original DNS lookup without looking up the name again. I can’t immediately see an easy way to do that—the HTTP/HTTPS decision usually happens way before the DNS lookup or a TCP connection setup. I think we could, easily and securely enough, support this only for registries specified by an IP address (i.e. only |
To be honest, I don't know enough about the requirements for David, could you weigh in on the use of CIDR syntax for insecure registries and how that interacts with |
@deads2k which means we could check whether that one IP is within the insecure range instead of checking the entire CIDR |
I think so, but I copied you because I don't know much about that check. |
@deads2k we currently get all insecure CIDRs from docker and check that the entire 172.30.0.0/16 range is covered by their aggregate. We could easily change that to a single IP check. |
Actually configuring a CIDR block would not be an issue, as long as clients use an IP address to refer to the registry. Matching an IP against an IP, or against a CIDR range, is both semantically clean. The difficulties arise when any DNS is involved (e.g. a configuration which sets up (And yes, this would mean that “the same” registry would be used differently depending on whether the user uses a name or an address.) |
The
--insecure-registry
flag fordockerd
supports the use of a CIDR syntax to indicate that any IPs in a range should be treated as insecure. From the dockerd documenation:However, after discussing with @baude, it seems that
crio
,podman
and the like do not support the CIDR syntax.So I think
registries
and/or its consumers should support the CIDR syntax to offer parity with the Docker ecosystem.Worth noting that I arrived at this issue because I tried to use
oc cluster up
on a host and it initially failed with the following error and provided a workaround:The text was updated successfully, but these errors were encountered: