Skip to content
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

[UI] Names of cookies with a colon #587

Closed
rudre opened this issue May 29, 2024 · 2 comments
Closed

[UI] Names of cookies with a colon #587

rudre opened this issue May 29, 2024 · 2 comments
Assignees
Labels

Comments

@rudre
Copy link

rudre commented May 29, 2024

When I attempt to access the UI via the Teleport proxy, issues arise and I receive a 401 error.

Research has shown that when proxying via Teleport, cookies that contain a colon in the name are lost. In my case, this is a cookie named "smith:YTCypressCookie".

It seems that it is best not to use colons in cookie names:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#cookie-namecookie-value
If you believe this documentation and the Internet, then there may be problems not only with Teleport, but also with other services.

I have collected the output from tcpdump, which shows that at the time of the POST request to /login, cookies "YTCypressCookie" and "smith:YTCypressCookie" were installed. Then, when a GET request was made to /api/cluster-info/smith, "smith:YTCypressCookie" was no longer present, but "YTCypressCookie" remained.
When the UI makes a request to http proxies in the handle /auth/whoami, cookie "YTCypressCookie" is marked as undefined (as I understand it, it is put there from "smith:YTCypressCookie"). After this, we receive a 401 Unauthorized response + code 500 Unknown credentials. And I am not receiving a csrf_token.

PS
When I navigate directly to the user interface (without Teleport) page, I fill out a form with my username and password and am taken to the administrative interface for my cluster. All is well here.
I have attached the output from a tcpdump session when navigating directly to the UI to demonstrate that cookies are functioning properly and are not being lost.

Components version:
ytsaurus: stable-23.2.0-relwithdebinfo
ui: 1.34.0
query-tracker: 0.0.5-ya-build-relwithdebinfo
strawberry: 0.0.11

teleport: 10.3.16

@ma-efremoff
Copy link
Collaborator

ma-efremoff commented May 29, 2024

Looks like another side effect of #349. @vitshev, please look at the issue

@ma-efremoff
Copy link
Collaborator

@rudre, please try ytsaurus/ui-nightly:1.42.1 docker image. Feel free to reopen the issue if it doesn't help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants