Repository navigation
fix(ocm): enforce transport TLS and scheme policy - #5839
MahdiBaghbani wants to merge 5 commits into
Conversation
6d5efef to
947f5f4
Compare
947f5f4 to
b66a453
Compare
|
flowchart TD
URL["peer URL"] --> W["publicOnlyTransport.RoundTrip"]
W -->|http / ftp / gopher| R["ErrPolicyViolation"]
W -->|redirect to http| R
W -->|https| B["base transport, then Dialer.Control"]
I wrapped The wrapper is also the only redirect gate for WebDAV, since gowebdav ignores
|
b66a453 to
fe7d972
Compare
fe7d972 to
5781437
Compare
|
No new key here. This makes the scheme and redirect checks from this PR use exactly the same CIDR policy as the dial.
flowchart TD
CFG["TransportConfig"] --> P["newPublicOnlyParts: one destinationPolicy"]
P --> S["publicOnlyTransport scheme check"]
P --> R["CheckRedirect"]
P --> D["dial Control"]
S -->|"https"| D
S -->|"http, unless AllowLoopback and literal loopback"| X["refuse"]
R -->|"non-https"| X
R -->|"https literal IP"| C["checkResolvedAddr"]
R -->|"https hostname"| D
C -->|"out of range"| X
C -->|"in range"| D
The part you might ask about is http. A CIDR entry only admits an address, it doesn't relax the scheme.
|
2f66733 to
0bdf8fe
Compare
0bdf8fe to
03ab092
Compare
03ab092 to
d1fe987
Compare
Signed-off-by: Mahdi Baghbani <[email protected]>
Signed-off-by: Mahdi Baghbani <[email protected]>
Signed-off-by: Mahdi Baghbani <[email protected]>
Signed-off-by: Mahdi Baghbani <[email protected]>
Signed-off-by: Mahdi Baghbani <[email protected]>
d1fe987 to
da1963b
Compare
This PR is part of the cs3org/OCM-STA#48
Summary
(including trusted and insecure modes), make public-only clients
HTTPS-only with redirect-downgrade rejection (10-redirect limit), and
tighten the dial guard's address list: deny the IANA special-purpose
ranges (192.0.0.0/24), keep the PCP/TURN anycast addresses
(192.0.0.9, 192.0.0.10) reachable inside that range, and deny local-use
NAT64 (64:ff9b:1::/48) wholesale instead of unwrapping it.