Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Add alternate way to set clusterID #122

Closed
wants to merge 1 commit into from
Closed

Conversation

kimlisa
Copy link
Contributor

@kimlisa kimlisa commented Jul 11, 2020

fixes gravitational/teleport#4012

Description

Teleport node's running < v4.3 does not set clusterID for session info, which is needed to form session URL. This PR handles this incompatibility.

Manual Testing

Reproduced issue and tested with Proxy/Auth v4.3 with Node v4.2.11

@kimlisa kimlisa requested a review from alex-kovoy July 11, 2020 00:11
* getClusterIDFromURL solves empty clusterID result with Teleport
* Node's using versions < 4.3 (clusterId is not set for older versions).
*/
const getClusterIDFromURL = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot reach out to the browser URL from any place in the code and manually parse parameters. Normally you access the URL from UI layer (React components + React Router). If you look at how makeSession is invoke you will see that clusterID is coming from UI components where it already uses the clusterID to make a call to the web API.

That said, I now think that it's better to handle this use-case on the WebAPI layer. That would be a better place for the temporary fix as this is where missing id is coming from (this is not UI bug).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created PR to apply patch on the web apiserver instead: gravitational/teleport#4027

@kimlisa
Copy link
Contributor Author

kimlisa commented Jul 13, 2020

created PR to apply patch on the web apiserver instead: gravitational/teleport#4027

@kimlisa kimlisa closed this Jul 13, 2020
@alex-kovoy alex-kovoy deleted the lisa/setting-clusterID branch August 3, 2020 14:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot join an active session on some of the clusters (4.3)
2 participants