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

Add check for empty ClusterNames, ServerHostname in retrieving sessions #4027

Merged
merged 5 commits into from
Jul 15, 2020

Conversation

kimlisa
Copy link
Contributor

@kimlisa kimlisa commented Jul 13, 2020

fixes #4012

Description

Teleport node's running < v4.3 does not set ClusterName and ServerHostname for session info, which is needed to form session URL in the UI and to display information. This PR handles this incompatibility.

Manual Testing

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

Reliant PR

gravitational/webapps#123

@kimlisa kimlisa marked this pull request as ready for review July 13, 2020 22:36
Copy link
Contributor

@webvictim webvictim left a comment

Choose a reason for hiding this comment

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

LGTM, I'll leave others for final review

@kimlisa kimlisa marked this pull request as draft July 14, 2020 19:24
@kimlisa kimlisa marked this pull request as ready for review July 15, 2020 01:25
@kimlisa kimlisa changed the title Add check for empty clusterNames in siteSessionGet Add check for empty ClusterNames, ServerHostname in siteSessionGet Jul 15, 2020
@kimlisa kimlisa changed the title Add check for empty ClusterNames, ServerHostname in siteSessionGet Add check for empty ClusterNames, ServerHostname in retrieving sessions Jul 15, 2020
@kimlisa kimlisa requested a review from fspmarshall July 15, 2020 01:55
c.Assert(err, IsNil)

var sessionList *siteSessionsGetResponse
json.Unmarshal(res.Bytes(), &sessionList)
Copy link
Contributor

Choose a reason for hiding this comment

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

Unmarshal returns an err which should be checked.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

revised

Copy link
Contributor

@awly awly left a comment

Choose a reason for hiding this comment

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

LGTM, pending Forrest's comment

@kimlisa kimlisa merged commit 5d870d4 into master Jul 15, 2020
@kimlisa kimlisa deleted the lisa/bw-comp-session-clusterName branch July 15, 2020 18:17
kimlisa pushed a commit that referenced this pull request Jul 15, 2020
kimlisa pushed a commit that referenced this pull request Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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)
4 participants