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

Client Demo API does not load user profile in V17 #53349

Closed
stevenGravy opened this issue Mar 24, 2025 · 4 comments
Closed

Client Demo API does not load user profile in V17 #53349

stevenGravy opened this issue Mar 24, 2025 · 4 comments

Comments

@stevenGravy
Copy link
Contributor

stevenGravy commented Mar 24, 2025

Applies To

https://goteleport.com/docs/admin-guides/api/getting-started/

Details

Attempting to use the Client Demo api example result in an error.

	open /Users/steven/.tsh/keys/teleport.example.com/steven-x509.pem: no such file or directory
➜  client-demo ls /Users/steven/.tsh/keys/teleport.example.com/

How will we know this is resolved?

Update to use the supported profile load for V17.

A workaround is a user does a login to a identity file.

tsh login --out=myuser.pem

Within the go code give the fully qualified path to the identity file.

                Credentials: []client.Credentials{
                        client.LoadIdentityFile("<path to myuser.pem>"),
                },
@nklaassen
Copy link
Contributor

are you using the api module from v17? i.e.

To ensure compatibility, you should use a version of Teleport's API library that matches the major version of Teleport running in your cluster.

To find the pseudoversion appropriate for a go.mod file for a specific git tag, run the following command from the teleport repository:

go list -f '{{.Version}}' -m "github.com/gravitational/teleport/api@$(git rev-parse v12.1.0)" v0.0.0-20230307032901-49a6de744a3a

@nklaassen
Copy link
Contributor

The major version of tsh which you use to log in should match the major version of the github.com/gravitational/teleport/api/client Go module, or else it may look in the wrong path for the user certificates. The path changed in Teleport v17

@stevenGravy
Copy link
Contributor Author

It's the same v17

@stevenGravy
Copy link
Contributor Author

Closing as not able to recreate for now.

@zmb3 zmb3 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants