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

Fetch trusted CA from the main cluster. #2487

Merged
merged 1 commit into from
Jan 16, 2019
Merged

Fetch trusted CA from the main cluster. #2487

merged 1 commit into from
Jan 16, 2019

Conversation

klizhentas
Copy link
Contributor

This PR fixes an issue with tsh login.

Here is a flaw in logic described using the following
scenario:

Assume there are two clusters, 'main' and 'east'.

  1. User logs into the first cluster 'main'
  2. Selects the cluster 'east' in the profile
  3. Next day, logs in again
  4. Client pulls the trusted CA from the cluster 'main'
    as a part of SSH login procedure and adds to the keystore
  5. Client connects to cluster 'east' because it is
    set as a current cluster in the profile
  6. Client attempts to connect to the auth server of the cluster
    'east' and fails because it does not trust the certificate
    of the 'east' yet, only 'main.

This PR fixes the issue by making sure the client
always connects to the cluster 'main' in the step 5 instead.

@klizhentas klizhentas requested a review from russjones January 16, 2019 03:39
@klizhentas klizhentas force-pushed the sasha/fixlogin branch 2 times, most recently from f115a8a to d67e127 Compare January 16, 2019 22:01
@klizhentas
Copy link
Contributor Author

retest this please

This PR fixes an issue with tsh login.

Here is a flaw in logic described using the following
scenario:

Assume there are two clusters, 'main' and 'east'.

1. User logs into the first cluster 'main'
2. Selects the cluster 'east' in the profile
3. Next day, logs in again
4. Client pulls the trusted CA from the cluster 'main'
as a part of SSH login procedure and adds to the keystore
5. Client connects to cluster 'east' because it is
set as a current cluster in the profile
6. Client attempts to connect to the auth server of the cluster
'east' and fails because it does not trust the certificate
of the 'east' yet, only 'main.

This PR fixes the issue by making sure the client
always connects to the cluster 'main' in the step 5 instead.
@klizhentas klizhentas merged commit 7fc238e into master Jan 16, 2019
@klizhentas klizhentas deleted the sasha/fixlogin branch January 16, 2019 23:38
klizhentas added a commit that referenced this pull request Jan 17, 2019
This PR fixes an issue with tsh login.

Here is a flaw in logic described using the following
scenario:

Assume there are two clusters, 'main' and 'east'.

1. User logs into the first cluster 'main'
2. Selects the cluster 'east' in the profile
3. Next day, logs in again
4. Client pulls the trusted CA from the cluster 'main'
as a part of SSH login procedure and adds to the keystore
5. Client connects to cluster 'east' because it is
set as a current cluster in the profile
6. Client attempts to connect to the auth server of the cluster
'east' and fails because it does not trust the certificate
of the 'east' yet, only 'main.

This PR fixes the issue by making sure the client
always connects to the cluster 'main' in the step 5 instead.
klizhentas added a commit that referenced this pull request Jan 17, 2019
This PR fixes an issue with tsh login.

Here is a flaw in logic described using the following
scenario:

Assume there are two clusters, 'main' and 'east'.

1. User logs into the first cluster 'main'
2. Selects the cluster 'east' in the profile
3. Next day, logs in again
4. Client pulls the trusted CA from the cluster 'main'
as a part of SSH login procedure and adds to the keystore
5. Client connects to cluster 'east' because it is
set as a current cluster in the profile
6. Client attempts to connect to the auth server of the cluster
'east' and fails because it does not trust the certificate
of the 'east' yet, only 'main.

This PR fixes the issue by making sure the client
always connects to the cluster 'main' in the step 5 instead.
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.

2 participants