Open richardtief opened 1 month ago
@uwe-mayer can you help here?
The following
In Plutonos index.html a HTML <base>
tag is used. This serves as base for relative URLs in the html document.
Checking a plutono behind the service-proxy
this looks like this:
<base href="/api/v1/namespaces/kube-monitoring/services/http:plutono-obs-eu-de-1:80/proxy/"/>
Then again checking the headers of the service-proxy
we see the following through the exposed-service
debug plugin:
"headers": {
"host": "api.obs-eu-de-1.greenhouse.shoot.canary.k8s-hana.ondemand.com",
...
"upgrade-insecure-requests": "1",
"x-forwarded-for": "100.64.1.13, 10.64.64.116",
"x-forwarded-host": "exposed-service-obs-eu-de-1--ccloud--obs-eu-de-1.ccloud.greenhouse-qa.eu-nl-1.cloud.sap",
"x-forwarded-port": "443",
"x-forwarded-proto": "http",
"x-forwarded-scheme": "https",
"x-forwarded-uri": "/api/v1/namespaces/ccloud/services/http:exposed-service-obs-eu-de-1:8080/proxy/",
"x-real-ip": "100.64.4.1",
"x-request-id": "8fecab3f2e3081b6459398808ac48315",
"x-scheme": "https"
},
The x-fowarded-uri
header seems to have no standard and should be
an exact copy of the incoming request
for what it is worth.
Looking at Plutonos code, the <base>
tag is filled by the AppSubUrl
var.
@richardtief Do you see any configuration possibility on Plutonos side for this? I will investigate further to check if the base tag is actually filled by that header, since for now that is just an assumption.
k8s api-servers sets x-forwarded-uri
on proxy:
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/proxy/transport.go#L90
I just tested running a local plutono and requesting the frontend with the header
x-forwarded-uri: /some/uri
set.
This did not change the <base>
tag of the index.html
Thanks Uwe, I appreciate your efforts. Besides the path, I also stumbled upon the HTTP 401
code from the service proxy logs. It looks like Plutono is the first application that relies on the Authorization
header proxied by the apiserver.
Priority
(Medium) I'm annoyed but I'll live
Description
The service-proxy logs:
plutono logs: (look at the messed up
path
)Reproduction steps
Manifests
No response
Screenshots
Plutono can't be loaded.