Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
0642d9b
Add certificate renewal bot
timothyb89 Dec 10, 2021
278373b
Cert bot refactoring pass
timothyb89 Jan 21, 2022
3cb5f41
Do not pass through `renewable` flag when role requests are set
timothyb89 Jan 26, 2022
65997a6
Various tbot UX improvements; render SSH config
timothyb89 Jan 26, 2022
ff58ccf
Add stubs for tbot init and watch commands
timothyb89 Jan 26, 2022
75ee80b
Add gRPC endpoints for managing bots
timothyb89 Jan 27, 2022
65b4f91
Fix outdated destination flag in example tbot command
timothyb89 Feb 2, 2022
fced606
Bugfix pass for demo
timothyb89 Feb 2, 2022
e8b3b0f
Address first wave of review feedback
timothyb89 Feb 4, 2022
773a4ef
Add doc comments for bot.go functions
timothyb89 Feb 4, 2022
34ae6a6
Return the token TTL from CreateBot
timothyb89 Feb 4, 2022
9c5ca57
Split initial user cert issuance from `generateUserCerts()`
timothyb89 Feb 8, 2022
17a1c77
Set bot traits to silence log messages
timothyb89 Feb 8, 2022
bd3152b
tbot log message consistency pass
timothyb89 Feb 8, 2022
12942dd
Resolve lints
timothyb89 Feb 10, 2022
8cd83c7
Add config tests
timothyb89 Feb 11, 2022
28bab88
Remove CreateBotJoinToken endpoint
timothyb89 Feb 11, 2022
5a71864
Merge remote-tracking branch 'origin/master' into timothyb89/tbot
timothyb89 Feb 11, 2022
d800382
Create a fresh private key for every impersonated identity renewal
timothyb89 Feb 15, 2022
cefe734
Hide `config` subcommand
timothyb89 Feb 15, 2022
5003459
Rename bot label prefix to `teleport.internal/`
timothyb89 Feb 15, 2022
f725b62
Use types.NewRole() to create bot roles
timothyb89 Feb 16, 2022
4a3a417
Clean up error handling in custom YAML unmarshallers
timothyb89 Feb 16, 2022
28f930b
Fetch proxy host via gRPC Ping() instead of GetProxies()
timothyb89 Feb 16, 2022
00e29b5
Merge remote-tracking branch 'origin/master' into timothyb89/tbot
timothyb89 Feb 17, 2022
a7529b9
Update lib/auth/bot.go
timothyb89 Feb 18, 2022
b1bbcb8
Fix some review comments
timothyb89 Feb 18, 2022
004b25c
Add renewable certificate generation checks (#10098)
timothyb89 Feb 18, 2022
c3be5d6
Address another batch of review feedback
timothyb89 Feb 18, 2022
f004e10
Addres another batch of review feedback
timothyb89 Feb 18, 2022
77c0803
Merge remote-tracking branch 'origin/master' into timothyb89/tbot
timothyb89 Feb 18, 2022
1f946f9
Fix lint
timothyb89 Feb 18, 2022
587974d
Add missing doc comments to SaveIdentity / LoadIdentity
timothyb89 Feb 18, 2022
bd5f514
Merge remote-tracking branch 'origin/master' into timothyb89/tbot
timothyb89 Feb 18, 2022
01546ec
Remove pam tag from tbot build
timothyb89 Feb 18, 2022
bf1cf3a
Update note about bot lock deletion
timothyb89 Feb 18, 2022
c65c56a
Another pass of review feedback
timothyb89 Feb 19, 2022
0300f52
Merge remote-tracking branch 'origin/master' into timothyb89/tbot
timothyb89 Feb 19, 2022
b5fdc5c
Merge branch 'master' into timothyb89/tbot
timothyb89 Feb 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ endif

# On Windows only build tsh. On all other platforms build teleport, tctl,
# and tsh.
BINARIES=$(BUILDDIR)/teleport $(BUILDDIR)/tctl $(BUILDDIR)/tsh
BINARIES=$(BUILDDIR)/teleport $(BUILDDIR)/tctl $(BUILDDIR)/tsh $(BUILDDIR)/tbot
RELEASE_MESSAGE := "Building with GOOS=$(OS) GOARCH=$(ARCH) REPRODUCIBLE=$(REPRODUCIBLE) and $(PAM_MESSAGE) and $(FIPS_MESSAGE) and $(BPF_MESSAGE) and $(ROLETESTER_MESSAGE) and $(RDPCLIENT_MESSAGE)."
ifeq ("$(OS)","windows")
BINARIES=$(BUILDDIR)/tsh
Expand Down Expand Up @@ -208,6 +208,10 @@ $(BUILDDIR)/teleport: ensure-webassets bpf-bytecode rdpclient
$(BUILDDIR)/tsh:
GOOS=$(OS) GOARCH=$(ARCH) $(CGOFLAG_TSH) go build -tags "$(PAM_TAG) $(FIPS_TAG)" -o $(BUILDDIR)/tsh $(BUILDFLAGS) ./tool/tsh

.PHONY: $(BUILDDIR)/tbot
$(BUILDDIR)/tbot:
GOOS=$(OS) GOARCH=$(ARCH) $(CGOFLAG) go build -tags "$(FIPS_TAG)" -o $(BUILDDIR)/tbot $(BUILDFLAGS) ./tool/tbot

#
# BPF support (IF ENABLED)
# Requires a recent version of clang and libbpf installed.
Expand Down
34 changes: 34 additions & 0 deletions api/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,40 @@ func (c *Client) CreateResetPasswordToken(ctx context.Context, req *proto.Create
return token, nil
}

// CreateBot creates a new bot from the specified descriptor.
func (c *Client) CreateBot(ctx context.Context, req *proto.CreateBotRequest) (*proto.CreateBotResponse, error) {
response, err := c.grpc.CreateBot(ctx, req, c.callOpts...)
if err != nil {
return nil, trail.FromGRPC(err)
}

return response, nil
}

// DeleteBot deletes a bot and associated resources.
func (c *Client) DeleteBot(ctx context.Context, botName string) error {
_, err := c.grpc.DeleteBot(ctx, &proto.DeleteBotRequest{
Name: botName,
}, c.callOpts...)
return trail.FromGRPC(err)
}

// GetBotUsers fetches all bot users.
func (c *Client) GetBotUsers(ctx context.Context) ([]types.User, error) {
stream, err := c.grpc.GetBotUsers(ctx, &proto.GetBotUsersRequest{}, c.callOpts...)
if err != nil {
return nil, trail.FromGRPC(err)
}
var users []types.User
for user, err := stream.Recv(); err != io.EOF; user, err = stream.Recv() {
if err != nil {
return nil, trail.FromGRPC(err)
}
users = append(users, user)
}
return users, nil
}

// GetAccessRequests retrieves a list of all access requests matching the provided filter.
func (c *Client) GetAccessRequests(ctx context.Context, filter types.AccessRequestFilter) ([]types.AccessRequest, error) {
rsp, err := c.grpc.GetAccessRequests(ctx, &filter, c.callOpts...)
Expand Down
Loading