Closed manju-rn closed 9 months ago
S3 spec mandates hostnames. We can't change it.
S3 spec mandates hostnames. We can't change it.
is there a way to add additional host names in SERVER_URL
env in minio server?
is there a way to add additional host names in
SERVER_URL
env in minio server?
that's a server question not an mc
question.
is there a way to add additional host names in
SERVER_URL
env in minio server?that's a server question not an
mc
question.
Yes. Correct. Ignore the question here. Will post it there.
However, is there a way to override the host
name when mc sends the details to mino server? like in curl
you can override the host header. Assuming the minio server will use that host header fro signature
is there a way to add additional host names in
SERVER_URL
env in minio server?that's a server question not an
mc
question.Yes. Correct. Ignore the question here. Will post it there. However, is there a way to override the
host
name when mc sends the details to mino server? like incurl
you can override the host header. Assuming the minio server will use that host header fro signature
No sir, that would be security issue.
okay so it looks like minio
service than cannot be called from "meshed" cross cluster resource and via ingress is the only option.
Okay found the solution. Details here for anybody using linkerd-multicluster Problem Statement: The details mentioned at the start of the post has incorrect statement # 3 . Issue is (re)explained below
minio-east
(mirror of corresponding service name minio
located on east cluster)linkerd-multicluster
gateway which intercepts the call from west to east cluster for minio service, it updates the host header from minio-east
to minio
. Although this is technically correct, the calculation of signature done by MC using minio-east
does not match the signature via minio
host calculated by minio server.minio-east
minio
in west cluster - thats it!
How does it work:minio
and not minio-east
. Traffic spit ensures that it calls the mirror service mini-east
and there onto minio
service in east cluster. However, since MC client called the minio
as host, it will calculate its signature using this host name and the signature will match.kind: TrafficSplit
apiVersion: split.smi-spec.io/v1alpha2
metadata:
name: minio-split
namespace: minio-ns
spec:
service: minio #Dummy Service with correct name in west cluster just to redirect traffic to mirrored service minio-east
backends:
- service: minio-east
weight: 1000
---
apiVersion: v1
kind: Service
metadata:
name: minio
namespace: minio-ns
spec:
ports:
- port: 80
targetPort: 80 #Simple headless mapping to the port of the minio-east service
Hope this helps. The transfer of data via linkerd-SMI between 2 cluster is amazingly fast (compared to connecting via domain hosted URL)! Tested from Cloud to local and vice versa.
Expected behavior
I have setup a k8s multicluster setup using linkerd. The way it works is:
minio
service hosted in east cluster will be "mirrored" to west cluster and will be named likeminio-east
Any pods from within the west cluster can call this service as it is local.minio-east
service and connection goes thru fine, but minio server in the east cluster refuses service assignature is not matched
. As i understand, minio server uses the original host name for signature which isminio
but since mc client is calling asminio-east
it refuses. Can mc client override the host entry? OR can minio server ignore the signature verification (since i am anyway calling from mTLS based connection OR is there a way to add additional host names in SERVER_URL env in minio server?Actual behavior
minio throws signature is not matched due to difference in service name /host name
Steps to reproduce the behavior
minio
server in east and annotate linkerd tag to create service mirror in west cluster.minio-east
mc --version
mc --version
) mc version RELEASE.2024-01-18T07-03-39Z (commit-id=bb25267eaadc0e025243b443a94ff33bde6302ad) Runtime: go1.21.6 linux/arm64 Copyright (c) 2015-2024 MinIO, Inc. License GNU AGPLv3 https://www.gnu.org/licenses/agpl-3.0.htmlSystem information
Microk8s