mirror of
https://github.com/gravitational/teleport
synced 2024-10-21 01:34:01 +00:00
83eb9b2acb
We're now using Go 1.18 features (native fuzzing in https://github.com/gravitational/teleport/pull/13473), which means we need to accurately state that we require Go 1.18 in our go.mod. |
||
---|---|---|
.. | ||
access-admin.yaml | ||
go.mod | ||
go.sum | ||
main.go | ||
README.md |
Teleport Auth Go Client
This program demonstrates how to...
- Authenticate the client using credential loaders.
- Authorize API calls using an independent user and role.
- Create a new client and make API calls to the Auth server.
Demo
This demo can be used to quickly get the API client up and running.
Create resources
Create the access-admin
user and role using the following commands:
$ tctl create -f access-admin.yaml
$ tctl users add access-admin --roles=access-admin
Generate Credentials
Login with tsh
to generate Profile credentials.
# login and automatically generate keys
$ tsh login --user=access-admin
NOTE: You can pass the InsecureAddressDiscovery
in client.Config
field to skip verification of the TLS certificate of the proxy. Don't do this for production clients.
Run
$ go run main.go
Reference
To see more information on the Go Client and how to use it, visit our API documentation: