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

(5.5) Backport teleport fix for trusted clusters regression #1577

Merged
merged 2 commits into from
May 18, 2020

Conversation

r0mant
Copy link
Contributor

@r0mant r0mant commented May 18, 2020

Description

Revendor Teleport fix (gravitational/teleport#3726) that fixes a regression with trusted clusters back from January (gravitational/teleport#3252). This was fixed in later versions but never backported to 5.5

The gist of the issue is that after connecting a leaf cluster to a root cluster, the leaf cluster would attempt to look up the role a user has in the root cluster (i.e. from the certificate) instead of using role mapping.

Type of change

  • Regression fix (non-breaking change which fixes a regression)

Linked tickets and other PRs

TODOs

  • Self-review the change
  • Perform manual testing
  • Address review feedback

Testing done

Setup

Role in the hub:

kind: role
version: v3
metadata:
  name: viewer
spec:
  allow:
    kubernetes_groups:
    - view
    logins:
    - guest


Trusted cluster role mapping:

  role_map:
  - remote: "viewer"
    local: ["@teleadmin", "admin"]

Before

➜  bin ./tele login --hub=hub.gravitational.io:32009 testcluster --token=viewer-token
Hub:		hub.gravitational.io
Username:	viewer
Cluster:	testcluster
Expires:	Never
➜  bin ./tsh ls
error: role "viewer" is not found

After

➜  bin ./tsh ls
Node Name                  Address             Labels
-------------------------- ------------------- ---------------------------------------------------------------
192_168_99_103.testcluster 192.168.99.103:3022 advertise-ip=192.168.99.103, app-role=node
                                               display-role=Gravity Auto Node, fqdn=192_168_99_103.testcluster
                                               gravitational.io/k8s-role=master, hostname=node-2
                                               instance-type=, role=node

@r0mant r0mant requested a review from a team May 18, 2020 15:39
@r0mant r0mant self-assigned this May 18, 2020
@r0mant r0mant requested review from a-palchikov and knisbet May 18, 2020 15:39
@r0mant r0mant merged commit 0714492 into version/5.5.x May 18, 2020
@r0mant r0mant deleted the roman/5.5/rolemap3 branch May 18, 2020 18:06
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.

2 participants