@@ -824,75 +824,4 @@ $ oc expose service/<name> --hostname="api.openshift.org"
824
824
$ oc expose service/<name> --hostname="m.api.openshift.org"
825
825
$ oc expose service/<name> --hostname="kates.net"
826
826
$ oc expose service/<name> --hostname="api.kates.net"
827
- ----
828
-
829
-
830
- [[disable-namespace-ownership-check]]
831
- == Disabling the Namespace Ownership Check
832
-
833
- Hosts and subdomains are owned by the namespace of the route that first
834
- makes the claim. Other routes created in the namespace can make claims on
835
- the subdomain. All other namespaces are prevented from making claims on
836
- the claimed hosts and subdomains. The namespace that owns the host also
837
- owns all paths associated with the host, for example `*_www.abc.xyz/path1_*`.
838
-
839
- For example, if the host `*_www.abc.xyz_*` is not claimed by any route.
840
- Creating route `r1` with host `*_www.abc.xyz_*` in namespace `ns1` makes
841
- namespace `ns1` the owner of host `*_www.abc.xyz_*` and subdomain `abc.xyz`
842
- for wildcard routes. If another namespace, `ns2`, tries to create a route
843
- with say a different path `*_www.abc.xyz/path1/path2_*`, it would fail
844
- because a route in another namespace (`ns1` in this case) owns that host.
845
-
846
- ifdef::openshift-enterprise,openshift-origin[]
847
- With
848
- xref:../../install_config/router/default_haproxy_router.adoc#using-wildcard-routes[wildcard routes]
849
- the namespace that owns the subdomain owns all hosts in the subdomain.
850
- If a namespace owns subdomain `*abc.xyz*` as in the above example,
851
- another namespace cannot claim `z.abc.xyz`.
852
- endif::[]
853
-
854
- By disabling the namespace ownership rules, you can disable these restrictions
855
- and allow hosts (and subdomains) to be claimed across namespaces.
856
-
857
- [WARNING]
858
- ====
859
- If you decide to disable the namespace ownership checks in your router,
860
- be aware that this allows end users to claim ownership of hosts
861
- across namespaces. While this change can be desirable in certain
862
- development environments, use this feature with caution in production
863
- environments, and ensure that your cluster policy has locked down untrusted end
864
- users from creating routes.
865
- ====
866
-
867
- For example, with `ROUTER_DISABLE_NAMESPACE_OWNERSHIP_CHECK=true`, if
868
- namespace `ns1` creates the oldest route `r1` `*_www.abc.xyz_*`, it owns only
869
- the hostname (+ path). Another namespace can create a wildcard route
870
- even though it does not have the oldest route in that subdomain (`abc.xyz`)
871
- and we could potentially have other namespaces claiming other
872
- non-wildcard overlapping hosts (for example, `foo.abc.xyz`, `bar.abc.xyz`,
873
- `baz.abc.xyz`) and their claims would be granted.
874
-
875
- Any other namespace (for example, `ns2`) can now create
876
- a route `r2` `*_www.abc.xyz/p1/p2_*`, and it would be admitted. Similarly
877
- another namespace (`ns3`) can also create a route `wildthing.abc.xyz`
878
- with a subdomain wildcard policy and it can own the wildcard.
879
-
880
- As this example demonstrates, the policy `ROUTER_DISABLE_NAMESPACE_OWNERSHIP_CHECK=true` is more
881
- lax and allows claims across namespaces. The only time the router would
882
- reject a route with the namespace ownership disabled is if the host+path
883
- is already claimed.
884
-
885
- For example, if a new route `rx` tries to claim `*_www.abc.xyz/p1/p2_*`, it
886
- would be rejected as route `r2` owns that host+path combination. This is true whether route `rx`
887
- is in the same namespace or other namespace since the exact host+path is already claimed.
888
-
889
- This feature can be set during router creation or by setting an environment
890
- variable in the router's deployment configuration.
891
-
892
- ----
893
- $ oc adm router ... --disable-namespace-ownership-check=true
894
- ----
895
-
896
- ----
897
- $ oc env dc/router ROUTER_DISABLE_NAMESPACE_OWNERSHIP_CHECK=true
898
- ----
827
+ ----
0 commit comments