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

Keys written with incorrect username when SAML #1749

Closed
russjones opened this issue Mar 6, 2018 · 1 comment
Closed

Keys written with incorrect username when SAML #1749

russjones opened this issue Mar 6, 2018 · 1 comment

Comments

@russjones
Copy link
Contributor

Problem

When using an external identity provider, tsh login writes keys to disk with the wrong name (name of the local Linux user) instead of the username returned by the identity provide. This was fixed in #1642 but not backported to branch/2.4.

$ ./tsh.sh --proxy=localhost login
If browser window does not open automatically, open it by clicking on the link:
[...]

You are now logged in

$ tree ~/.tsh/
/Users/rjones/.tsh/
├── keys
│   └── localhost
│       ├── rjones
│       ├── rjones-cert.pub
│       └── rjones.pub
├── known_hosts
├── localhost.yaml
└── profile -> localhost.yaml

$ ./tsh.sh --proxy=localhost ls
If browser window does not open automatically, open it by clicking on the link:
[...]

Node Name Node ID                              Address        Labels                                                        
--------- ------------------------------------ -------------- ------------------------------------------------------------- 
proxy     30465e32-7b48-4d8f-9b24-be80c2dd77c9 127.0.0.1:3022 arch=fork/exec /bin/uname: no such file or directory output:  

$ tree ~/.tsh/
/Users/rjones/.tsh/
├── cache
│   └── localhost:3023
│       └── example.com
│           └── namespaces
│               └── default
│                   └── nodes
│                       └── 30465e32-7b48-4d8f-9b24-be80c2dd77c9
├── keys
│   └── localhost
│       ├── rjones
│       ├── rjones-cert.pub
│       ├── rjones.pub
│       ├── [email protected]
│       ├── [email protected]
│       └── [email protected]
├── known_hosts
├── localhost.yaml
└── profile -> localhost.yaml

8 directories, 10 files

Proposed Solution

Backport the chunk of #1642 where the username in the local agent is set if using an external identity provider.

@russjones
Copy link
Contributor Author

Fixed in #1750.

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

No branches or pull requests

1 participant