[v18] Add Linux desktop support (#68401)

* Add LinuxDesktop protos and generated code (#62971)

* Add LinuxDesktop gRPC and backend (#62974)

* Add LinuxDesktop gRPC and backend

* Remove CloneResource

* Review comments

* Fix logins

* Update lib/auth/linuxdesktop/linuxdesktopv1/service.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix role

---------

Co-authored-by: Zac Bergquist <[email protected]>

* Add LinuxDesktop resource to unified resources (#63101)

* Add LinuxDesktop gRPC and backend

* Add LinuxDesktop resource to unified resources

* Remove CloneResource

* Review comments

* Fix logins

* Review comment

* Add ClonableResourceWithLabels

* Fix missing CloneResource

* Update lib/auth/linuxdesktop/linuxdesktopv1/service.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix role

* Update lib/auth/auth_with_roles.go

Co-authored-by: Zac Bergquist <[email protected]>

* Update lib/web/ui/server.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix compilation

* e

* skip gogoproto

* e

* fix test

* Update api/client/proto/linuxdesktop.go

Co-authored-by: Zac Bergquist <[email protected]>

---------

Co-authored-by: Zac Bergquist <[email protected]>

* Add tctl support for Linux desktop (#63273)

* Add LinuxDesktop gRPC and backend

* Add tctl support for Linux desktop

* Add LinuxDesktop gRPC and backend

* Remove CloneResource

* Review comments

* Fix logins

* Update lib/auth/linuxdesktop/linuxdesktopv1/service.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix role

* Remove duplicate code

* Cleanup

* Fix test

---------

Co-authored-by: Zac Bergquist <[email protected]>

* Proto changes for Linux Desktop (#65692)

* Add LinuxDesktop gRPC and backend

* Add LinuxDesktop resource to unified resources

* Remove CloneResource

* Review comments

* Fix logins

* Review comment

* Add ClonableResourceWithLabels

* Fix missing CloneResource

* Update lib/auth/linuxdesktop/linuxdesktopv1/service.go

Co-authored-by: Zac Bergquist <[email protected]>

* Proto changes for Linux Desktop

* Fix role

* Update lib/auth/auth_with_roles.go

Co-authored-by: Zac Bergquist <[email protected]>

* Update lib/web/ui/server.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix compilation

* Review comments

* Review comments

* e

* skip gogoproto

* e

* fix test

---------

Co-authored-by: Zac Bergquist <[email protected]>

* Add locks support for Linux desktop (#65761)

* Add LinuxDesktop gRPC and backend

* Add LinuxDesktop resource to unified resources

* Remove CloneResource

* Review comments

* Fix logins

* Review comment

* Add ClonableResourceWithLabels

* Fix missing CloneResource

* Update lib/auth/linuxdesktop/linuxdesktopv1/service.go

Co-authored-by: Zac Bergquist <[email protected]>

* Proto changes for Linux Desktop

* Add locks support for Linux desktop

* Fix role

* Update lib/auth/auth_with_roles.go

Co-authored-by: Zac Bergquist <[email protected]>

* Update lib/web/ui/server.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix compilation

* Review comments

* Review comments

* fix e

---------

Co-authored-by: Zac Bergquist <[email protected]>

* Fix compilation

* Operator CRD

* Fix test

* Add Linux desktop support (#65841)

* Implement support for TDPB in Desktop Agent.

* Add LinuxDesktop gRPC and backend

* Add LinuxDesktop resource to unified resources

* Add Linux desktop service

* Remove CloneResource

* Review comments

* Unifide fix

* routing

* Fix logins

* Fix logins

* Fix CA cache and write basic loop

* Review comment

* Fix components and handleConnection

* Review comment

* Add ClonableResourceWithLabels

* Fix missing CloneResource

* Add Xvfb handlers

* Add Xephyr

* Add Xvfb controller

* Add QOI encoder

* encoder + xsession

* reexec

* ChildLogConfig

* session

* add forceloginshell

* update frontend + fix session

* Review comments

* Fix code, update docs

* Fix TARGETS format, reuse waiting

* Remove direct mode

* Update lib/auth/linuxdesktop/linuxdesktopv1/service.go

Co-authored-by: Zac Bergquist <[email protected]>

* Add MFA and cert usage support

* Add RemoteAddr

* Revert Uacc setup

* Add session selector

* Refactor code

* Add session recording, tracking and events

* Add session recording, tracking and events

* Refactor command reexecution

* Review comments

* Use reexec.ConfigureCommand

* Proto changes for Linux Desktop

* Proto changes for Linux Desktop

* Add locks support for Linux desktop

* Add guard around m.ScreenSpec

* Cleanup

* Add activity monitor

* Cleanup

* Fix compilation

* Cleanup unified view

* Refactor linux session

* Add logging

* Add logging

* go mod tidy

* Adjust logging

* go mod tidy

* Grab stderr from reexec

* Fix UACC

* pass remote addr to uacc

* TMP: debug images

* Fix panic

* TMP: debug images

* limit change size

* Monitor resolution and restore it

* TMP: debug images

* TMP: debug images

* TMP: debug images

* Modify screen resize

* TMP: debug images

* TMP: debug images

* Add XDG env variable

* Use dbus-run-session

* pam

* variables fix

* variables fix

* revert uacc

* cleanup

* EncodeQOIZ noop

* EncodeQOIZ noop

* Fix auditing

* Cleanup

* Fix type check

* Fix formatting

* Fix licenses

* Fix lint

* go mod tidy

* Fix audit reference

* Fix log

* Fix tests

* Fix tests

* Remove testing from xgb

* go mod tidy

* Fix tests

* xgb 1.3.1

* Handle multiple SessionSelection messages

* Add filters for sessions

* fix events

* Fix compilation + events

* Fix test

* Fix test

* Fix UI

* cleanup

* review comments

* Rework poll eq

* Fix bounds clipping

* fix imports

* lint

* lint

* err

* Fix locking in resize

* Fix ReadChildError

* remove dependabot exclusion

* Fix session end

* Cleanup metedata

* Fix session events

* Ignore multiple ClientHello

* Use slices.IndexFunc in setScreenSize

* Cleanup unused code

* Update lib/service/linux_desktop.go

Co-authored-by: Zac Bergquist <[email protected]>

* Use slices.Clone

* Update lib/srv/desktop/x11/xsession.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix import

* Use filepath.Glob

* Simplify testdata path calculation

* Cleanup comment

* Cleanup endpoints

* Update lib/web/apiserver.go

Co-authored-by: Zac Bergquist <[email protected]>

* Update lib/web/desktop.go

Co-authored-by: Zac Bergquist <[email protected]>

* Cleanup createDesktopConnection signature

* Cleanup createDesktopConnection signature

* Use server capabilities

* Remove dep override

* Add bounds check

* Cleanup

* Add EndTime to reconstructed event

* use cleanupCtx

* cleanup

* Add configuration test

* Add horizontal scroll

* Review comments

* Fix scrolling

* Fix scrolling

* Sort available sessions

* Fix build

* Add bounds check

* Fix tests

* Move expiry

* lint

* Add back metadata nil check

* lint

* Add usage reporting

* Fix error handling

* Fix resizing, add lock prevention

* Move backend creation after authorization

* Fix possible panic in handleSessionSelection

* Check if clipboard is allowed

* Cleanup errors during normal session ending

* use errgroup for all backround tasks

* Review comments

* fix heartbeat

* add guard for root

* fix tests

* add negative check in changes

* cleanup

* cleanup

* add guard

* Review comments

* Review comments

* Review comments

* Review comments

* Review comments

* Read only access for RoleLinuxDesktop

* use dbus-launch

* Add Linux Desktops to inventory UI

* Use X11 launcher script to start sessions

Use a launch script instead of executing the Exec= line from the
Xsession file directly. This handles the "default" case on Debian
systems where the Xsession file reads `Exec=default`.

The launcher can be explicitly configured at the agent level or
left blank, in which case we probe a set of well-known launchers.

* Compositing support

* Fix dbus launcher

Support both `dbus-run-session` and the older `dbus-launch`.

* Fix error messages when Xvfb is not installed

* Add non-root warning

* Use forceFullDamage for resize

* Fix Open API usage

* invalid user test fix

* remove commented code

* Complete TLS handshake

* Improve error message

* Logged wrapped command

* Add dbus-daemon as dependency for dbus-launch

* Update dbus warning and add llvm check to macos build

* Add LinuxDesktop to role list in new token dialog

* Fix teleport start role validation

* Run messageLoop in separate goroutine

* Add LinuxDesktop labels to Admin role

* Add handling for extended keys and ID reuse

* Cleanup shut down logs

* Xsession cleanup

* Rework llvm requirement in Makefile

---------

Co-authored-by: Ryan Hammonds <[email protected]>
Co-authored-by: Zac Bergquist <[email protected]>

* Add support for `internal.linux_desktop_logins` trait (#67777)

* Add support for internal.linux_desktop_logins trait

* Fix xsession test

* Check Linux Desktop Kind is valid (#68675)

* Fix compilation

* Validate Kind at service level (#68710)

* tctl fix

* Fix reexecution

* Fix UI and service

* Fix Windows webassets build

* Add desktop name to active session

* Fix tctl get/edit linux_desktop

* imports

* fix logging

* fix logging

* License

* lint

* Clean logs

* Add xauth entry before starting Xvfb

* Fix release build

* Fix release build

* Fix labels handling

* lint

* tsh recordings export: support Linux desktop recordings

* Fix ListLinuxDesktops

---------

Co-authored-by: Zac Bergquist <[email protected]>
Co-authored-by: Ryan Hammonds <[email protected]>
Co-authored-by: Dan Share <[email protected]>
This commit is contained in:
Przemko Robakowski
2026-07-28 17:02:35 +00:00
committed by GitHub
co-authored by Ryan Hammonds Zac Bergquist Dan Share
parent ff7b50c902
commit a2e3c53e42
223 changed files with 22024 additions and 6503 deletions
+10
View File
@@ -51,6 +51,16 @@ PRs with corrections and updates are welcome!
# or open a new shell
```
* Install `llvm`:
```shell
brew install llvm
# Update PATH and apply changes to shell
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
```
* To install `libfido2` (pulls `openssl 3` as dependency)
```shell
Generated
+51
View File
@@ -1736,7 +1736,9 @@ dependencies = [
"ironrdp-graphics",
"ironrdp-pdu",
"ironrdp-svc",
"qoicoubeh",
"tracing",
"zstd-safe",
]
[[package]]
@@ -2521,6 +2523,24 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "qoi"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001"
dependencies = [
"bytemuck",
]
[[package]]
name = "qoicoubeh"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9b82aa3fef8a980075775b8c46f874823b5b4a15de327d2dbb3b6fd818480ba"
dependencies = [
"bytemuck",
]
[[package]]
name = "quote"
version = "1.0.45"
@@ -2649,6 +2669,7 @@ dependencies = [
"ironrdp-core",
"ironrdp-displaycontrol",
"ironrdp-dvc",
"ironrdp-graphics",
"ironrdp-pdu",
"ironrdp-rdpdr",
"ironrdp-rdpsnd",
@@ -2662,6 +2683,7 @@ dependencies = [
"picky",
"picky-asn1-der",
"picky-asn1-x509",
"qoi",
"rand 0.9.4",
"rdp-decoder",
"reqwest 0.13.4",
@@ -2674,6 +2696,7 @@ dependencies = [
"url",
"utf16string",
"uuid",
"zstd",
]
[[package]]
@@ -4497,3 +4520,31 @@ name = "zmij"
version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
[[package]]
name = "zstd"
version = "0.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
version = "7.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d"
dependencies = [
"zstd-sys",
]
[[package]]
name = "zstd-sys"
version = "2.0.16+zstd.1.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
dependencies = [
"cc",
"pkg-config",
]
+46 -2
View File
@@ -58,8 +58,24 @@ BUILDFLAGS_TBOT ?= $(ADDFLAGS) -ldflags '$(GO_LDFLAGS)' -trimpath -buildvcs=fals
BUILDFLAGS_TELEPORT_UPDATE ?= $(ADDFLAGS) -ldflags '$(GO_LDFLAGS)' -trimpath -buildvcs=false
endif
# HOST_OS is the platform make is running on, which is not necessarily
# the same as the platform we are building for (that's OS).
HOST_UNAME := $(shell uname -s 2>/dev/null)
ifeq ($(HOST_UNAME),Darwin)
HOST_OS := darwin
else ifeq ($(HOST_UNAME),Linux)
HOST_OS := linux
else ifneq (,$(filter MINGW% MSYS% CYGWIN%,$(HOST_UNAME)))
HOST_OS := windows
else ifeq ($(OS),Windows_NT)
# Native Windows make has no uname, but Windows always sets OS=Windows_NT.
HOST_OS := windows
else
HOST_OS := unknown
endif
GO_ENV_OS := $(shell go env GOOS)
OS ?= $(GO_ENV_OS)
OS ?= $(or $(GO_ENV_OS),$(HOST_OS))
GO_ENV_ARCH := $(shell go env GOARCH)
ARCH ?= $(GO_ENV_ARCH)
@@ -552,7 +568,11 @@ export ironrdp_package_json
.PHONY: build-ironrdp-wasm
build-ironrdp-wasm: ironrdp = web/packages/shared/libs/ironrdp
build-ironrdp-wasm: ensure-wasm-deps
ifeq ($(HOST_OS),darwin)
CC="$(CC)" AR="$(AR)" RUSTFLAGS='--cfg getrandom_backend="wasm_js"' cargo build --package ironrdp --lib --target $(CARGO_WASM_TARGET) --release
else
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' cargo build --package ironrdp --lib --target $(CARGO_WASM_TARGET) --release
endif
wasm-opt target/$(CARGO_WASM_TARGET)/release/ironrdp.wasm -o target/$(CARGO_WASM_TARGET)/release/ironrdp.wasm -O
wasm-bindgen target/$(CARGO_WASM_TARGET)/release/ironrdp.wasm --out-dir $(ironrdp)/pkg --typescript --target web
printenv ironrdp_package_json > $(ironrdp)/pkg/package.json
@@ -1931,7 +1951,31 @@ ensure-js-deps:
ifeq ($(WEBASSETS_SKIP_BUILD),1)
ensure-wasm-deps:
else
ensure-wasm-deps: rustup-toolchain-warning ensure-wasm-bindgen ensure-wasm-opt
ensure-wasm-deps: ensure-llvm rustup-toolchain-warning ensure-wasm-bindgen ensure-wasm-opt
.PHONY: ensure-llvm
ifeq ($(HOST_OS),darwin)
BREW_DIR = $(shell brew --prefix)
LLVM_PREFIX = $(shell brew list | grep llvm | head -n 1)
LLVM_DIR = $(shell brew --prefix $(LLVM_PREFIX))
# Prevent these from being exported and expanded for every recipe.
unexport BREW_DIR LLVM_PREFIX LLVM_DIR
# The ironrdp WASM build needs clang/llvm-ar.
# These are applied as target-specific variables so
# brew is only invoked when necessary and so that
# CC and AR are only overwritten for WASM compilation.
build-ironrdp-wasm: override CC = $(LLVM_DIR)/bin/clang
build-ironrdp-wasm: override AR = $(LLVM_DIR)/bin/llvm-ar
ensure-llvm:
@if [[ "$(BREW_DIR)" = "$(LLVM_DIR)" ]]; then \
echo "llvm is required, please run 'brew install llvm' and add '/opt/homebrew/opt/llvm/bin' at the start of PATH variable"; \
exit 1; \
fi
else
ensure-llvm:
endif
WASM_BINDGEN_VERSION = $(shell awk ' \
$$1 == "name" && $$3 == "\"wasm-bindgen\"" { in_pkg=1; next } \
+17
View File
@@ -57,6 +57,7 @@ import (
"github.com/gravitational/teleport/api/client/externalauditstorage"
gitserverclient "github.com/gravitational/teleport/api/client/gitserver"
kubewaitingcontainerclient "github.com/gravitational/teleport/api/client/kubewaitingcontainer"
"github.com/gravitational/teleport/api/client/linuxdesktop"
"github.com/gravitational/teleport/api/client/okta"
"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/teleport/api/client/scim"
@@ -93,6 +94,7 @@ import (
joinv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/join/v1"
kubeproto "github.com/gravitational/teleport/api/gen/proto/go/teleport/kube/v1"
kubewaitingcontainerpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
loginrulepb "github.com/gravitational/teleport/api/gen/proto/go/teleport/loginrule/v1"
machineidv1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/machineid/v1"
mfav1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/mfa/v1"
@@ -3084,6 +3086,18 @@ func (c *Client) GetDynamicWindowsDesktop(ctx context.Context, name string) (typ
return c.DynamicDesktopClient().GetDynamicWindowsDesktop(ctx, name)
}
// LinuxDesktopClient returns a LinuxDesktop client.
// Clients connecting to older Teleport versions, still get a LinuxDesktop client
// when calling this method, but all RPCs will return "unknown service" errors
// (as per the default gRPC behavior).
func (c *Client) LinuxDesktopClient() *linuxdesktop.Client {
return linuxdesktop.NewClient(linuxdesktopv1.NewLinuxDesktopServiceClient(c.conn))
}
func (c *Client) GetLinuxDesktop(ctx context.Context, name string) (*linuxdesktopv1.LinuxDesktop, error) {
return c.LinuxDesktopClient().GetLinuxDesktop(ctx, name)
}
// ClusterConfigClient returns an unadorned Cluster Configuration client, using the underlying
// Auth gRPC connection.
func (c *Client) ClusterConfigClient() clusterconfigpb.ClusterConfigServiceClient {
@@ -4705,6 +4719,9 @@ func convertEnrichedResource(resource *proto.PaginatedResource) (*types.Enriched
return &types.EnrichedResource{ResourceWithLabels: r, RequiresRequest: resource.RequiresRequest}, nil
} else if r := resource.GetGitServer(); r != nil {
return &types.EnrichedResource{ResourceWithLabels: r, RequiresRequest: resource.RequiresRequest}, nil
} else if r := resource.GetLinuxDesktop(); r != nil {
desktop := proto.UnpackLinuxDesktop(r)
return &types.EnrichedResource{ResourceWithLabels: desktop, Logins: resource.Logins, RequiresRequest: resource.RequiresRequest}, nil
} else {
return nil, trace.BadParameter("received unsupported resource %T", resource.Resource)
}
+8
View File
@@ -27,6 +27,7 @@ import (
healthcheckconfigv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/healthcheckconfig/v1"
identitycenterv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/identitycenter/v1"
kubewaitingcontainerpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
machineidv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/machineid/v1"
notificationsv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/notifications/v1"
presencev1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/presence/v1"
@@ -145,6 +146,10 @@ func EventToGRPC(in types.Event) (*proto.Event, error) {
out.Resource = &proto.Event_AutoUpdateBotInstanceReport{
AutoUpdateBotInstanceReport: r.UnwrapT(),
}
case types.Resource153UnwrapperT[*linuxdesktopv1.LinuxDesktop]:
out.Resource = &proto.Event_LinuxDesktop{
LinuxDesktop: r.UnwrapT(),
}
case types.Resource153UnwrapperT[*scopedaccessv1.ScopedRole]:
out.Resource = &proto.Event_ScopedRole{
ScopedRole: r.UnwrapT(),
@@ -724,6 +729,9 @@ func EventFromGRPC(in *proto.Event) (*types.Event, error) {
} else if r := in.GetRecordingEncryption(); r != nil {
out.Resource = types.ProtoResource153ToLegacy(r)
return &out, nil
} else if r := in.GetLinuxDesktop(); r != nil {
out.Resource = types.ProtoResource153ToLegacy(r)
return &out, nil
} else if r := in.GetInferenceModel(); r != nil {
out.Resource = types.ProtoResource153ToLegacy(r)
return &out, nil
+100
View File
@@ -0,0 +1,100 @@
// Copyright 2026 Gravitational, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package linuxdesktop
import (
"context"
"github.com/gravitational/trace"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
)
// Client is a client for the Linux Desktop API.
type Client struct {
grpcClient linuxdesktopv1.LinuxDesktopServiceClient
}
// NewClient creates a new Linux Desktop client.
func NewClient(grpcClient linuxdesktopv1.LinuxDesktopServiceClient) *Client {
return &Client{
grpcClient: grpcClient,
}
}
// ListLinuxDesktops returns a list of Linux Desktops.
func (c *Client) ListLinuxDesktops(ctx context.Context, pageSize int, nextToken string) ([]*linuxdesktopv1.LinuxDesktop, string, error) {
req := &linuxdesktopv1.ListLinuxDesktopsRequest{}
req.SetPageSize(int32(pageSize))
req.SetPageToken(nextToken)
resp, err := c.grpcClient.ListLinuxDesktops(ctx, req)
if err != nil {
return nil, "", trace.Wrap(err)
}
return resp.GetLinuxDesktops(), resp.GetNextPageToken(), nil
}
// CreateLinuxDesktop creates a new Linux Desktop.
func (c *Client) CreateLinuxDesktop(ctx context.Context, req *linuxdesktopv1.LinuxDesktop) (*linuxdesktopv1.LinuxDesktop, error) {
r := &linuxdesktopv1.CreateLinuxDesktopRequest{}
r.SetLinuxDesktop(req)
rsp, err := c.grpcClient.CreateLinuxDesktop(ctx, r)
if err != nil {
return nil, trace.Wrap(err)
}
return rsp, nil
}
// GetLinuxDesktop returns a Linux Desktop by name.
func (c *Client) GetLinuxDesktop(ctx context.Context, name string) (*linuxdesktopv1.LinuxDesktop, error) {
req := &linuxdesktopv1.GetLinuxDesktopRequest{}
req.SetName(name)
rsp, err := c.grpcClient.GetLinuxDesktop(ctx, req)
if err != nil {
return nil, trace.Wrap(err)
}
return rsp, nil
}
// UpdateLinuxDesktop updates an existing Linux Desktop.
func (c *Client) UpdateLinuxDesktop(ctx context.Context, req *linuxdesktopv1.LinuxDesktop) (*linuxdesktopv1.LinuxDesktop, error) {
r := &linuxdesktopv1.UpdateLinuxDesktopRequest{}
r.SetLinuxDesktop(req)
rsp, err := c.grpcClient.UpdateLinuxDesktop(ctx, r)
if err != nil {
return nil, trace.Wrap(err)
}
return rsp, nil
}
// UpsertLinuxDesktop updates an existing Linux Desktop or creates one.
func (c *Client) UpsertLinuxDesktop(ctx context.Context, req *linuxdesktopv1.LinuxDesktop) (*linuxdesktopv1.LinuxDesktop, error) {
r := &linuxdesktopv1.UpsertLinuxDesktopRequest{}
r.SetLinuxDesktop(req)
rsp, err := c.grpcClient.UpsertLinuxDesktop(ctx, r)
if err != nil {
return nil, trace.Wrap(err)
}
return rsp, nil
}
// DeleteLinuxDesktop deletes a Linux Desktop.
func (c *Client) DeleteLinuxDesktop(ctx context.Context, name string) error {
req := &linuxdesktopv1.DeleteLinuxDesktopRequest{}
req.SetName(name)
_, err := c.grpcClient.DeleteLinuxDesktop(ctx, req)
return trace.Wrap(err)
}
@@ -0,0 +1,169 @@
// Copyright 2026 Gravitational, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package linuxdesktop
import (
"context"
"testing"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"
"google.golang.org/protobuf/types/known/emptypb"
headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
"github.com/gravitational/teleport/api/types"
)
type mockClient struct {
linuxdesktopv1.LinuxDesktopServiceClient
listRequest *linuxdesktopv1.ListLinuxDesktopsRequest
createRequest *linuxdesktopv1.CreateLinuxDesktopRequest
getRequest *linuxdesktopv1.GetLinuxDesktopRequest
updateRequest *linuxdesktopv1.UpdateLinuxDesktopRequest
upsertRequest *linuxdesktopv1.UpsertLinuxDesktopRequest
deleteRequest *linuxdesktopv1.DeleteLinuxDesktopRequest
listResponse []*linuxdesktopv1.LinuxDesktop
}
func (m *mockClient) ListLinuxDesktops(_ context.Context, in *linuxdesktopv1.ListLinuxDesktopsRequest, _ ...grpc.CallOption) (*linuxdesktopv1.ListLinuxDesktopsResponse, error) {
m.listRequest = in
rsp := &linuxdesktopv1.ListLinuxDesktopsResponse{}
rsp.SetLinuxDesktops(m.listResponse)
rsp.SetNextPageToken("next")
return rsp, nil
}
func (m *mockClient) CreateLinuxDesktop(_ context.Context, in *linuxdesktopv1.CreateLinuxDesktopRequest, _ ...grpc.CallOption) (*linuxdesktopv1.LinuxDesktop, error) {
m.createRequest = in
return in.GetLinuxDesktop(), nil
}
func (m *mockClient) GetLinuxDesktop(_ context.Context, in *linuxdesktopv1.GetLinuxDesktopRequest, _ ...grpc.CallOption) (*linuxdesktopv1.LinuxDesktop, error) {
m.getRequest = in
return newLinuxDesktop(in.GetName()), nil
}
func (m *mockClient) UpdateLinuxDesktop(_ context.Context, in *linuxdesktopv1.UpdateLinuxDesktopRequest, _ ...grpc.CallOption) (*linuxdesktopv1.LinuxDesktop, error) {
m.updateRequest = in
return in.GetLinuxDesktop(), nil
}
func (m *mockClient) UpsertLinuxDesktop(_ context.Context, in *linuxdesktopv1.UpsertLinuxDesktopRequest, _ ...grpc.CallOption) (*linuxdesktopv1.LinuxDesktop, error) {
m.upsertRequest = in
return in.GetLinuxDesktop(), nil
}
func (m *mockClient) DeleteLinuxDesktop(_ context.Context, in *linuxdesktopv1.DeleteLinuxDesktopRequest, _ ...grpc.CallOption) (*emptypb.Empty, error) {
m.deleteRequest = in
return &emptypb.Empty{}, nil
}
func TestClientListLinuxDesktops(t *testing.T) {
t.Parallel()
mockClient := &mockClient{
listResponse: []*linuxdesktopv1.LinuxDesktop{
newLinuxDesktop("desktop-1"),
newLinuxDesktop("desktop-2"),
},
}
client := NewClient(mockClient)
desktops, next, err := client.ListLinuxDesktops(t.Context(), 10, "token")
require.NoError(t, err)
require.Equal(t, mockClient.listResponse, desktops)
require.Equal(t, "next", next)
require.Equal(t, int32(10), mockClient.listRequest.GetPageSize())
require.Equal(t, "token", mockClient.listRequest.GetPageToken())
}
func TestClientCreateLinuxDesktop(t *testing.T) {
t.Parallel()
mockClient := &mockClient{}
client := NewClient(mockClient)
desktop := newLinuxDesktop("desktop-1")
resp, err := client.CreateLinuxDesktop(t.Context(), desktop)
require.NoError(t, err)
require.Equal(t, desktop, resp)
require.Equal(t, desktop, mockClient.createRequest.GetLinuxDesktop())
}
func TestClientGetLinuxDesktop(t *testing.T) {
t.Parallel()
mockClient := &mockClient{}
client := NewClient(mockClient)
resp, err := client.GetLinuxDesktop(t.Context(), "desktop-1")
require.NoError(t, err)
require.Equal(t, "desktop-1", mockClient.getRequest.GetName())
require.Equal(t, newLinuxDesktop("desktop-1"), resp)
}
func TestClientUpdateLinuxDesktop(t *testing.T) {
t.Parallel()
mockClient := &mockClient{}
client := NewClient(mockClient)
desktop := newLinuxDesktop("desktop-1")
resp, err := client.UpdateLinuxDesktop(t.Context(), desktop)
require.NoError(t, err)
require.Equal(t, desktop, resp)
require.Equal(t, desktop, mockClient.updateRequest.GetLinuxDesktop())
}
func TestClientUpsertLinuxDesktop(t *testing.T) {
t.Parallel()
mockClient := &mockClient{}
client := NewClient(mockClient)
desktop := newLinuxDesktop("desktop-1")
resp, err := client.UpsertLinuxDesktop(t.Context(), desktop)
require.NoError(t, err)
require.Equal(t, desktop, resp)
require.Equal(t, desktop, mockClient.upsertRequest.GetLinuxDesktop())
}
func TestClientDeleteLinuxDesktop(t *testing.T) {
t.Parallel()
mockClient := &mockClient{}
client := NewClient(mockClient)
err := client.DeleteLinuxDesktop(t.Context(), "desktop-1")
require.NoError(t, err)
require.Equal(t, "desktop-1", mockClient.deleteRequest.GetName())
}
func newLinuxDesktop(name string) *linuxdesktopv1.LinuxDesktop {
spec := &linuxdesktopv1.LinuxDesktopSpec{}
spec.SetAddr("127.0.0.1:22")
spec.SetHostname("host")
l := &linuxdesktopv1.LinuxDesktop{}
l.SetKind(types.KindLinuxDesktop)
l.SetVersion(types.V1)
l.SetMetadata(&headerv1.Metadata{
Name: name,
})
l.SetSpec(spec)
return l
}
File diff suppressed because it is too large Load Diff
+110 -58
View File
@@ -26,7 +26,7 @@ import (
v1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/accesslist/v1"
v14 "github.com/gravitational/teleport/api/gen/proto/go/teleport/accessmonitoringrules/v1"
v111 "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1"
v122 "github.com/gravitational/teleport/api/gen/proto/go/teleport/beams/v1"
v123 "github.com/gravitational/teleport/api/gen/proto/go/teleport/beams/v1"
v110 "github.com/gravitational/teleport/api/gen/proto/go/teleport/clusterconfig/v1"
v17 "github.com/gravitational/teleport/api/gen/proto/go/teleport/crownjewel/v1"
v18 "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobject/v1"
@@ -34,6 +34,7 @@ import (
v116 "github.com/gravitational/teleport/api/gen/proto/go/teleport/healthcheckconfig/v1"
v114 "github.com/gravitational/teleport/api/gen/proto/go/teleport/identitycenter/v1"
v15 "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
v120 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
v19 "github.com/gravitational/teleport/api/gen/proto/go/teleport/machineid/v1"
v16 "github.com/gravitational/teleport/api/gen/proto/go/teleport/notifications/v1"
v118 "github.com/gravitational/teleport/api/gen/proto/go/teleport/presence/v1"
@@ -41,8 +42,8 @@ import (
v119 "github.com/gravitational/teleport/api/gen/proto/go/teleport/recordingencryption/v1"
v117 "github.com/gravitational/teleport/api/gen/proto/go/teleport/scopes/access/v1"
v13 "github.com/gravitational/teleport/api/gen/proto/go/teleport/secreports/v1"
v120 "github.com/gravitational/teleport/api/gen/proto/go/teleport/subca/v1"
v121 "github.com/gravitational/teleport/api/gen/proto/go/teleport/summarizer/v1"
v121 "github.com/gravitational/teleport/api/gen/proto/go/teleport/subca/v1"
v122 "github.com/gravitational/teleport/api/gen/proto/go/teleport/summarizer/v1"
v11 "github.com/gravitational/teleport/api/gen/proto/go/teleport/userloginstate/v1"
v2 "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
v112 "github.com/gravitational/teleport/api/gen/proto/go/teleport/usertasks/v1"
@@ -199,6 +200,7 @@ type Event struct {
// *Event_RecordingEncryption
// *Event_Plugin
// *Event_AutoUpdateBotInstanceReport
// *Event_LinuxDesktop
// *Event_CertAuthorityOverride
// *Event_InferenceModel
// *Event_InferenceSecret
@@ -971,7 +973,16 @@ func (x *Event) GetAutoUpdateBotInstanceReport() *v111.AutoUpdateBotInstanceRepo
return nil
}
func (x *Event) GetCertAuthorityOverride() *v120.CertAuthorityOverride {
func (x *Event) GetLinuxDesktop() *v120.LinuxDesktop {
if x != nil {
if x, ok := x.Resource.(*Event_LinuxDesktop); ok {
return x.LinuxDesktop
}
}
return nil
}
func (x *Event) GetCertAuthorityOverride() *v121.CertAuthorityOverride {
if x != nil {
if x, ok := x.Resource.(*Event_CertAuthorityOverride); ok {
return x.CertAuthorityOverride
@@ -980,7 +991,7 @@ func (x *Event) GetCertAuthorityOverride() *v120.CertAuthorityOverride {
return nil
}
func (x *Event) GetInferenceModel() *v121.InferenceModel {
func (x *Event) GetInferenceModel() *v122.InferenceModel {
if x != nil {
if x, ok := x.Resource.(*Event_InferenceModel); ok {
return x.InferenceModel
@@ -989,7 +1000,7 @@ func (x *Event) GetInferenceModel() *v121.InferenceModel {
return nil
}
func (x *Event) GetInferenceSecret() *v121.InferenceSecret {
func (x *Event) GetInferenceSecret() *v122.InferenceSecret {
if x != nil {
if x, ok := x.Resource.(*Event_InferenceSecret); ok {
return x.InferenceSecret
@@ -998,7 +1009,7 @@ func (x *Event) GetInferenceSecret() *v121.InferenceSecret {
return nil
}
func (x *Event) GetInferencePolicy() *v121.InferencePolicy {
func (x *Event) GetInferencePolicy() *v122.InferencePolicy {
if x != nil {
if x, ok := x.Resource.(*Event_InferencePolicy); ok {
return x.InferencePolicy
@@ -1007,7 +1018,7 @@ func (x *Event) GetInferencePolicy() *v121.InferencePolicy {
return nil
}
func (x *Event) GetRetrievalModel() *v121.RetrievalModel {
func (x *Event) GetRetrievalModel() *v122.RetrievalModel {
if x != nil {
if x, ok := x.Resource.(*Event_RetrievalModel); ok {
return x.RetrievalModel
@@ -1016,7 +1027,7 @@ func (x *Event) GetRetrievalModel() *v121.RetrievalModel {
return nil
}
func (x *Event) GetBeam() *v122.Beam {
func (x *Event) GetBeam() *v123.Beam {
if x != nil {
if x, ok := x.Resource.(*Event_Beam); ok {
return x.Beam
@@ -1025,7 +1036,7 @@ func (x *Event) GetBeam() *v122.Beam {
return nil
}
func (x *Event) GetBeamsConfig() *v122.BeamsConfig {
func (x *Event) GetBeamsConfig() *v123.BeamsConfig {
if x != nil {
if x, ok := x.Resource.(*Event_BeamsConfig); ok {
return x.BeamsConfig
@@ -1034,7 +1045,7 @@ func (x *Event) GetBeamsConfig() *v122.BeamsConfig {
return nil
}
func (x *Event) GetPendingCSRRequest() *v120.PendingCSRRequest {
func (x *Event) GetPendingCSRRequest() *v121.PendingCSRRequest {
if x != nil {
if x, ok := x.Resource.(*Event_PendingCSRRequest); ok {
return x.PendingCSRRequest
@@ -1687,7 +1698,15 @@ func (x *Event) SetAutoUpdateBotInstanceReport(v *v111.AutoUpdateBotInstanceRepo
x.Resource = &Event_AutoUpdateBotInstanceReport{v}
}
func (x *Event) SetCertAuthorityOverride(v *v120.CertAuthorityOverride) {
func (x *Event) SetLinuxDesktop(v *v120.LinuxDesktop) {
if v == nil {
x.Resource = nil
return
}
x.Resource = &Event_LinuxDesktop{v}
}
func (x *Event) SetCertAuthorityOverride(v *v121.CertAuthorityOverride) {
if v == nil {
x.Resource = nil
return
@@ -1695,7 +1714,7 @@ func (x *Event) SetCertAuthorityOverride(v *v120.CertAuthorityOverride) {
x.Resource = &Event_CertAuthorityOverride{v}
}
func (x *Event) SetInferenceModel(v *v121.InferenceModel) {
func (x *Event) SetInferenceModel(v *v122.InferenceModel) {
if v == nil {
x.Resource = nil
return
@@ -1703,7 +1722,7 @@ func (x *Event) SetInferenceModel(v *v121.InferenceModel) {
x.Resource = &Event_InferenceModel{v}
}
func (x *Event) SetInferenceSecret(v *v121.InferenceSecret) {
func (x *Event) SetInferenceSecret(v *v122.InferenceSecret) {
if v == nil {
x.Resource = nil
return
@@ -1711,7 +1730,7 @@ func (x *Event) SetInferenceSecret(v *v121.InferenceSecret) {
x.Resource = &Event_InferenceSecret{v}
}
func (x *Event) SetInferencePolicy(v *v121.InferencePolicy) {
func (x *Event) SetInferencePolicy(v *v122.InferencePolicy) {
if v == nil {
x.Resource = nil
return
@@ -1719,7 +1738,7 @@ func (x *Event) SetInferencePolicy(v *v121.InferencePolicy) {
x.Resource = &Event_InferencePolicy{v}
}
func (x *Event) SetRetrievalModel(v *v121.RetrievalModel) {
func (x *Event) SetRetrievalModel(v *v122.RetrievalModel) {
if v == nil {
x.Resource = nil
return
@@ -1727,7 +1746,7 @@ func (x *Event) SetRetrievalModel(v *v121.RetrievalModel) {
x.Resource = &Event_RetrievalModel{v}
}
func (x *Event) SetBeam(v *v122.Beam) {
func (x *Event) SetBeam(v *v123.Beam) {
if v == nil {
x.Resource = nil
return
@@ -1735,7 +1754,7 @@ func (x *Event) SetBeam(v *v122.Beam) {
x.Resource = &Event_Beam{v}
}
func (x *Event) SetBeamsConfig(v *v122.BeamsConfig) {
func (x *Event) SetBeamsConfig(v *v123.BeamsConfig) {
if v == nil {
x.Resource = nil
return
@@ -1743,7 +1762,7 @@ func (x *Event) SetBeamsConfig(v *v122.BeamsConfig) {
x.Resource = &Event_BeamsConfig{v}
}
func (x *Event) SetPendingCSRRequest(v *v120.PendingCSRRequest) {
func (x *Event) SetPendingCSRRequest(v *v121.PendingCSRRequest) {
if v == nil {
x.Resource = nil
return
@@ -2398,6 +2417,14 @@ func (x *Event) HasAutoUpdateBotInstanceReport() bool {
return ok
}
func (x *Event) HasLinuxDesktop() bool {
if x == nil {
return false
}
_, ok := x.Resource.(*Event_LinuxDesktop)
return ok
}
func (x *Event) HasCertAuthorityOverride() bool {
if x == nil {
return false
@@ -2946,6 +2973,12 @@ func (x *Event) ClearAutoUpdateBotInstanceReport() {
}
}
func (x *Event) ClearLinuxDesktop() {
if _, ok := x.Resource.(*Event_LinuxDesktop); ok {
x.Resource = nil
}
}
func (x *Event) ClearCertAuthorityOverride() {
if _, ok := x.Resource.(*Event_CertAuthorityOverride); ok {
x.Resource = nil
@@ -3075,6 +3108,7 @@ const Event_RelayServer_case case_Event_Resource = 82
const Event_RecordingEncryption_case case_Event_Resource = 83
const Event_Plugin_case case_Event_Resource = 84
const Event_AutoUpdateBotInstanceReport_case case_Event_Resource = 85
const Event_LinuxDesktop_case case_Event_Resource = 87
const Event_CertAuthorityOverride_case case_Event_Resource = 90
const Event_InferenceModel_case case_Event_Resource = 91
const Event_InferenceSecret_case case_Event_Resource = 92
@@ -3249,6 +3283,8 @@ func (x *Event) WhichResource() case_Event_Resource {
return Event_Plugin_case
case *Event_AutoUpdateBotInstanceReport:
return Event_AutoUpdateBotInstanceReport_case
case *Event_LinuxDesktop:
return Event_LinuxDesktop_case
case *Event_CertAuthorityOverride:
return Event_CertAuthorityOverride_case
case *Event_InferenceModel:
@@ -3443,23 +3479,25 @@ type Event_builder struct {
Plugin *types.PluginV1
// AutoUpdateAgentReport is a resource for counting connected bot instances.
AutoUpdateBotInstanceReport *v111.AutoUpdateBotInstanceReport
// LinuxDesktop is a resource for linux desktop.
LinuxDesktop *v120.LinuxDesktop
// CertAuthorityOverride allows admins to override Teleport CA certificates.
CertAuthorityOverride *v120.CertAuthorityOverride
CertAuthorityOverride *v121.CertAuthorityOverride
// InferenceModel is a resource for defining inference models.
InferenceModel *v121.InferenceModel
InferenceModel *v122.InferenceModel
// InferenceSecret is a resource for defining inference secrets.
InferenceSecret *v121.InferenceSecret
InferenceSecret *v122.InferenceSecret
// InferencePolicy is a resource for defining inference policies.
InferencePolicy *v121.InferencePolicy
InferencePolicy *v122.InferencePolicy
// RetrievalModel is a resource for defining retrieval models.
RetrievalModel *v121.RetrievalModel
RetrievalModel *v122.RetrievalModel
// Beam is an ephemeral AI-optimized compute environment.
Beam *v122.Beam
Beam *v123.Beam
// BeamsConfig is the user-provided configuration for Beams.
BeamsConfig *v122.BeamsConfig
BeamsConfig *v123.BeamsConfig
// PendingCSRRequest allows asynchronous, watcher-based CSR requests to
// other Auth server instances.
PendingCSRRequest *v120.PendingCSRRequest
PendingCSRRequest *v121.PendingCSRRequest
// -- end of Resource
}
@@ -3708,6 +3746,9 @@ func (b0 Event_builder) Build() *Event {
if b.AutoUpdateBotInstanceReport != nil {
x.Resource = &Event_AutoUpdateBotInstanceReport{b.AutoUpdateBotInstanceReport}
}
if b.LinuxDesktop != nil {
x.Resource = &Event_LinuxDesktop{b.LinuxDesktop}
}
if b.CertAuthorityOverride != nil {
x.Resource = &Event_CertAuthorityOverride{b.CertAuthorityOverride}
}
@@ -4154,45 +4195,50 @@ type Event_AutoUpdateBotInstanceReport struct {
AutoUpdateBotInstanceReport *v111.AutoUpdateBotInstanceReport `protobuf:"bytes,85,opt,name=AutoUpdateBotInstanceReport,proto3,oneof"`
}
type Event_LinuxDesktop struct {
// LinuxDesktop is a resource for linux desktop.
LinuxDesktop *v120.LinuxDesktop `protobuf:"bytes,87,opt,name=LinuxDesktop,proto3,oneof"`
}
type Event_CertAuthorityOverride struct {
// CertAuthorityOverride allows admins to override Teleport CA certificates.
CertAuthorityOverride *v120.CertAuthorityOverride `protobuf:"bytes,90,opt,name=CertAuthorityOverride,proto3,oneof"`
CertAuthorityOverride *v121.CertAuthorityOverride `protobuf:"bytes,90,opt,name=CertAuthorityOverride,proto3,oneof"`
}
type Event_InferenceModel struct {
// InferenceModel is a resource for defining inference models.
InferenceModel *v121.InferenceModel `protobuf:"bytes,91,opt,name=InferenceModel,proto3,oneof"`
InferenceModel *v122.InferenceModel `protobuf:"bytes,91,opt,name=InferenceModel,proto3,oneof"`
}
type Event_InferenceSecret struct {
// InferenceSecret is a resource for defining inference secrets.
InferenceSecret *v121.InferenceSecret `protobuf:"bytes,92,opt,name=InferenceSecret,proto3,oneof"`
InferenceSecret *v122.InferenceSecret `protobuf:"bytes,92,opt,name=InferenceSecret,proto3,oneof"`
}
type Event_InferencePolicy struct {
// InferencePolicy is a resource for defining inference policies.
InferencePolicy *v121.InferencePolicy `protobuf:"bytes,93,opt,name=InferencePolicy,proto3,oneof"`
InferencePolicy *v122.InferencePolicy `protobuf:"bytes,93,opt,name=InferencePolicy,proto3,oneof"`
}
type Event_RetrievalModel struct {
// RetrievalModel is a resource for defining retrieval models.
RetrievalModel *v121.RetrievalModel `protobuf:"bytes,94,opt,name=RetrievalModel,proto3,oneof"`
RetrievalModel *v122.RetrievalModel `protobuf:"bytes,94,opt,name=RetrievalModel,proto3,oneof"`
}
type Event_Beam struct {
// Beam is an ephemeral AI-optimized compute environment.
Beam *v122.Beam `protobuf:"bytes,95,opt,name=Beam,proto3,oneof"`
Beam *v123.Beam `protobuf:"bytes,95,opt,name=Beam,proto3,oneof"`
}
type Event_BeamsConfig struct {
// BeamsConfig is the user-provided configuration for Beams.
BeamsConfig *v122.BeamsConfig `protobuf:"bytes,97,opt,name=BeamsConfig,proto3,oneof"`
BeamsConfig *v123.BeamsConfig `protobuf:"bytes,97,opt,name=BeamsConfig,proto3,oneof"`
}
type Event_PendingCSRRequest struct {
// PendingCSRRequest allows asynchronous, watcher-based CSR requests to
// other Auth server instances.
PendingCSRRequest *v120.PendingCSRRequest `protobuf:"bytes,99,opt,name=PendingCSRRequest,proto3,oneof"`
PendingCSRRequest *v121.PendingCSRRequest `protobuf:"bytes,99,opt,name=PendingCSRRequest,proto3,oneof"`
}
func (*Event_ResourceHeader) isEvent_Resource() {}
@@ -4355,6 +4401,8 @@ func (*Event_Plugin) isEvent_Resource() {}
func (*Event_AutoUpdateBotInstanceReport) isEvent_Resource() {}
func (*Event_LinuxDesktop) isEvent_Resource() {}
func (*Event_CertAuthorityOverride) isEvent_Resource() {}
func (*Event_InferenceModel) isEvent_Resource() {}
@@ -4375,7 +4423,7 @@ var File_teleport_legacy_client_proto_event_proto protoreflect.FileDescriptor
const file_teleport_legacy_client_proto_event_proto_rawDesc = "" +
"\n" +
"(teleport/legacy/client/proto/event.proto\x12\x05proto\x1a'teleport/accesslist/v1/accesslist.proto\x1a?teleport/accessmonitoringrules/v1/access_monitoring_rules.proto\x1a'teleport/autoupdate/v1/autoupdate.proto\x1a\x1cteleport/beams/v1/beam.proto\x1a$teleport/beams/v1/beams_config.proto\x1a5teleport/clusterconfig/v1/access_graph_settings.proto\x1a'teleport/crownjewel/v1/crownjewel.proto\x1a#teleport/dbobject/v1/dbobject.proto\x1a1teleport/discoveryconfig/v1/discoveryconfig.proto\x1a7teleport/healthcheckconfig/v1/health_check_config.proto\x1a/teleport/identitycenter/v1/identitycenter.proto\x1a;teleport/kubewaitingcontainer/v1/kubewaitingcontainer.proto\x1a!teleport/legacy/types/types.proto\x1a(teleport/machineid/v1/bot_instance.proto\x1a&teleport/machineid/v1/federation.proto\x1a-teleport/notifications/v1/notifications.proto\x1a'teleport/presence/v1/relay_server.proto\x1a+teleport/provisioning/v1/provisioning.proto\x1a:teleport/recordingencryption/v1/recording_encryption.proto\x1a*teleport/scopes/access/v1/assignment.proto\x1a$teleport/scopes/access/v1/role.proto\x1a'teleport/secreports/v1/secreports.proto\x1a/teleport/subca/v1/cert_authority_override.proto\x1a+teleport/subca/v1/pending_csr_request.proto\x1a'teleport/summarizer/v1/summarizer.proto\x1a/teleport/userloginstate/v1/userloginstate.proto\x1a1teleport/userprovisioning/v2/statichostuser.proto\x1a&teleport/usertasks/v1/user_tasks.proto\x1a+teleport/workloadidentity/v1/resource.proto\x1a6teleport/workloadidentity/v1/revocation_resource.proto\"\xf35\n" +
"(teleport/legacy/client/proto/event.proto\x12\x05proto\x1a'teleport/accesslist/v1/accesslist.proto\x1a?teleport/accessmonitoringrules/v1/access_monitoring_rules.proto\x1a'teleport/autoupdate/v1/autoupdate.proto\x1a\x1cteleport/beams/v1/beam.proto\x1a$teleport/beams/v1/beams_config.proto\x1a5teleport/clusterconfig/v1/access_graph_settings.proto\x1a'teleport/crownjewel/v1/crownjewel.proto\x1a#teleport/dbobject/v1/dbobject.proto\x1a1teleport/discoveryconfig/v1/discoveryconfig.proto\x1a7teleport/healthcheckconfig/v1/health_check_config.proto\x1a/teleport/identitycenter/v1/identitycenter.proto\x1a;teleport/kubewaitingcontainer/v1/kubewaitingcontainer.proto\x1a!teleport/legacy/types/types.proto\x1a,teleport/linuxdesktop/v1/linux_desktop.proto\x1a(teleport/machineid/v1/bot_instance.proto\x1a&teleport/machineid/v1/federation.proto\x1a-teleport/notifications/v1/notifications.proto\x1a'teleport/presence/v1/relay_server.proto\x1a+teleport/provisioning/v1/provisioning.proto\x1a:teleport/recordingencryption/v1/recording_encryption.proto\x1a*teleport/scopes/access/v1/assignment.proto\x1a$teleport/scopes/access/v1/role.proto\x1a'teleport/secreports/v1/secreports.proto\x1a/teleport/subca/v1/cert_authority_override.proto\x1a+teleport/subca/v1/pending_csr_request.proto\x1a'teleport/summarizer/v1/summarizer.proto\x1a/teleport/userloginstate/v1/userloginstate.proto\x1a1teleport/userprovisioning/v2/statichostuser.proto\x1a&teleport/usertasks/v1/user_tasks.proto\x1a+teleport/workloadidentity/v1/resource.proto\x1a6teleport/workloadidentity/v1/revocation_resource.proto\"\xc16\n" +
"\x05Event\x12$\n" +
"\x04Type\x18\x01 \x01(\x0e2\x10.proto.OperationR\x04Type\x12?\n" +
"\x0eResourceHeader\x18\x02 \x01(\v2\x15.types.ResourceHeaderH\x00R\x0eResourceHeader\x12>\n" +
@@ -4470,7 +4518,8 @@ const file_teleport_legacy_client_proto_event_proto_rawDesc = "" +
"\frelay_server\x18R \x01(\v2!.teleport.presence.v1.RelayServerH\x00R\vrelayServer\x12h\n" +
"\x13RecordingEncryption\x18S \x01(\v24.teleport.recordingencryption.v1.RecordingEncryptionH\x00R\x13RecordingEncryption\x12)\n" +
"\x06plugin\x18T \x01(\v2\x0f.types.PluginV1H\x00R\x06plugin\x12w\n" +
"\x1bAutoUpdateBotInstanceReport\x18U \x01(\v23.teleport.autoupdate.v1.AutoUpdateBotInstanceReportH\x00R\x1bAutoUpdateBotInstanceReport\x12`\n" +
"\x1bAutoUpdateBotInstanceReport\x18U \x01(\v23.teleport.autoupdate.v1.AutoUpdateBotInstanceReportH\x00R\x1bAutoUpdateBotInstanceReport\x12L\n" +
"\fLinuxDesktop\x18W \x01(\v2&.teleport.linuxdesktop.v1.LinuxDesktopH\x00R\fLinuxDesktop\x12`\n" +
"\x15CertAuthorityOverride\x18Z \x01(\v2(.teleport.subca.v1.CertAuthorityOverrideH\x00R\x15CertAuthorityOverride\x12P\n" +
"\x0eInferenceModel\x18[ \x01(\v2&.teleport.summarizer.v1.InferenceModelH\x00R\x0eInferenceModel\x12S\n" +
"\x0fInferenceSecret\x18\\ \x01(\v2'.teleport.summarizer.v1.InferenceSecretH\x00R\x0fInferenceSecret\x12S\n" +
@@ -4569,14 +4618,15 @@ var file_teleport_legacy_client_proto_event_proto_goTypes = []any{
(*v119.RecordingEncryption)(nil), // 76: teleport.recordingencryption.v1.RecordingEncryption
(*types.PluginV1)(nil), // 77: types.PluginV1
(*v111.AutoUpdateBotInstanceReport)(nil), // 78: teleport.autoupdate.v1.AutoUpdateBotInstanceReport
(*v120.CertAuthorityOverride)(nil), // 79: teleport.subca.v1.CertAuthorityOverride
(*v121.InferenceModel)(nil), // 80: teleport.summarizer.v1.InferenceModel
(*v121.InferenceSecret)(nil), // 81: teleport.summarizer.v1.InferenceSecret
(*v121.InferencePolicy)(nil), // 82: teleport.summarizer.v1.InferencePolicy
(*v121.RetrievalModel)(nil), // 83: teleport.summarizer.v1.RetrievalModel
(*v122.Beam)(nil), // 84: teleport.beams.v1.Beam
(*v122.BeamsConfig)(nil), // 85: teleport.beams.v1.BeamsConfig
(*v120.PendingCSRRequest)(nil), // 86: teleport.subca.v1.PendingCSRRequest
(*v120.LinuxDesktop)(nil), // 79: teleport.linuxdesktop.v1.LinuxDesktop
(*v121.CertAuthorityOverride)(nil), // 80: teleport.subca.v1.CertAuthorityOverride
(*v122.InferenceModel)(nil), // 81: teleport.summarizer.v1.InferenceModel
(*v122.InferenceSecret)(nil), // 82: teleport.summarizer.v1.InferenceSecret
(*v122.InferencePolicy)(nil), // 83: teleport.summarizer.v1.InferencePolicy
(*v122.RetrievalModel)(nil), // 84: teleport.summarizer.v1.RetrievalModel
(*v123.Beam)(nil), // 85: teleport.beams.v1.Beam
(*v123.BeamsConfig)(nil), // 86: teleport.beams.v1.BeamsConfig
(*v121.PendingCSRRequest)(nil), // 87: teleport.subca.v1.PendingCSRRequest
}
var file_teleport_legacy_client_proto_event_proto_depIdxs = []int32{
0, // 0: proto.Event.Type:type_name -> proto.Operation
@@ -4660,19 +4710,20 @@ var file_teleport_legacy_client_proto_event_proto_depIdxs = []int32{
76, // 78: proto.Event.RecordingEncryption:type_name -> teleport.recordingencryption.v1.RecordingEncryption
77, // 79: proto.Event.plugin:type_name -> types.PluginV1
78, // 80: proto.Event.AutoUpdateBotInstanceReport:type_name -> teleport.autoupdate.v1.AutoUpdateBotInstanceReport
79, // 81: proto.Event.CertAuthorityOverride:type_name -> teleport.subca.v1.CertAuthorityOverride
80, // 82: proto.Event.InferenceModel:type_name -> teleport.summarizer.v1.InferenceModel
81, // 83: proto.Event.InferenceSecret:type_name -> teleport.summarizer.v1.InferenceSecret
82, // 84: proto.Event.InferencePolicy:type_name -> teleport.summarizer.v1.InferencePolicy
83, // 85: proto.Event.RetrievalModel:type_name -> teleport.summarizer.v1.RetrievalModel
84, // 86: proto.Event.Beam:type_name -> teleport.beams.v1.Beam
85, // 87: proto.Event.BeamsConfig:type_name -> teleport.beams.v1.BeamsConfig
86, // 88: proto.Event.PendingCSRRequest:type_name -> teleport.subca.v1.PendingCSRRequest
89, // [89:89] is the sub-list for method output_type
89, // [89:89] is the sub-list for method input_type
89, // [89:89] is the sub-list for extension type_name
89, // [89:89] is the sub-list for extension extendee
0, // [0:89] is the sub-list for field type_name
79, // 81: proto.Event.LinuxDesktop:type_name -> teleport.linuxdesktop.v1.LinuxDesktop
80, // 82: proto.Event.CertAuthorityOverride:type_name -> teleport.subca.v1.CertAuthorityOverride
81, // 83: proto.Event.InferenceModel:type_name -> teleport.summarizer.v1.InferenceModel
82, // 84: proto.Event.InferenceSecret:type_name -> teleport.summarizer.v1.InferenceSecret
83, // 85: proto.Event.InferencePolicy:type_name -> teleport.summarizer.v1.InferencePolicy
84, // 86: proto.Event.RetrievalModel:type_name -> teleport.summarizer.v1.RetrievalModel
85, // 87: proto.Event.Beam:type_name -> teleport.beams.v1.Beam
86, // 88: proto.Event.BeamsConfig:type_name -> teleport.beams.v1.BeamsConfig
87, // 89: proto.Event.PendingCSRRequest:type_name -> teleport.subca.v1.PendingCSRRequest
90, // [90:90] is the sub-list for method output_type
90, // [90:90] is the sub-list for method input_type
90, // [90:90] is the sub-list for extension type_name
90, // [90:90] is the sub-list for extension extendee
0, // [0:90] is the sub-list for field type_name
}
func init() { file_teleport_legacy_client_proto_event_proto_init() }
@@ -4761,6 +4812,7 @@ func file_teleport_legacy_client_proto_event_proto_init() {
(*Event_RecordingEncryption)(nil),
(*Event_Plugin)(nil),
(*Event_AutoUpdateBotInstanceReport)(nil),
(*Event_LinuxDesktop)(nil),
(*Event_CertAuthorityOverride)(nil),
(*Event_InferenceModel)(nil),
(*Event_InferenceSecret)(nil),
+109 -58
View File
@@ -26,7 +26,7 @@ import (
v1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/accesslist/v1"
v14 "github.com/gravitational/teleport/api/gen/proto/go/teleport/accessmonitoringrules/v1"
v111 "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1"
v122 "github.com/gravitational/teleport/api/gen/proto/go/teleport/beams/v1"
v123 "github.com/gravitational/teleport/api/gen/proto/go/teleport/beams/v1"
v110 "github.com/gravitational/teleport/api/gen/proto/go/teleport/clusterconfig/v1"
v17 "github.com/gravitational/teleport/api/gen/proto/go/teleport/crownjewel/v1"
v18 "github.com/gravitational/teleport/api/gen/proto/go/teleport/dbobject/v1"
@@ -34,6 +34,7 @@ import (
v116 "github.com/gravitational/teleport/api/gen/proto/go/teleport/healthcheckconfig/v1"
v114 "github.com/gravitational/teleport/api/gen/proto/go/teleport/identitycenter/v1"
v15 "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
v120 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
v19 "github.com/gravitational/teleport/api/gen/proto/go/teleport/machineid/v1"
v16 "github.com/gravitational/teleport/api/gen/proto/go/teleport/notifications/v1"
v118 "github.com/gravitational/teleport/api/gen/proto/go/teleport/presence/v1"
@@ -41,8 +42,8 @@ import (
v119 "github.com/gravitational/teleport/api/gen/proto/go/teleport/recordingencryption/v1"
v117 "github.com/gravitational/teleport/api/gen/proto/go/teleport/scopes/access/v1"
v13 "github.com/gravitational/teleport/api/gen/proto/go/teleport/secreports/v1"
v120 "github.com/gravitational/teleport/api/gen/proto/go/teleport/subca/v1"
v121 "github.com/gravitational/teleport/api/gen/proto/go/teleport/summarizer/v1"
v121 "github.com/gravitational/teleport/api/gen/proto/go/teleport/subca/v1"
v122 "github.com/gravitational/teleport/api/gen/proto/go/teleport/summarizer/v1"
v11 "github.com/gravitational/teleport/api/gen/proto/go/teleport/userloginstate/v1"
v2 "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2"
v112 "github.com/gravitational/teleport/api/gen/proto/go/teleport/usertasks/v1"
@@ -871,7 +872,16 @@ func (x *Event) GetAutoUpdateBotInstanceReport() *v111.AutoUpdateBotInstanceRepo
return nil
}
func (x *Event) GetCertAuthorityOverride() *v120.CertAuthorityOverride {
func (x *Event) GetLinuxDesktop() *v120.LinuxDesktop {
if x != nil {
if x, ok := x.xxx_hidden_Resource.(*event_LinuxDesktop); ok {
return x.LinuxDesktop
}
}
return nil
}
func (x *Event) GetCertAuthorityOverride() *v121.CertAuthorityOverride {
if x != nil {
if x, ok := x.xxx_hidden_Resource.(*event_CertAuthorityOverride); ok {
return x.CertAuthorityOverride
@@ -880,7 +890,7 @@ func (x *Event) GetCertAuthorityOverride() *v120.CertAuthorityOverride {
return nil
}
func (x *Event) GetInferenceModel() *v121.InferenceModel {
func (x *Event) GetInferenceModel() *v122.InferenceModel {
if x != nil {
if x, ok := x.xxx_hidden_Resource.(*event_InferenceModel); ok {
return x.InferenceModel
@@ -889,7 +899,7 @@ func (x *Event) GetInferenceModel() *v121.InferenceModel {
return nil
}
func (x *Event) GetInferenceSecret() *v121.InferenceSecret {
func (x *Event) GetInferenceSecret() *v122.InferenceSecret {
if x != nil {
if x, ok := x.xxx_hidden_Resource.(*event_InferenceSecret); ok {
return x.InferenceSecret
@@ -898,7 +908,7 @@ func (x *Event) GetInferenceSecret() *v121.InferenceSecret {
return nil
}
func (x *Event) GetInferencePolicy() *v121.InferencePolicy {
func (x *Event) GetInferencePolicy() *v122.InferencePolicy {
if x != nil {
if x, ok := x.xxx_hidden_Resource.(*event_InferencePolicy); ok {
return x.InferencePolicy
@@ -907,7 +917,7 @@ func (x *Event) GetInferencePolicy() *v121.InferencePolicy {
return nil
}
func (x *Event) GetRetrievalModel() *v121.RetrievalModel {
func (x *Event) GetRetrievalModel() *v122.RetrievalModel {
if x != nil {
if x, ok := x.xxx_hidden_Resource.(*event_RetrievalModel); ok {
return x.RetrievalModel
@@ -916,7 +926,7 @@ func (x *Event) GetRetrievalModel() *v121.RetrievalModel {
return nil
}
func (x *Event) GetBeam() *v122.Beam {
func (x *Event) GetBeam() *v123.Beam {
if x != nil {
if x, ok := x.xxx_hidden_Resource.(*event_Beam); ok {
return x.Beam
@@ -925,7 +935,7 @@ func (x *Event) GetBeam() *v122.Beam {
return nil
}
func (x *Event) GetBeamsConfig() *v122.BeamsConfig {
func (x *Event) GetBeamsConfig() *v123.BeamsConfig {
if x != nil {
if x, ok := x.xxx_hidden_Resource.(*event_BeamsConfig); ok {
return x.BeamsConfig
@@ -934,7 +944,7 @@ func (x *Event) GetBeamsConfig() *v122.BeamsConfig {
return nil
}
func (x *Event) GetPendingCSRRequest() *v120.PendingCSRRequest {
func (x *Event) GetPendingCSRRequest() *v121.PendingCSRRequest {
if x != nil {
if x, ok := x.xxx_hidden_Resource.(*event_PendingCSRRequest); ok {
return x.PendingCSRRequest
@@ -1587,7 +1597,15 @@ func (x *Event) SetAutoUpdateBotInstanceReport(v *v111.AutoUpdateBotInstanceRepo
x.xxx_hidden_Resource = &event_AutoUpdateBotInstanceReport{v}
}
func (x *Event) SetCertAuthorityOverride(v *v120.CertAuthorityOverride) {
func (x *Event) SetLinuxDesktop(v *v120.LinuxDesktop) {
if v == nil {
x.xxx_hidden_Resource = nil
return
}
x.xxx_hidden_Resource = &event_LinuxDesktop{v}
}
func (x *Event) SetCertAuthorityOverride(v *v121.CertAuthorityOverride) {
if v == nil {
x.xxx_hidden_Resource = nil
return
@@ -1595,7 +1613,7 @@ func (x *Event) SetCertAuthorityOverride(v *v120.CertAuthorityOverride) {
x.xxx_hidden_Resource = &event_CertAuthorityOverride{v}
}
func (x *Event) SetInferenceModel(v *v121.InferenceModel) {
func (x *Event) SetInferenceModel(v *v122.InferenceModel) {
if v == nil {
x.xxx_hidden_Resource = nil
return
@@ -1603,7 +1621,7 @@ func (x *Event) SetInferenceModel(v *v121.InferenceModel) {
x.xxx_hidden_Resource = &event_InferenceModel{v}
}
func (x *Event) SetInferenceSecret(v *v121.InferenceSecret) {
func (x *Event) SetInferenceSecret(v *v122.InferenceSecret) {
if v == nil {
x.xxx_hidden_Resource = nil
return
@@ -1611,7 +1629,7 @@ func (x *Event) SetInferenceSecret(v *v121.InferenceSecret) {
x.xxx_hidden_Resource = &event_InferenceSecret{v}
}
func (x *Event) SetInferencePolicy(v *v121.InferencePolicy) {
func (x *Event) SetInferencePolicy(v *v122.InferencePolicy) {
if v == nil {
x.xxx_hidden_Resource = nil
return
@@ -1619,7 +1637,7 @@ func (x *Event) SetInferencePolicy(v *v121.InferencePolicy) {
x.xxx_hidden_Resource = &event_InferencePolicy{v}
}
func (x *Event) SetRetrievalModel(v *v121.RetrievalModel) {
func (x *Event) SetRetrievalModel(v *v122.RetrievalModel) {
if v == nil {
x.xxx_hidden_Resource = nil
return
@@ -1627,7 +1645,7 @@ func (x *Event) SetRetrievalModel(v *v121.RetrievalModel) {
x.xxx_hidden_Resource = &event_RetrievalModel{v}
}
func (x *Event) SetBeam(v *v122.Beam) {
func (x *Event) SetBeam(v *v123.Beam) {
if v == nil {
x.xxx_hidden_Resource = nil
return
@@ -1635,7 +1653,7 @@ func (x *Event) SetBeam(v *v122.Beam) {
x.xxx_hidden_Resource = &event_Beam{v}
}
func (x *Event) SetBeamsConfig(v *v122.BeamsConfig) {
func (x *Event) SetBeamsConfig(v *v123.BeamsConfig) {
if v == nil {
x.xxx_hidden_Resource = nil
return
@@ -1643,7 +1661,7 @@ func (x *Event) SetBeamsConfig(v *v122.BeamsConfig) {
x.xxx_hidden_Resource = &event_BeamsConfig{v}
}
func (x *Event) SetPendingCSRRequest(v *v120.PendingCSRRequest) {
func (x *Event) SetPendingCSRRequest(v *v121.PendingCSRRequest) {
if v == nil {
x.xxx_hidden_Resource = nil
return
@@ -2298,6 +2316,14 @@ func (x *Event) HasAutoUpdateBotInstanceReport() bool {
return ok
}
func (x *Event) HasLinuxDesktop() bool {
if x == nil {
return false
}
_, ok := x.xxx_hidden_Resource.(*event_LinuxDesktop)
return ok
}
func (x *Event) HasCertAuthorityOverride() bool {
if x == nil {
return false
@@ -2846,6 +2872,12 @@ func (x *Event) ClearAutoUpdateBotInstanceReport() {
}
}
func (x *Event) ClearLinuxDesktop() {
if _, ok := x.xxx_hidden_Resource.(*event_LinuxDesktop); ok {
x.xxx_hidden_Resource = nil
}
}
func (x *Event) ClearCertAuthorityOverride() {
if _, ok := x.xxx_hidden_Resource.(*event_CertAuthorityOverride); ok {
x.xxx_hidden_Resource = nil
@@ -2975,6 +3007,7 @@ const Event_RelayServer_case case_Event_Resource = 82
const Event_RecordingEncryption_case case_Event_Resource = 83
const Event_Plugin_case case_Event_Resource = 84
const Event_AutoUpdateBotInstanceReport_case case_Event_Resource = 85
const Event_LinuxDesktop_case case_Event_Resource = 87
const Event_CertAuthorityOverride_case case_Event_Resource = 90
const Event_InferenceModel_case case_Event_Resource = 91
const Event_InferenceSecret_case case_Event_Resource = 92
@@ -3149,6 +3182,8 @@ func (x *Event) WhichResource() case_Event_Resource {
return Event_Plugin_case
case *event_AutoUpdateBotInstanceReport:
return Event_AutoUpdateBotInstanceReport_case
case *event_LinuxDesktop:
return Event_LinuxDesktop_case
case *event_CertAuthorityOverride:
return Event_CertAuthorityOverride_case
case *event_InferenceModel:
@@ -3343,23 +3378,25 @@ type Event_builder struct {
Plugin *types.PluginV1
// AutoUpdateAgentReport is a resource for counting connected bot instances.
AutoUpdateBotInstanceReport *v111.AutoUpdateBotInstanceReport
// LinuxDesktop is a resource for linux desktop.
LinuxDesktop *v120.LinuxDesktop
// CertAuthorityOverride allows admins to override Teleport CA certificates.
CertAuthorityOverride *v120.CertAuthorityOverride
CertAuthorityOverride *v121.CertAuthorityOverride
// InferenceModel is a resource for defining inference models.
InferenceModel *v121.InferenceModel
InferenceModel *v122.InferenceModel
// InferenceSecret is a resource for defining inference secrets.
InferenceSecret *v121.InferenceSecret
InferenceSecret *v122.InferenceSecret
// InferencePolicy is a resource for defining inference policies.
InferencePolicy *v121.InferencePolicy
InferencePolicy *v122.InferencePolicy
// RetrievalModel is a resource for defining retrieval models.
RetrievalModel *v121.RetrievalModel
RetrievalModel *v122.RetrievalModel
// Beam is an ephemeral AI-optimized compute environment.
Beam *v122.Beam
Beam *v123.Beam
// BeamsConfig is the user-provided configuration for Beams.
BeamsConfig *v122.BeamsConfig
BeamsConfig *v123.BeamsConfig
// PendingCSRRequest allows asynchronous, watcher-based CSR requests to
// other Auth server instances.
PendingCSRRequest *v120.PendingCSRRequest
PendingCSRRequest *v121.PendingCSRRequest
// -- end of xxx_hidden_Resource
}
@@ -3608,6 +3645,9 @@ func (b0 Event_builder) Build() *Event {
if b.AutoUpdateBotInstanceReport != nil {
x.xxx_hidden_Resource = &event_AutoUpdateBotInstanceReport{b.AutoUpdateBotInstanceReport}
}
if b.LinuxDesktop != nil {
x.xxx_hidden_Resource = &event_LinuxDesktop{b.LinuxDesktop}
}
if b.CertAuthorityOverride != nil {
x.xxx_hidden_Resource = &event_CertAuthorityOverride{b.CertAuthorityOverride}
}
@@ -4054,45 +4094,50 @@ type event_AutoUpdateBotInstanceReport struct {
AutoUpdateBotInstanceReport *v111.AutoUpdateBotInstanceReport `protobuf:"bytes,85,opt,name=AutoUpdateBotInstanceReport,proto3,oneof"`
}
type event_LinuxDesktop struct {
// LinuxDesktop is a resource for linux desktop.
LinuxDesktop *v120.LinuxDesktop `protobuf:"bytes,87,opt,name=LinuxDesktop,proto3,oneof"`
}
type event_CertAuthorityOverride struct {
// CertAuthorityOverride allows admins to override Teleport CA certificates.
CertAuthorityOverride *v120.CertAuthorityOverride `protobuf:"bytes,90,opt,name=CertAuthorityOverride,proto3,oneof"`
CertAuthorityOverride *v121.CertAuthorityOverride `protobuf:"bytes,90,opt,name=CertAuthorityOverride,proto3,oneof"`
}
type event_InferenceModel struct {
// InferenceModel is a resource for defining inference models.
InferenceModel *v121.InferenceModel `protobuf:"bytes,91,opt,name=InferenceModel,proto3,oneof"`
InferenceModel *v122.InferenceModel `protobuf:"bytes,91,opt,name=InferenceModel,proto3,oneof"`
}
type event_InferenceSecret struct {
// InferenceSecret is a resource for defining inference secrets.
InferenceSecret *v121.InferenceSecret `protobuf:"bytes,92,opt,name=InferenceSecret,proto3,oneof"`
InferenceSecret *v122.InferenceSecret `protobuf:"bytes,92,opt,name=InferenceSecret,proto3,oneof"`
}
type event_InferencePolicy struct {
// InferencePolicy is a resource for defining inference policies.
InferencePolicy *v121.InferencePolicy `protobuf:"bytes,93,opt,name=InferencePolicy,proto3,oneof"`
InferencePolicy *v122.InferencePolicy `protobuf:"bytes,93,opt,name=InferencePolicy,proto3,oneof"`
}
type event_RetrievalModel struct {
// RetrievalModel is a resource for defining retrieval models.
RetrievalModel *v121.RetrievalModel `protobuf:"bytes,94,opt,name=RetrievalModel,proto3,oneof"`
RetrievalModel *v122.RetrievalModel `protobuf:"bytes,94,opt,name=RetrievalModel,proto3,oneof"`
}
type event_Beam struct {
// Beam is an ephemeral AI-optimized compute environment.
Beam *v122.Beam `protobuf:"bytes,95,opt,name=Beam,proto3,oneof"`
Beam *v123.Beam `protobuf:"bytes,95,opt,name=Beam,proto3,oneof"`
}
type event_BeamsConfig struct {
// BeamsConfig is the user-provided configuration for Beams.
BeamsConfig *v122.BeamsConfig `protobuf:"bytes,97,opt,name=BeamsConfig,proto3,oneof"`
BeamsConfig *v123.BeamsConfig `protobuf:"bytes,97,opt,name=BeamsConfig,proto3,oneof"`
}
type event_PendingCSRRequest struct {
// PendingCSRRequest allows asynchronous, watcher-based CSR requests to
// other Auth server instances.
PendingCSRRequest *v120.PendingCSRRequest `protobuf:"bytes,99,opt,name=PendingCSRRequest,proto3,oneof"`
PendingCSRRequest *v121.PendingCSRRequest `protobuf:"bytes,99,opt,name=PendingCSRRequest,proto3,oneof"`
}
func (*event_ResourceHeader) isEvent_Resource() {}
@@ -4255,6 +4300,8 @@ func (*event_Plugin) isEvent_Resource() {}
func (*event_AutoUpdateBotInstanceReport) isEvent_Resource() {}
func (*event_LinuxDesktop) isEvent_Resource() {}
func (*event_CertAuthorityOverride) isEvent_Resource() {}
func (*event_InferenceModel) isEvent_Resource() {}
@@ -4275,7 +4322,7 @@ var File_teleport_legacy_client_proto_event_proto protoreflect.FileDescriptor
const file_teleport_legacy_client_proto_event_proto_rawDesc = "" +
"\n" +
"(teleport/legacy/client/proto/event.proto\x12\x05proto\x1a'teleport/accesslist/v1/accesslist.proto\x1a?teleport/accessmonitoringrules/v1/access_monitoring_rules.proto\x1a'teleport/autoupdate/v1/autoupdate.proto\x1a\x1cteleport/beams/v1/beam.proto\x1a$teleport/beams/v1/beams_config.proto\x1a5teleport/clusterconfig/v1/access_graph_settings.proto\x1a'teleport/crownjewel/v1/crownjewel.proto\x1a#teleport/dbobject/v1/dbobject.proto\x1a1teleport/discoveryconfig/v1/discoveryconfig.proto\x1a7teleport/healthcheckconfig/v1/health_check_config.proto\x1a/teleport/identitycenter/v1/identitycenter.proto\x1a;teleport/kubewaitingcontainer/v1/kubewaitingcontainer.proto\x1a!teleport/legacy/types/types.proto\x1a(teleport/machineid/v1/bot_instance.proto\x1a&teleport/machineid/v1/federation.proto\x1a-teleport/notifications/v1/notifications.proto\x1a'teleport/presence/v1/relay_server.proto\x1a+teleport/provisioning/v1/provisioning.proto\x1a:teleport/recordingencryption/v1/recording_encryption.proto\x1a*teleport/scopes/access/v1/assignment.proto\x1a$teleport/scopes/access/v1/role.proto\x1a'teleport/secreports/v1/secreports.proto\x1a/teleport/subca/v1/cert_authority_override.proto\x1a+teleport/subca/v1/pending_csr_request.proto\x1a'teleport/summarizer/v1/summarizer.proto\x1a/teleport/userloginstate/v1/userloginstate.proto\x1a1teleport/userprovisioning/v2/statichostuser.proto\x1a&teleport/usertasks/v1/user_tasks.proto\x1a+teleport/workloadidentity/v1/resource.proto\x1a6teleport/workloadidentity/v1/revocation_resource.proto\"\xf35\n" +
"(teleport/legacy/client/proto/event.proto\x12\x05proto\x1a'teleport/accesslist/v1/accesslist.proto\x1a?teleport/accessmonitoringrules/v1/access_monitoring_rules.proto\x1a'teleport/autoupdate/v1/autoupdate.proto\x1a\x1cteleport/beams/v1/beam.proto\x1a$teleport/beams/v1/beams_config.proto\x1a5teleport/clusterconfig/v1/access_graph_settings.proto\x1a'teleport/crownjewel/v1/crownjewel.proto\x1a#teleport/dbobject/v1/dbobject.proto\x1a1teleport/discoveryconfig/v1/discoveryconfig.proto\x1a7teleport/healthcheckconfig/v1/health_check_config.proto\x1a/teleport/identitycenter/v1/identitycenter.proto\x1a;teleport/kubewaitingcontainer/v1/kubewaitingcontainer.proto\x1a!teleport/legacy/types/types.proto\x1a,teleport/linuxdesktop/v1/linux_desktop.proto\x1a(teleport/machineid/v1/bot_instance.proto\x1a&teleport/machineid/v1/federation.proto\x1a-teleport/notifications/v1/notifications.proto\x1a'teleport/presence/v1/relay_server.proto\x1a+teleport/provisioning/v1/provisioning.proto\x1a:teleport/recordingencryption/v1/recording_encryption.proto\x1a*teleport/scopes/access/v1/assignment.proto\x1a$teleport/scopes/access/v1/role.proto\x1a'teleport/secreports/v1/secreports.proto\x1a/teleport/subca/v1/cert_authority_override.proto\x1a+teleport/subca/v1/pending_csr_request.proto\x1a'teleport/summarizer/v1/summarizer.proto\x1a/teleport/userloginstate/v1/userloginstate.proto\x1a1teleport/userprovisioning/v2/statichostuser.proto\x1a&teleport/usertasks/v1/user_tasks.proto\x1a+teleport/workloadidentity/v1/resource.proto\x1a6teleport/workloadidentity/v1/revocation_resource.proto\"\xc16\n" +
"\x05Event\x12$\n" +
"\x04Type\x18\x01 \x01(\x0e2\x10.proto.OperationR\x04Type\x12?\n" +
"\x0eResourceHeader\x18\x02 \x01(\v2\x15.types.ResourceHeaderH\x00R\x0eResourceHeader\x12>\n" +
@@ -4370,7 +4417,8 @@ const file_teleport_legacy_client_proto_event_proto_rawDesc = "" +
"\frelay_server\x18R \x01(\v2!.teleport.presence.v1.RelayServerH\x00R\vrelayServer\x12h\n" +
"\x13RecordingEncryption\x18S \x01(\v24.teleport.recordingencryption.v1.RecordingEncryptionH\x00R\x13RecordingEncryption\x12)\n" +
"\x06plugin\x18T \x01(\v2\x0f.types.PluginV1H\x00R\x06plugin\x12w\n" +
"\x1bAutoUpdateBotInstanceReport\x18U \x01(\v23.teleport.autoupdate.v1.AutoUpdateBotInstanceReportH\x00R\x1bAutoUpdateBotInstanceReport\x12`\n" +
"\x1bAutoUpdateBotInstanceReport\x18U \x01(\v23.teleport.autoupdate.v1.AutoUpdateBotInstanceReportH\x00R\x1bAutoUpdateBotInstanceReport\x12L\n" +
"\fLinuxDesktop\x18W \x01(\v2&.teleport.linuxdesktop.v1.LinuxDesktopH\x00R\fLinuxDesktop\x12`\n" +
"\x15CertAuthorityOverride\x18Z \x01(\v2(.teleport.subca.v1.CertAuthorityOverrideH\x00R\x15CertAuthorityOverride\x12P\n" +
"\x0eInferenceModel\x18[ \x01(\v2&.teleport.summarizer.v1.InferenceModelH\x00R\x0eInferenceModel\x12S\n" +
"\x0fInferenceSecret\x18\\ \x01(\v2'.teleport.summarizer.v1.InferenceSecretH\x00R\x0fInferenceSecret\x12S\n" +
@@ -4469,14 +4517,15 @@ var file_teleport_legacy_client_proto_event_proto_goTypes = []any{
(*v119.RecordingEncryption)(nil), // 76: teleport.recordingencryption.v1.RecordingEncryption
(*types.PluginV1)(nil), // 77: types.PluginV1
(*v111.AutoUpdateBotInstanceReport)(nil), // 78: teleport.autoupdate.v1.AutoUpdateBotInstanceReport
(*v120.CertAuthorityOverride)(nil), // 79: teleport.subca.v1.CertAuthorityOverride
(*v121.InferenceModel)(nil), // 80: teleport.summarizer.v1.InferenceModel
(*v121.InferenceSecret)(nil), // 81: teleport.summarizer.v1.InferenceSecret
(*v121.InferencePolicy)(nil), // 82: teleport.summarizer.v1.InferencePolicy
(*v121.RetrievalModel)(nil), // 83: teleport.summarizer.v1.RetrievalModel
(*v122.Beam)(nil), // 84: teleport.beams.v1.Beam
(*v122.BeamsConfig)(nil), // 85: teleport.beams.v1.BeamsConfig
(*v120.PendingCSRRequest)(nil), // 86: teleport.subca.v1.PendingCSRRequest
(*v120.LinuxDesktop)(nil), // 79: teleport.linuxdesktop.v1.LinuxDesktop
(*v121.CertAuthorityOverride)(nil), // 80: teleport.subca.v1.CertAuthorityOverride
(*v122.InferenceModel)(nil), // 81: teleport.summarizer.v1.InferenceModel
(*v122.InferenceSecret)(nil), // 82: teleport.summarizer.v1.InferenceSecret
(*v122.InferencePolicy)(nil), // 83: teleport.summarizer.v1.InferencePolicy
(*v122.RetrievalModel)(nil), // 84: teleport.summarizer.v1.RetrievalModel
(*v123.Beam)(nil), // 85: teleport.beams.v1.Beam
(*v123.BeamsConfig)(nil), // 86: teleport.beams.v1.BeamsConfig
(*v121.PendingCSRRequest)(nil), // 87: teleport.subca.v1.PendingCSRRequest
}
var file_teleport_legacy_client_proto_event_proto_depIdxs = []int32{
0, // 0: proto.Event.Type:type_name -> proto.Operation
@@ -4560,19 +4609,20 @@ var file_teleport_legacy_client_proto_event_proto_depIdxs = []int32{
76, // 78: proto.Event.RecordingEncryption:type_name -> teleport.recordingencryption.v1.RecordingEncryption
77, // 79: proto.Event.plugin:type_name -> types.PluginV1
78, // 80: proto.Event.AutoUpdateBotInstanceReport:type_name -> teleport.autoupdate.v1.AutoUpdateBotInstanceReport
79, // 81: proto.Event.CertAuthorityOverride:type_name -> teleport.subca.v1.CertAuthorityOverride
80, // 82: proto.Event.InferenceModel:type_name -> teleport.summarizer.v1.InferenceModel
81, // 83: proto.Event.InferenceSecret:type_name -> teleport.summarizer.v1.InferenceSecret
82, // 84: proto.Event.InferencePolicy:type_name -> teleport.summarizer.v1.InferencePolicy
83, // 85: proto.Event.RetrievalModel:type_name -> teleport.summarizer.v1.RetrievalModel
84, // 86: proto.Event.Beam:type_name -> teleport.beams.v1.Beam
85, // 87: proto.Event.BeamsConfig:type_name -> teleport.beams.v1.BeamsConfig
86, // 88: proto.Event.PendingCSRRequest:type_name -> teleport.subca.v1.PendingCSRRequest
89, // [89:89] is the sub-list for method output_type
89, // [89:89] is the sub-list for method input_type
89, // [89:89] is the sub-list for extension type_name
89, // [89:89] is the sub-list for extension extendee
0, // [0:89] is the sub-list for field type_name
79, // 81: proto.Event.LinuxDesktop:type_name -> teleport.linuxdesktop.v1.LinuxDesktop
80, // 82: proto.Event.CertAuthorityOverride:type_name -> teleport.subca.v1.CertAuthorityOverride
81, // 83: proto.Event.InferenceModel:type_name -> teleport.summarizer.v1.InferenceModel
82, // 84: proto.Event.InferenceSecret:type_name -> teleport.summarizer.v1.InferenceSecret
83, // 85: proto.Event.InferencePolicy:type_name -> teleport.summarizer.v1.InferencePolicy
84, // 86: proto.Event.RetrievalModel:type_name -> teleport.summarizer.v1.RetrievalModel
85, // 87: proto.Event.Beam:type_name -> teleport.beams.v1.Beam
86, // 88: proto.Event.BeamsConfig:type_name -> teleport.beams.v1.BeamsConfig
87, // 89: proto.Event.PendingCSRRequest:type_name -> teleport.subca.v1.PendingCSRRequest
90, // [90:90] is the sub-list for method output_type
90, // [90:90] is the sub-list for method input_type
90, // [90:90] is the sub-list for extension type_name
90, // [90:90] is the sub-list for extension extendee
0, // [0:90] is the sub-list for field type_name
}
func init() { file_teleport_legacy_client_proto_event_proto_init() }
@@ -4661,6 +4711,7 @@ func file_teleport_legacy_client_proto_event_proto_init() {
(*event_RecordingEncryption)(nil),
(*event_Plugin)(nil),
(*event_AutoUpdateBotInstanceReport)(nil),
(*event_LinuxDesktop)(nil),
(*event_CertAuthorityOverride)(nil),
(*event_InferenceModel)(nil),
(*event_InferenceSecret)(nil),
+85 -19
View File
@@ -26,6 +26,7 @@
package proto
import (
v12 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
v11 "github.com/gravitational/teleport/api/gen/proto/go/teleport/presence/v1"
v1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/scopes/joining/v1"
types "github.com/gravitational/teleport/api/types"
@@ -1592,7 +1593,9 @@ type InventoryHeartbeat struct {
// KubeServer is a complete kube server spec to be heartbeated.
KubernetesServer *types.KubernetesServerV3 `protobuf:"bytes,4,opt,name=KubernetesServer,proto3" json:"KubernetesServer,omitempty"`
// A relay_server to be heartbeated.
RelayServer *v11.RelayServer `protobuf:"bytes,5,opt,name=relay_server,json=relayServer,proto3" json:"relay_server,omitempty"`
RelayServer *v11.RelayServer `protobuf:"bytes,5,opt,name=relay_server,json=relayServer,proto3" json:"relay_server,omitempty"`
// LinuxDesktop is a complete linux desktop spec to be heartbeated.
LinuxDesktop *v12.LinuxDesktop `protobuf:"bytes,6,opt,name=linux_desktop,json=linuxDesktop,proto3" json:"linux_desktop,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1657,6 +1660,13 @@ func (x *InventoryHeartbeat) GetRelayServer() *v11.RelayServer {
return nil
}
func (x *InventoryHeartbeat) GetLinuxDesktop() *v12.LinuxDesktop {
if x != nil {
return x.LinuxDesktop
}
return nil
}
func (x *InventoryHeartbeat) SetSSHServer(v *types.ServerV2) {
x.SSHServer = v
}
@@ -1677,6 +1687,10 @@ func (x *InventoryHeartbeat) SetRelayServer(v *v11.RelayServer) {
x.RelayServer = v
}
func (x *InventoryHeartbeat) SetLinuxDesktop(v *v12.LinuxDesktop) {
x.LinuxDesktop = v
}
func (x *InventoryHeartbeat) HasSSHServer() bool {
if x == nil {
return false
@@ -1712,6 +1726,13 @@ func (x *InventoryHeartbeat) HasRelayServer() bool {
return x.RelayServer != nil
}
func (x *InventoryHeartbeat) HasLinuxDesktop() bool {
if x == nil {
return false
}
return x.LinuxDesktop != nil
}
func (x *InventoryHeartbeat) ClearSSHServer() {
x.SSHServer = nil
}
@@ -1732,6 +1753,10 @@ func (x *InventoryHeartbeat) ClearRelayServer() {
x.RelayServer = nil
}
func (x *InventoryHeartbeat) ClearLinuxDesktop() {
x.LinuxDesktop = nil
}
type InventoryHeartbeat_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
@@ -1748,6 +1773,8 @@ type InventoryHeartbeat_builder struct {
KubernetesServer *types.KubernetesServerV3
// A relay_server to be heartbeated.
RelayServer *v11.RelayServer
// LinuxDesktop is a complete linux desktop spec to be heartbeated.
LinuxDesktop *v12.LinuxDesktop
}
func (b0 InventoryHeartbeat_builder) Build() *InventoryHeartbeat {
@@ -1759,6 +1786,7 @@ func (b0 InventoryHeartbeat_builder) Build() *InventoryHeartbeat {
x.DatabaseServer = b.DatabaseServer
x.KubernetesServer = b.KubernetesServer
x.RelayServer = b.RelayServer
x.LinuxDesktop = b.LinuxDesktop
return m0
}
@@ -2153,8 +2181,12 @@ type DownstreamInventoryHello_SupportedCapabilities struct {
RelayServerHeartbeatsCleanup bool `protobuf:"varint,19,opt,name=relay_server_heartbeats_cleanup,json=relayServerHeartbeatsCleanup,proto3" json:"relay_server_heartbeats_cleanup,omitempty"`
// DatabaseHeartbeatGracefulStop indicates the ICS supports stopping an individual database heartbeat.
DatabaseHeartbeatGracefulStop bool `protobuf:"varint,20,opt,name=database_heartbeat_graceful_stop,json=databaseHeartbeatGracefulStop,proto3" json:"database_heartbeat_graceful_stop,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
// LinuxDesktopHeartbeats indicates the ICS supports heartbeating linux desktops.
LinuxDesktopHeartbeats bool `protobuf:"varint,21,opt,name=linux_desktop_heartbeats,json=linuxDesktopHeartbeats,proto3" json:"linux_desktop_heartbeats,omitempty"`
// LinuxDesktopCleanup indicates the ICS supports deleting linux desktops when UpstreamInventoryGoodbye.DeleteResources is set.
LinuxDesktopCleanup bool `protobuf:"varint,22,opt,name=linux_desktop_cleanup,json=linuxDesktopCleanup,proto3" json:"linux_desktop_cleanup,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DownstreamInventoryHello_SupportedCapabilities) Reset() {
@@ -2322,6 +2354,20 @@ func (x *DownstreamInventoryHello_SupportedCapabilities) GetDatabaseHeartbeatGra
return false
}
func (x *DownstreamInventoryHello_SupportedCapabilities) GetLinuxDesktopHeartbeats() bool {
if x != nil {
return x.LinuxDesktopHeartbeats
}
return false
}
func (x *DownstreamInventoryHello_SupportedCapabilities) GetLinuxDesktopCleanup() bool {
if x != nil {
return x.LinuxDesktopCleanup
}
return false
}
func (x *DownstreamInventoryHello_SupportedCapabilities) SetProxyHeartbeats(v bool) {
x.ProxyHeartbeats = v
}
@@ -2402,6 +2448,14 @@ func (x *DownstreamInventoryHello_SupportedCapabilities) SetDatabaseHeartbeatGra
x.DatabaseHeartbeatGracefulStop = v
}
func (x *DownstreamInventoryHello_SupportedCapabilities) SetLinuxDesktopHeartbeats(v bool) {
x.LinuxDesktopHeartbeats = v
}
func (x *DownstreamInventoryHello_SupportedCapabilities) SetLinuxDesktopCleanup(v bool) {
x.LinuxDesktopCleanup = v
}
type DownstreamInventoryHello_SupportedCapabilities_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
@@ -2445,6 +2499,10 @@ type DownstreamInventoryHello_SupportedCapabilities_builder struct {
RelayServerHeartbeatsCleanup bool
// DatabaseHeartbeatGracefulStop indicates the ICS supports stopping an individual database heartbeat.
DatabaseHeartbeatGracefulStop bool
// LinuxDesktopHeartbeats indicates the ICS supports heartbeating linux desktops.
LinuxDesktopHeartbeats bool
// LinuxDesktopCleanup indicates the ICS supports deleting linux desktops when UpstreamInventoryGoodbye.DeleteResources is set.
LinuxDesktopCleanup bool
}
func (b0 DownstreamInventoryHello_SupportedCapabilities_builder) Build() *DownstreamInventoryHello_SupportedCapabilities {
@@ -2471,6 +2529,8 @@ func (b0 DownstreamInventoryHello_SupportedCapabilities_builder) Build() *Downst
x.KubernetesCleanup = b.KubernetesCleanup
x.RelayServerHeartbeatsCleanup = b.RelayServerHeartbeatsCleanup
x.DatabaseHeartbeatGracefulStop = b.DatabaseHeartbeatGracefulStop
x.LinuxDesktopHeartbeats = b.LinuxDesktopHeartbeats
x.LinuxDesktopCleanup = b.LinuxDesktopCleanup
return m0
}
@@ -2478,7 +2538,7 @@ var File_teleport_legacy_client_proto_inventory_proto protoreflect.FileDescripto
const file_teleport_legacy_client_proto_inventory_proto_rawDesc = "" +
"\n" +
",teleport/legacy/client/proto/inventory.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a!teleport/legacy/types/types.proto\x1a'teleport/presence/v1/relay_server.proto\x1a&teleport/scopes/joining/v1/token.proto\"\xa1\x03\n" +
",teleport/legacy/client/proto/inventory.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a!teleport/legacy/types/types.proto\x1a,teleport/linuxdesktop/v1/linux_desktop.proto\x1a'teleport/presence/v1/relay_server.proto\x1a&teleport/scopes/joining/v1/token.proto\"\xa1\x03\n" +
"\x16UpstreamInventoryOneOf\x125\n" +
"\x05Hello\x18\x01 \x01(\v2\x1d.proto.UpstreamInventoryHelloH\x00R\x05Hello\x129\n" +
"\tHeartbeat\x18\x02 \x01(\v2\x19.proto.InventoryHeartbeatH\x00R\tHeartbeat\x122\n" +
@@ -2516,11 +2576,12 @@ const file_teleport_legacy_client_proto_inventory_proto_rawDesc = "" +
"\x0eInstallMethods\x18\x05 \x03(\tR\x0eInstallMethods\x12*\n" +
"\x10ContainerRuntime\x18\x06 \x01(\tR\x10ContainerRuntime\x124\n" +
"\x15ContainerOrchestrator\x18\a \x01(\tR\x15ContainerOrchestrator\x12*\n" +
"\x10CloudEnvironment\x18\b \x01(\tR\x10CloudEnvironment\"\xaf\t\n" +
"\x10CloudEnvironment\x18\b \x01(\tR\x10CloudEnvironment\"\x9d\n" +
"\n" +
"\x18DownstreamInventoryHello\x12\x18\n" +
"\aVersion\x18\x01 \x01(\tR\aVersion\x12\x1a\n" +
"\bServerID\x18\x02 \x01(\tR\bServerID\x12Y\n" +
"\fCapabilities\x18\x03 \x01(\v25.proto.DownstreamInventoryHello.SupportedCapabilitiesR\fCapabilities\x1a\x81\b\n" +
"\fCapabilities\x18\x03 \x01(\v25.proto.DownstreamInventoryHello.SupportedCapabilitiesR\fCapabilities\x1a\xef\b\n" +
"\x15SupportedCapabilities\x12(\n" +
"\x0fProxyHeartbeats\x18\x01 \x01(\bR\x0fProxyHeartbeats\x12\"\n" +
"\fProxyCleanup\x18\x02 \x01(\bR\fProxyCleanup\x12&\n" +
@@ -2544,7 +2605,9 @@ const file_teleport_legacy_client_proto_inventory_proto_rawDesc = "" +
"\x14KubernetesHeartbeats\x18\x11 \x01(\bR\x14KubernetesHeartbeats\x12,\n" +
"\x11KubernetesCleanup\x18\x12 \x01(\bR\x11KubernetesCleanup\x12E\n" +
"\x1frelay_server_heartbeats_cleanup\x18\x13 \x01(\bR\x1crelayServerHeartbeatsCleanup\x12G\n" +
" database_heartbeat_graceful_stop\x18\x14 \x01(\bR\x1ddatabaseHeartbeatGracefulStop\"\xea\x01\n" +
" database_heartbeat_graceful_stop\x18\x14 \x01(\bR\x1ddatabaseHeartbeatGracefulStop\x128\n" +
"\x18linux_desktop_heartbeats\x18\x15 \x01(\bR\x16linuxDesktopHeartbeats\x122\n" +
"\x15linux_desktop_cleanup\x18\x16 \x01(\bR\x13linuxDesktopCleanup\"\xea\x01\n" +
"\x1cInventoryUpdateLabelsRequest\x12\x1a\n" +
"\bServerID\x18\x01 \x01(\tR\bServerID\x12*\n" +
"\x04Kind\x18\x02 \x01(\x0e2\x16.proto.LabelUpdateKindR\x04Kind\x12G\n" +
@@ -2557,13 +2620,14 @@ const file_teleport_legacy_client_proto_inventory_proto_rawDesc = "" +
"\x06Labels\x18\x02 \x03(\v22.proto.DownstreamInventoryUpdateLabels.LabelsEntryR\x06Labels\x1a9\n" +
"\vLabelsEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xc3\x02\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x90\x03\n" +
"\x12InventoryHeartbeat\x12-\n" +
"\tSSHServer\x18\x01 \x01(\v2\x0f.types.ServerV2R\tSSHServer\x120\n" +
"\tAppServer\x18\x02 \x01(\v2\x12.types.AppServerV3R\tAppServer\x12?\n" +
"\x0eDatabaseServer\x18\x03 \x01(\v2\x17.types.DatabaseServerV3R\x0eDatabaseServer\x12E\n" +
"\x10KubernetesServer\x18\x04 \x01(\v2\x19.types.KubernetesServerV3R\x10KubernetesServer\x12D\n" +
"\frelay_server\x18\x05 \x01(\v2!.teleport.presence.v1.RelayServerR\vrelayServer\"d\n" +
"\frelay_server\x18\x05 \x01(\v2!.teleport.presence.v1.RelayServerR\vrelayServer\x12K\n" +
"\rlinux_desktop\x18\x06 \x01(\v2&.teleport.linuxdesktop.v1.LinuxDesktopR\flinuxDesktop\"d\n" +
"\x18UpstreamInventoryGoodbye\x12(\n" +
"\x0fDeleteResources\x18\x01 \x01(\bR\x0fDeleteResources\x12\x1e\n" +
"\n" +
@@ -2629,6 +2693,7 @@ var file_teleport_legacy_client_proto_inventory_proto_goTypes = []any{
(*types.DatabaseServerV3)(nil), // 27: types.DatabaseServerV3
(*types.KubernetesServerV3)(nil), // 28: types.KubernetesServerV3
(*v11.RelayServer)(nil), // 29: teleport.presence.v1.RelayServer
(*v12.LinuxDesktop)(nil), // 30: teleport.linuxdesktop.v1.LinuxDesktop
}
var file_teleport_legacy_client_proto_inventory_proto_depIdxs = []int32{
6, // 0: proto.UpstreamInventoryOneOf.Hello:type_name -> proto.UpstreamInventoryHello
@@ -2653,16 +2718,17 @@ var file_teleport_legacy_client_proto_inventory_proto_depIdxs = []int32{
27, // 19: proto.InventoryHeartbeat.DatabaseServer:type_name -> types.DatabaseServerV3
28, // 20: proto.InventoryHeartbeat.KubernetesServer:type_name -> types.KubernetesServerV3
29, // 21: proto.InventoryHeartbeat.relay_server:type_name -> teleport.presence.v1.RelayServer
6, // 22: proto.InventoryStatusSummary.Connected:type_name -> proto.UpstreamInventoryHello
19, // 23: proto.InventoryStatusSummary.VersionCounts:type_name -> proto.InventoryStatusSummary.VersionCountsEntry
20, // 24: proto.InventoryStatusSummary.UpgraderCounts:type_name -> proto.InventoryStatusSummary.UpgraderCountsEntry
21, // 25: proto.InventoryStatusSummary.ServiceCounts:type_name -> proto.InventoryStatusSummary.ServiceCountsEntry
1, // 26: proto.UpstreamInventoryStopHeartbeat.kind:type_name -> proto.StopHeartbeatKind
27, // [27:27] is the sub-list for method output_type
27, // [27:27] is the sub-list for method input_type
27, // [27:27] is the sub-list for extension type_name
27, // [27:27] is the sub-list for extension extendee
0, // [0:27] is the sub-list for field type_name
30, // 22: proto.InventoryHeartbeat.linux_desktop:type_name -> teleport.linuxdesktop.v1.LinuxDesktop
6, // 23: proto.InventoryStatusSummary.Connected:type_name -> proto.UpstreamInventoryHello
19, // 24: proto.InventoryStatusSummary.VersionCounts:type_name -> proto.InventoryStatusSummary.VersionCountsEntry
20, // 25: proto.InventoryStatusSummary.UpgraderCounts:type_name -> proto.InventoryStatusSummary.UpgraderCountsEntry
21, // 26: proto.InventoryStatusSummary.ServiceCounts:type_name -> proto.InventoryStatusSummary.ServiceCountsEntry
1, // 27: proto.UpstreamInventoryStopHeartbeat.kind:type_name -> proto.StopHeartbeatKind
28, // [28:28] is the sub-list for method output_type
28, // [28:28] is the sub-list for method input_type
28, // [28:28] is the sub-list for extension type_name
28, // [28:28] is the sub-list for extension extendee
0, // [0:28] is the sub-list for field type_name
}
func init() { file_teleport_legacy_client_proto_inventory_proto_init() }
+79 -16
View File
@@ -26,6 +26,7 @@
package proto
import (
v12 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
v11 "github.com/gravitational/teleport/api/gen/proto/go/teleport/presence/v1"
v1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/scopes/joining/v1"
types "github.com/gravitational/teleport/api/types"
@@ -1517,6 +1518,7 @@ type InventoryHeartbeat struct {
xxx_hidden_DatabaseServer *types.DatabaseServerV3 `protobuf:"bytes,3,opt,name=DatabaseServer,proto3"`
xxx_hidden_KubernetesServer *types.KubernetesServerV3 `protobuf:"bytes,4,opt,name=KubernetesServer,proto3"`
xxx_hidden_RelayServer *v11.RelayServer `protobuf:"bytes,5,opt,name=relay_server,json=relayServer,proto3"`
xxx_hidden_LinuxDesktop *v12.LinuxDesktop `protobuf:"bytes,6,opt,name=linux_desktop,json=linuxDesktop,proto3"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1581,6 +1583,13 @@ func (x *InventoryHeartbeat) GetRelayServer() *v11.RelayServer {
return nil
}
func (x *InventoryHeartbeat) GetLinuxDesktop() *v12.LinuxDesktop {
if x != nil {
return x.xxx_hidden_LinuxDesktop
}
return nil
}
func (x *InventoryHeartbeat) SetSSHServer(v *types.ServerV2) {
x.xxx_hidden_SSHServer = v
}
@@ -1601,6 +1610,10 @@ func (x *InventoryHeartbeat) SetRelayServer(v *v11.RelayServer) {
x.xxx_hidden_RelayServer = v
}
func (x *InventoryHeartbeat) SetLinuxDesktop(v *v12.LinuxDesktop) {
x.xxx_hidden_LinuxDesktop = v
}
func (x *InventoryHeartbeat) HasSSHServer() bool {
if x == nil {
return false
@@ -1636,6 +1649,13 @@ func (x *InventoryHeartbeat) HasRelayServer() bool {
return x.xxx_hidden_RelayServer != nil
}
func (x *InventoryHeartbeat) HasLinuxDesktop() bool {
if x == nil {
return false
}
return x.xxx_hidden_LinuxDesktop != nil
}
func (x *InventoryHeartbeat) ClearSSHServer() {
x.xxx_hidden_SSHServer = nil
}
@@ -1656,6 +1676,10 @@ func (x *InventoryHeartbeat) ClearRelayServer() {
x.xxx_hidden_RelayServer = nil
}
func (x *InventoryHeartbeat) ClearLinuxDesktop() {
x.xxx_hidden_LinuxDesktop = nil
}
type InventoryHeartbeat_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
@@ -1672,6 +1696,8 @@ type InventoryHeartbeat_builder struct {
KubernetesServer *types.KubernetesServerV3
// A relay_server to be heartbeated.
RelayServer *v11.RelayServer
// LinuxDesktop is a complete linux desktop spec to be heartbeated.
LinuxDesktop *v12.LinuxDesktop
}
func (b0 InventoryHeartbeat_builder) Build() *InventoryHeartbeat {
@@ -1683,6 +1709,7 @@ func (b0 InventoryHeartbeat_builder) Build() *InventoryHeartbeat {
x.xxx_hidden_DatabaseServer = b.DatabaseServer
x.xxx_hidden_KubernetesServer = b.KubernetesServer
x.xxx_hidden_RelayServer = b.RelayServer
x.xxx_hidden_LinuxDesktop = b.LinuxDesktop
return m0
}
@@ -2045,6 +2072,8 @@ type DownstreamInventoryHello_SupportedCapabilities struct {
xxx_hidden_KubernetesCleanup bool `protobuf:"varint,18,opt,name=KubernetesCleanup,proto3"`
xxx_hidden_RelayServerHeartbeatsCleanup bool `protobuf:"varint,19,opt,name=relay_server_heartbeats_cleanup,json=relayServerHeartbeatsCleanup,proto3"`
xxx_hidden_DatabaseHeartbeatGracefulStop bool `protobuf:"varint,20,opt,name=database_heartbeat_graceful_stop,json=databaseHeartbeatGracefulStop,proto3"`
xxx_hidden_LinuxDesktopHeartbeats bool `protobuf:"varint,21,opt,name=linux_desktop_heartbeats,json=linuxDesktopHeartbeats,proto3"`
xxx_hidden_LinuxDesktopCleanup bool `protobuf:"varint,22,opt,name=linux_desktop_cleanup,json=linuxDesktopCleanup,proto3"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -2214,6 +2243,20 @@ func (x *DownstreamInventoryHello_SupportedCapabilities) GetDatabaseHeartbeatGra
return false
}
func (x *DownstreamInventoryHello_SupportedCapabilities) GetLinuxDesktopHeartbeats() bool {
if x != nil {
return x.xxx_hidden_LinuxDesktopHeartbeats
}
return false
}
func (x *DownstreamInventoryHello_SupportedCapabilities) GetLinuxDesktopCleanup() bool {
if x != nil {
return x.xxx_hidden_LinuxDesktopCleanup
}
return false
}
func (x *DownstreamInventoryHello_SupportedCapabilities) SetProxyHeartbeats(v bool) {
x.xxx_hidden_ProxyHeartbeats = v
}
@@ -2294,6 +2337,14 @@ func (x *DownstreamInventoryHello_SupportedCapabilities) SetDatabaseHeartbeatGra
x.xxx_hidden_DatabaseHeartbeatGracefulStop = v
}
func (x *DownstreamInventoryHello_SupportedCapabilities) SetLinuxDesktopHeartbeats(v bool) {
x.xxx_hidden_LinuxDesktopHeartbeats = v
}
func (x *DownstreamInventoryHello_SupportedCapabilities) SetLinuxDesktopCleanup(v bool) {
x.xxx_hidden_LinuxDesktopCleanup = v
}
type DownstreamInventoryHello_SupportedCapabilities_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
@@ -2337,6 +2388,10 @@ type DownstreamInventoryHello_SupportedCapabilities_builder struct {
RelayServerHeartbeatsCleanup bool
// DatabaseHeartbeatGracefulStop indicates the ICS supports stopping an individual database heartbeat.
DatabaseHeartbeatGracefulStop bool
// LinuxDesktopHeartbeats indicates the ICS supports heartbeating linux desktops.
LinuxDesktopHeartbeats bool
// LinuxDesktopCleanup indicates the ICS supports deleting linux desktops when UpstreamInventoryGoodbye.DeleteResources is set.
LinuxDesktopCleanup bool
}
func (b0 DownstreamInventoryHello_SupportedCapabilities_builder) Build() *DownstreamInventoryHello_SupportedCapabilities {
@@ -2363,6 +2418,8 @@ func (b0 DownstreamInventoryHello_SupportedCapabilities_builder) Build() *Downst
x.xxx_hidden_KubernetesCleanup = b.KubernetesCleanup
x.xxx_hidden_RelayServerHeartbeatsCleanup = b.RelayServerHeartbeatsCleanup
x.xxx_hidden_DatabaseHeartbeatGracefulStop = b.DatabaseHeartbeatGracefulStop
x.xxx_hidden_LinuxDesktopHeartbeats = b.LinuxDesktopHeartbeats
x.xxx_hidden_LinuxDesktopCleanup = b.LinuxDesktopCleanup
return m0
}
@@ -2370,7 +2427,7 @@ var File_teleport_legacy_client_proto_inventory_proto protoreflect.FileDescripto
const file_teleport_legacy_client_proto_inventory_proto_rawDesc = "" +
"\n" +
",teleport/legacy/client/proto/inventory.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a!teleport/legacy/types/types.proto\x1a'teleport/presence/v1/relay_server.proto\x1a&teleport/scopes/joining/v1/token.proto\"\xa1\x03\n" +
",teleport/legacy/client/proto/inventory.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a!teleport/legacy/types/types.proto\x1a,teleport/linuxdesktop/v1/linux_desktop.proto\x1a'teleport/presence/v1/relay_server.proto\x1a&teleport/scopes/joining/v1/token.proto\"\xa1\x03\n" +
"\x16UpstreamInventoryOneOf\x125\n" +
"\x05Hello\x18\x01 \x01(\v2\x1d.proto.UpstreamInventoryHelloH\x00R\x05Hello\x129\n" +
"\tHeartbeat\x18\x02 \x01(\v2\x19.proto.InventoryHeartbeatH\x00R\tHeartbeat\x122\n" +
@@ -2408,11 +2465,12 @@ const file_teleport_legacy_client_proto_inventory_proto_rawDesc = "" +
"\x0eInstallMethods\x18\x05 \x03(\tR\x0eInstallMethods\x12*\n" +
"\x10ContainerRuntime\x18\x06 \x01(\tR\x10ContainerRuntime\x124\n" +
"\x15ContainerOrchestrator\x18\a \x01(\tR\x15ContainerOrchestrator\x12*\n" +
"\x10CloudEnvironment\x18\b \x01(\tR\x10CloudEnvironment\"\xaf\t\n" +
"\x10CloudEnvironment\x18\b \x01(\tR\x10CloudEnvironment\"\x9d\n" +
"\n" +
"\x18DownstreamInventoryHello\x12\x18\n" +
"\aVersion\x18\x01 \x01(\tR\aVersion\x12\x1a\n" +
"\bServerID\x18\x02 \x01(\tR\bServerID\x12Y\n" +
"\fCapabilities\x18\x03 \x01(\v25.proto.DownstreamInventoryHello.SupportedCapabilitiesR\fCapabilities\x1a\x81\b\n" +
"\fCapabilities\x18\x03 \x01(\v25.proto.DownstreamInventoryHello.SupportedCapabilitiesR\fCapabilities\x1a\xef\b\n" +
"\x15SupportedCapabilities\x12(\n" +
"\x0fProxyHeartbeats\x18\x01 \x01(\bR\x0fProxyHeartbeats\x12\"\n" +
"\fProxyCleanup\x18\x02 \x01(\bR\fProxyCleanup\x12&\n" +
@@ -2436,7 +2494,9 @@ const file_teleport_legacy_client_proto_inventory_proto_rawDesc = "" +
"\x14KubernetesHeartbeats\x18\x11 \x01(\bR\x14KubernetesHeartbeats\x12,\n" +
"\x11KubernetesCleanup\x18\x12 \x01(\bR\x11KubernetesCleanup\x12E\n" +
"\x1frelay_server_heartbeats_cleanup\x18\x13 \x01(\bR\x1crelayServerHeartbeatsCleanup\x12G\n" +
" database_heartbeat_graceful_stop\x18\x14 \x01(\bR\x1ddatabaseHeartbeatGracefulStop\"\xea\x01\n" +
" database_heartbeat_graceful_stop\x18\x14 \x01(\bR\x1ddatabaseHeartbeatGracefulStop\x128\n" +
"\x18linux_desktop_heartbeats\x18\x15 \x01(\bR\x16linuxDesktopHeartbeats\x122\n" +
"\x15linux_desktop_cleanup\x18\x16 \x01(\bR\x13linuxDesktopCleanup\"\xea\x01\n" +
"\x1cInventoryUpdateLabelsRequest\x12\x1a\n" +
"\bServerID\x18\x01 \x01(\tR\bServerID\x12*\n" +
"\x04Kind\x18\x02 \x01(\x0e2\x16.proto.LabelUpdateKindR\x04Kind\x12G\n" +
@@ -2449,13 +2509,14 @@ const file_teleport_legacy_client_proto_inventory_proto_rawDesc = "" +
"\x06Labels\x18\x02 \x03(\v22.proto.DownstreamInventoryUpdateLabels.LabelsEntryR\x06Labels\x1a9\n" +
"\vLabelsEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xc3\x02\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x90\x03\n" +
"\x12InventoryHeartbeat\x12-\n" +
"\tSSHServer\x18\x01 \x01(\v2\x0f.types.ServerV2R\tSSHServer\x120\n" +
"\tAppServer\x18\x02 \x01(\v2\x12.types.AppServerV3R\tAppServer\x12?\n" +
"\x0eDatabaseServer\x18\x03 \x01(\v2\x17.types.DatabaseServerV3R\x0eDatabaseServer\x12E\n" +
"\x10KubernetesServer\x18\x04 \x01(\v2\x19.types.KubernetesServerV3R\x10KubernetesServer\x12D\n" +
"\frelay_server\x18\x05 \x01(\v2!.teleport.presence.v1.RelayServerR\vrelayServer\"d\n" +
"\frelay_server\x18\x05 \x01(\v2!.teleport.presence.v1.RelayServerR\vrelayServer\x12K\n" +
"\rlinux_desktop\x18\x06 \x01(\v2&.teleport.linuxdesktop.v1.LinuxDesktopR\flinuxDesktop\"d\n" +
"\x18UpstreamInventoryGoodbye\x12(\n" +
"\x0fDeleteResources\x18\x01 \x01(\bR\x0fDeleteResources\x12\x1e\n" +
"\n" +
@@ -2521,6 +2582,7 @@ var file_teleport_legacy_client_proto_inventory_proto_goTypes = []any{
(*types.DatabaseServerV3)(nil), // 27: types.DatabaseServerV3
(*types.KubernetesServerV3)(nil), // 28: types.KubernetesServerV3
(*v11.RelayServer)(nil), // 29: teleport.presence.v1.RelayServer
(*v12.LinuxDesktop)(nil), // 30: teleport.linuxdesktop.v1.LinuxDesktop
}
var file_teleport_legacy_client_proto_inventory_proto_depIdxs = []int32{
6, // 0: proto.UpstreamInventoryOneOf.Hello:type_name -> proto.UpstreamInventoryHello
@@ -2545,16 +2607,17 @@ var file_teleport_legacy_client_proto_inventory_proto_depIdxs = []int32{
27, // 19: proto.InventoryHeartbeat.DatabaseServer:type_name -> types.DatabaseServerV3
28, // 20: proto.InventoryHeartbeat.KubernetesServer:type_name -> types.KubernetesServerV3
29, // 21: proto.InventoryHeartbeat.relay_server:type_name -> teleport.presence.v1.RelayServer
6, // 22: proto.InventoryStatusSummary.Connected:type_name -> proto.UpstreamInventoryHello
19, // 23: proto.InventoryStatusSummary.VersionCounts:type_name -> proto.InventoryStatusSummary.VersionCountsEntry
20, // 24: proto.InventoryStatusSummary.UpgraderCounts:type_name -> proto.InventoryStatusSummary.UpgraderCountsEntry
21, // 25: proto.InventoryStatusSummary.ServiceCounts:type_name -> proto.InventoryStatusSummary.ServiceCountsEntry
1, // 26: proto.UpstreamInventoryStopHeartbeat.kind:type_name -> proto.StopHeartbeatKind
27, // [27:27] is the sub-list for method output_type
27, // [27:27] is the sub-list for method input_type
27, // [27:27] is the sub-list for extension type_name
27, // [27:27] is the sub-list for extension extendee
0, // [0:27] is the sub-list for field type_name
30, // 22: proto.InventoryHeartbeat.linux_desktop:type_name -> teleport.linuxdesktop.v1.LinuxDesktop
6, // 23: proto.InventoryStatusSummary.Connected:type_name -> proto.UpstreamInventoryHello
19, // 24: proto.InventoryStatusSummary.VersionCounts:type_name -> proto.InventoryStatusSummary.VersionCountsEntry
20, // 25: proto.InventoryStatusSummary.UpgraderCounts:type_name -> proto.InventoryStatusSummary.UpgraderCountsEntry
21, // 26: proto.InventoryStatusSummary.ServiceCounts:type_name -> proto.InventoryStatusSummary.ServiceCountsEntry
1, // 27: proto.UpstreamInventoryStopHeartbeat.kind:type_name -> proto.StopHeartbeatKind
28, // [28:28] is the sub-list for method output_type
28, // [28:28] is the sub-list for method input_type
28, // [28:28] is the sub-list for extension type_name
28, // [28:28] is the sub-list for extension extendee
0, // [0:28] is the sub-list for field type_name
}
func init() { file_teleport_legacy_client_proto_inventory_proto_init() }
+51
View File
@@ -0,0 +1,51 @@
// Copyright 2026 Gravitational, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package proto
import (
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
"github.com/gravitational/teleport/api/types"
)
// PackLinuxDesktop packs Linux desktop into its wire format.
func PackLinuxDesktop(desktop *linuxdesktopv1.LinuxDesktop) isPaginatedResource_Resource {
return &PaginatedResource_LinuxDesktop{
LinuxDesktop: &LinuxDesktop{
Kind: desktop.GetKind(),
SubKind: desktop.GetSubKind(),
Version: desktop.GetVersion(),
Metadata: types.Metadata153ToLegacy(desktop.GetMetadata()),
Addr: desktop.GetSpec().GetAddr(),
Hostname: desktop.GetSpec().GetHostname(),
ProxyIds: desktop.GetSpec().GetProxyIds(),
},
}
}
// UnpackLinuxDesktop converts a wire-format LinuxDesktop resource back into an linuxdesktopv1.LinuxDesktop instance.
func UnpackLinuxDesktop(src *LinuxDesktop) types.ResourceWithLabels {
dst := linuxdesktopv1.LinuxDesktop_builder{
Kind: src.Kind,
SubKind: src.SubKind,
Version: src.Version,
Metadata: types.LegacyTo153Metadata(src.Metadata),
Spec: linuxdesktopv1.LinuxDesktopSpec_builder{
Addr: src.Addr,
Hostname: src.Hostname,
ProxyIds: src.ProxyIds,
}.Build(),
}.Build()
return types.ProtoResource153ToLegacy(dst)
}
+130
View File
@@ -0,0 +1,130 @@
// Copyright 2026 Gravitational, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package proto
import (
"testing"
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/testing/protocmp"
headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
"github.com/gravitational/teleport/api/types"
)
func TestPackUnpackLinuxDesktop(t *testing.T) {
t.Parallel()
tests := []struct {
name string
desktop *linuxdesktopv1.LinuxDesktop
}{
{
name: "basic linux desktop",
desktop: linuxdesktopv1.LinuxDesktop_builder{
Kind: types.KindLinuxDesktop,
SubKind: "",
Version: types.V3,
Metadata: &headerv1.Metadata{
Name: "test-linux-desktop",
Labels: map[string]string{
"env": "production",
"region": "us-east-1",
},
},
Spec: linuxdesktopv1.LinuxDesktopSpec_builder{
Addr: "192.168.1.100:22",
Hostname: "linux-host-1",
ProxyIds: []string{"proxy-1", "proxy-2"},
}.Build(),
}.Build(),
},
{
name: "linux desktop with no labels",
desktop: linuxdesktopv1.LinuxDesktop_builder{
Kind: types.KindLinuxDesktop,
Version: types.V3,
Metadata: &headerv1.Metadata{
Name: "minimal-desktop",
},
Spec: linuxdesktopv1.LinuxDesktopSpec_builder{
Addr: "example.com:22",
Hostname: "minimal-host",
}.Build(),
}.Build(),
},
{
name: "linux desktop with empty proxy IDs",
desktop: linuxdesktopv1.LinuxDesktop_builder{
Kind: types.KindLinuxDesktop,
Version: types.V3,
Metadata: &headerv1.Metadata{
Name: "no-proxy-desktop",
Labels: map[string]string{
"test": "label",
},
},
Spec: linuxdesktopv1.LinuxDesktopSpec_builder{
Addr: "172.16.0.10:22",
Hostname: "isolated-host",
ProxyIds: []string{},
}.Build(),
}.Build(),
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// Pack the desktop
packed := PackLinuxDesktop(tt.desktop)
require.NotNil(t, packed)
// Verify packed structure
paginatedResource, ok := packed.(*PaginatedResource_LinuxDesktop)
require.True(t, ok, "packed resource should be *PaginatedResource_LinuxDesktop")
require.NotNil(t, paginatedResource.LinuxDesktop)
// Verify wire format fields
wireDesktop := paginatedResource.LinuxDesktop
require.Equal(t, tt.desktop.GetKind(), wireDesktop.Kind)
require.Equal(t, tt.desktop.GetSubKind(), wireDesktop.SubKind)
require.Equal(t, tt.desktop.GetVersion(), wireDesktop.Version)
require.Equal(t, tt.desktop.GetMetadata().Name, wireDesktop.Metadata.Name)
require.Equal(t, tt.desktop.GetMetadata().Labels, wireDesktop.Metadata.Labels)
require.Equal(t, tt.desktop.GetSpec().GetAddr(), wireDesktop.Addr)
require.Equal(t, tt.desktop.GetSpec().GetHostname(), wireDesktop.Hostname)
require.Equal(t, tt.desktop.GetSpec().GetProxyIds(), wireDesktop.ProxyIds)
// Unpack the desktop
unpacked := UnpackLinuxDesktop(wireDesktop)
require.NotNil(t, unpacked)
// Unwrap to get the original proto type
unwrapper, ok := unpacked.(types.Resource153UnwrapperT[*linuxdesktopv1.LinuxDesktop])
require.True(t, ok, "unpacked resource should be unwrappable")
unpackedDesktop := unwrapper.UnwrapT()
require.NotNil(t, unpackedDesktop)
// Verify round-trip equality using protocmp
// Ignore the Expires field as it's added during metadata conversion
if diff := cmp.Diff(tt.desktop, unpackedDesktop, protocmp.Transform(), protocmp.IgnoreFields(&headerv1.Metadata{}, "expires")); diff != "" {
t.Errorf("round-trip mismatch (-want +got):\n%s", diff)
}
})
}
}
+7
View File
@@ -112,6 +112,9 @@ const (
// desktop service.
KeepAliveWindowsDesktopService = "windows_desktop_service"
// KeepAliveLinuxDesktop is the keep alive type for a Linux desktop.
KeepAliveLinuxDesktop = "linux_desktop"
// KeepAliveKube is the keep alive type for Kubernetes server
KeepAliveKube = "kube"
@@ -416,6 +419,10 @@ const (
// to store allowed Windows logins.
TraitWindowsLogins = "windows_logins"
// TraitLinuxDesktopLogins is the name of the role variable used
// to store allowed Linux desktop logins.
TraitLinuxDesktopLogins = "linux_desktop_logins"
// TraitKubeGroups is the name the role variable used to store
// allowed kubernetes groups
TraitKubeGroups = "kubernetes_groups"
@@ -1035,7 +1035,9 @@ type LockTarget struct {
// JoinToken is the name of the join token used when this identity originally
// joined. This only applies to bot identities, and cannot be used to target
// bots that joined via the `token` join method.
JoinToken string `protobuf:"bytes,10,opt,name=join_token,json=joinToken,proto3" json:"join_token,omitempty"`
JoinToken string `protobuf:"bytes,10,opt,name=join_token,json=joinToken,proto3" json:"join_token,omitempty"`
// LinuxDesktop specifies the name of a Linux desktop.
LinuxDesktop string `protobuf:"bytes,11,opt,name=linux_desktop,json=linuxDesktop,proto3" json:"linux_desktop,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1135,6 +1137,13 @@ func (x *LockTarget) GetJoinToken() string {
return ""
}
func (x *LockTarget) GetLinuxDesktop() string {
if x != nil {
return x.LinuxDesktop
}
return ""
}
func (x *LockTarget) SetUser(v string) {
x.User = v
}
@@ -1175,6 +1184,10 @@ func (x *LockTarget) SetJoinToken(v string) {
x.JoinToken = v
}
func (x *LockTarget) SetLinuxDesktop(v string) {
x.LinuxDesktop = v
}
type LockTarget_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
@@ -1202,6 +1215,8 @@ type LockTarget_builder struct {
// joined. This only applies to bot identities, and cannot be used to target
// bots that joined via the `token` join method.
JoinToken string
// LinuxDesktop specifies the name of a Linux desktop.
LinuxDesktop string
}
func (b0 LockTarget_builder) Build() *LockTarget {
@@ -1218,6 +1233,7 @@ func (b0 LockTarget_builder) Build() *LockTarget {
x.ServerId = b.ServerId
x.BotInstanceId = b.BotInstanceId
x.JoinToken = b.JoinToken
x.LinuxDesktop = b.LinuxDesktop
return m0
}
@@ -1444,7 +1460,7 @@ const file_teleport_decision_v1alpha1_ssh_access_proto_rawDesc = "" +
"\x0fhost_users_info\x18\x18 \x01(\v2).teleport.decision.v1alpha1.HostUsersInfoR\rhostUsersInfo\x12N\n" +
"\rpreconditions\x18\x1a \x03(\v2(.teleport.decision.v1alpha1.PreconditionR\rpreconditionsJ\x04\b\x02\x10\x03J\x04\b\x04\x10\x05J\x04\b\a\x10\bJ\x04\b\f\x10\rJ\x04\b\r\x10\x0eJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11J\x04\b\x11\x10\x12\"Y\n" +
"\x0fSSHAccessDenial\x12F\n" +
"\bmetadata\x18\x01 \x01(\v2*.teleport.decision.v1alpha1.DenialMetadataR\bmetadata\"\xb5\x02\n" +
"\bmetadata\x18\x01 \x01(\v2*.teleport.decision.v1alpha1.DenialMetadataR\bmetadata\"\xda\x02\n" +
"\n" +
"LockTarget\x12\x12\n" +
"\x04user\x18\x01 \x01(\tR\x04user\x12\x12\n" +
@@ -1459,7 +1475,8 @@ const file_teleport_decision_v1alpha1_ssh_access_proto_rawDesc = "" +
"\x0fbot_instance_id\x18\t \x01(\tR\rbotInstanceId\x12\x1d\n" +
"\n" +
"join_token\x18\n" +
" \x01(\tR\tjoinToken\"\x9f\x01\n" +
" \x01(\tR\tjoinToken\x12#\n" +
"\rlinux_desktop\x18\v \x01(\tR\flinuxDesktop\"\x9f\x01\n" +
"\rHostUsersInfo\x12\x16\n" +
"\x06groups\x18\x01 \x03(\tR\x06groups\x12<\n" +
"\x04mode\x18\x02 \x01(\x0e2(.teleport.decision.v1alpha1.HostUserModeR\x04mode\x12\x10\n" +
@@ -984,6 +984,7 @@ type LockTarget struct {
xxx_hidden_ServerId string `protobuf:"bytes,8,opt,name=server_id,json=serverId,proto3"`
xxx_hidden_BotInstanceId string `protobuf:"bytes,9,opt,name=bot_instance_id,json=botInstanceId,proto3"`
xxx_hidden_JoinToken string `protobuf:"bytes,10,opt,name=join_token,json=joinToken,proto3"`
xxx_hidden_LinuxDesktop string `protobuf:"bytes,11,opt,name=linux_desktop,json=linuxDesktop,proto3"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1083,6 +1084,13 @@ func (x *LockTarget) GetJoinToken() string {
return ""
}
func (x *LockTarget) GetLinuxDesktop() string {
if x != nil {
return x.xxx_hidden_LinuxDesktop
}
return ""
}
func (x *LockTarget) SetUser(v string) {
x.xxx_hidden_User = v
}
@@ -1123,6 +1131,10 @@ func (x *LockTarget) SetJoinToken(v string) {
x.xxx_hidden_JoinToken = v
}
func (x *LockTarget) SetLinuxDesktop(v string) {
x.xxx_hidden_LinuxDesktop = v
}
type LockTarget_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
@@ -1150,6 +1162,8 @@ type LockTarget_builder struct {
// joined. This only applies to bot identities, and cannot be used to target
// bots that joined via the `token` join method.
JoinToken string
// LinuxDesktop specifies the name of a Linux desktop.
LinuxDesktop string
}
func (b0 LockTarget_builder) Build() *LockTarget {
@@ -1166,6 +1180,7 @@ func (b0 LockTarget_builder) Build() *LockTarget {
x.xxx_hidden_ServerId = b.ServerId
x.xxx_hidden_BotInstanceId = b.BotInstanceId
x.xxx_hidden_JoinToken = b.JoinToken
x.xxx_hidden_LinuxDesktop = b.LinuxDesktop
return m0
}
@@ -1386,7 +1401,7 @@ const file_teleport_decision_v1alpha1_ssh_access_proto_rawDesc = "" +
"\x0fhost_users_info\x18\x18 \x01(\v2).teleport.decision.v1alpha1.HostUsersInfoR\rhostUsersInfo\x12N\n" +
"\rpreconditions\x18\x1a \x03(\v2(.teleport.decision.v1alpha1.PreconditionR\rpreconditionsJ\x04\b\x02\x10\x03J\x04\b\x04\x10\x05J\x04\b\a\x10\bJ\x04\b\f\x10\rJ\x04\b\r\x10\x0eJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11J\x04\b\x11\x10\x12\"Y\n" +
"\x0fSSHAccessDenial\x12F\n" +
"\bmetadata\x18\x01 \x01(\v2*.teleport.decision.v1alpha1.DenialMetadataR\bmetadata\"\xb5\x02\n" +
"\bmetadata\x18\x01 \x01(\v2*.teleport.decision.v1alpha1.DenialMetadataR\bmetadata\"\xda\x02\n" +
"\n" +
"LockTarget\x12\x12\n" +
"\x04user\x18\x01 \x01(\tR\x04user\x12\x12\n" +
@@ -1401,7 +1416,8 @@ const file_teleport_decision_v1alpha1_ssh_access_proto_rawDesc = "" +
"\x0fbot_instance_id\x18\t \x01(\tR\rbotInstanceId\x12\x1d\n" +
"\n" +
"join_token\x18\n" +
" \x01(\tR\tjoinToken\"\x9f\x01\n" +
" \x01(\tR\tjoinToken\x12#\n" +
"\rlinux_desktop\x18\v \x01(\tR\flinuxDesktop\"\x9f\x01\n" +
"\rHostUsersInfo\x12\x16\n" +
"\x06groups\x18\x01 \x03(\tR\x06groups\x12<\n" +
"\x04mode\x18\x02 \x01(\x0e2(.teleport.decision.v1alpha1.HostUserModeR\x04mode\x12\x10\n" +
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,332 @@
// Copyright 2026 Gravitational, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: teleport/linuxdesktop/v1/linux_desktop.proto
//go:build teleport_protohybrid
package linuxdesktopv1
import (
v1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// LinuxDesktop represents Linux desktop resource.
type LinuxDesktop struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
// Kind is the resource kind.
Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
// SubKind is the resource sub-kind.
SubKind string `protobuf:"bytes,2,opt,name=sub_kind,json=subKind,proto3" json:"sub_kind,omitempty"`
// Version is the resource version.
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
// Metadata contains the resource metadata.
Metadata *v1.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
// Spec is the Linux desktop specification.
Spec *LinuxDesktopSpec `protobuf:"bytes,5,opt,name=spec,proto3" json:"spec,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LinuxDesktop) Reset() {
*x = LinuxDesktop{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LinuxDesktop) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LinuxDesktop) ProtoMessage() {}
func (x *LinuxDesktop) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *LinuxDesktop) GetKind() string {
if x != nil {
return x.Kind
}
return ""
}
func (x *LinuxDesktop) GetSubKind() string {
if x != nil {
return x.SubKind
}
return ""
}
func (x *LinuxDesktop) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *LinuxDesktop) GetMetadata() *v1.Metadata {
if x != nil {
return x.Metadata
}
return nil
}
func (x *LinuxDesktop) GetSpec() *LinuxDesktopSpec {
if x != nil {
return x.Spec
}
return nil
}
func (x *LinuxDesktop) SetKind(v string) {
x.Kind = v
}
func (x *LinuxDesktop) SetSubKind(v string) {
x.SubKind = v
}
func (x *LinuxDesktop) SetVersion(v string) {
x.Version = v
}
func (x *LinuxDesktop) SetMetadata(v *v1.Metadata) {
x.Metadata = v
}
func (x *LinuxDesktop) SetSpec(v *LinuxDesktopSpec) {
x.Spec = v
}
func (x *LinuxDesktop) HasMetadata() bool {
if x == nil {
return false
}
return x.Metadata != nil
}
func (x *LinuxDesktop) HasSpec() bool {
if x == nil {
return false
}
return x.Spec != nil
}
func (x *LinuxDesktop) ClearMetadata() {
x.Metadata = nil
}
func (x *LinuxDesktop) ClearSpec() {
x.Spec = nil
}
type LinuxDesktop_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Kind is the resource kind.
Kind string
// SubKind is the resource sub-kind.
SubKind string
// Version is the resource version.
Version string
// Metadata contains the resource metadata.
Metadata *v1.Metadata
// Spec is the Linux desktop specification.
Spec *LinuxDesktopSpec
}
func (b0 LinuxDesktop_builder) Build() *LinuxDesktop {
m0 := &LinuxDesktop{}
b, x := &b0, m0
_, _ = b, x
x.Kind = b.Kind
x.SubKind = b.SubKind
x.Version = b.Version
x.Metadata = b.Metadata
x.Spec = b.Spec
return m0
}
// LinuxDesktopSpec is the specification of a Linux desktop.
type LinuxDesktopSpec struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
// Address of the server for this desktop.
Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
// Hostname is name of this host
Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
// ProxyIDs is a list of proxy IDs this server is expected to be connected to.
ProxyIds []string `protobuf:"bytes,3,rep,name=proxy_ids,json=proxyIds,proto3" json:"proxy_ids,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LinuxDesktopSpec) Reset() {
*x = LinuxDesktopSpec{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LinuxDesktopSpec) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LinuxDesktopSpec) ProtoMessage() {}
func (x *LinuxDesktopSpec) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *LinuxDesktopSpec) GetAddr() string {
if x != nil {
return x.Addr
}
return ""
}
func (x *LinuxDesktopSpec) GetHostname() string {
if x != nil {
return x.Hostname
}
return ""
}
func (x *LinuxDesktopSpec) GetProxyIds() []string {
if x != nil {
return x.ProxyIds
}
return nil
}
func (x *LinuxDesktopSpec) SetAddr(v string) {
x.Addr = v
}
func (x *LinuxDesktopSpec) SetHostname(v string) {
x.Hostname = v
}
func (x *LinuxDesktopSpec) SetProxyIds(v []string) {
x.ProxyIds = v
}
type LinuxDesktopSpec_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Address of the server for this desktop.
Addr string
// Hostname is name of this host
Hostname string
// ProxyIDs is a list of proxy IDs this server is expected to be connected to.
ProxyIds []string
}
func (b0 LinuxDesktopSpec_builder) Build() *LinuxDesktopSpec {
m0 := &LinuxDesktopSpec{}
b, x := &b0, m0
_, _ = b, x
x.Addr = b.Addr
x.Hostname = b.Hostname
x.ProxyIds = b.ProxyIds
return m0
}
var File_teleport_linuxdesktop_v1_linux_desktop_proto protoreflect.FileDescriptor
const file_teleport_linuxdesktop_v1_linux_desktop_proto_rawDesc = "" +
"\n" +
",teleport/linuxdesktop/v1/linux_desktop.proto\x12\x18teleport.linuxdesktop.v1\x1a!teleport/header/v1/metadata.proto\"\xd1\x01\n" +
"\fLinuxDesktop\x12\x12\n" +
"\x04kind\x18\x01 \x01(\tR\x04kind\x12\x19\n" +
"\bsub_kind\x18\x02 \x01(\tR\asubKind\x12\x18\n" +
"\aversion\x18\x03 \x01(\tR\aversion\x128\n" +
"\bmetadata\x18\x04 \x01(\v2\x1c.teleport.header.v1.MetadataR\bmetadata\x12>\n" +
"\x04spec\x18\x05 \x01(\v2*.teleport.linuxdesktop.v1.LinuxDesktopSpecR\x04spec\"_\n" +
"\x10LinuxDesktopSpec\x12\x12\n" +
"\x04addr\x18\x01 \x01(\tR\x04addr\x12\x1a\n" +
"\bhostname\x18\x02 \x01(\tR\bhostname\x12\x1b\n" +
"\tproxy_ids\x18\x03 \x03(\tR\bproxyIdsB\\ZZgithub.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1;linuxdesktopv1b\x06proto3"
var file_teleport_linuxdesktop_v1_linux_desktop_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_teleport_linuxdesktop_v1_linux_desktop_proto_goTypes = []any{
(*LinuxDesktop)(nil), // 0: teleport.linuxdesktop.v1.LinuxDesktop
(*LinuxDesktopSpec)(nil), // 1: teleport.linuxdesktop.v1.LinuxDesktopSpec
(*v1.Metadata)(nil), // 2: teleport.header.v1.Metadata
}
var file_teleport_linuxdesktop_v1_linux_desktop_proto_depIdxs = []int32{
2, // 0: teleport.linuxdesktop.v1.LinuxDesktop.metadata:type_name -> teleport.header.v1.Metadata
1, // 1: teleport.linuxdesktop.v1.LinuxDesktop.spec:type_name -> teleport.linuxdesktop.v1.LinuxDesktopSpec
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_teleport_linuxdesktop_v1_linux_desktop_proto_init() }
func file_teleport_linuxdesktop_v1_linux_desktop_proto_init() {
if File_teleport_linuxdesktop_v1_linux_desktop_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_teleport_linuxdesktop_v1_linux_desktop_proto_rawDesc), len(file_teleport_linuxdesktop_v1_linux_desktop_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_teleport_linuxdesktop_v1_linux_desktop_proto_goTypes,
DependencyIndexes: file_teleport_linuxdesktop_v1_linux_desktop_proto_depIdxs,
MessageInfos: file_teleport_linuxdesktop_v1_linux_desktop_proto_msgTypes,
}.Build()
File_teleport_linuxdesktop_v1_linux_desktop_proto = out.File
file_teleport_linuxdesktop_v1_linux_desktop_proto_goTypes = nil
file_teleport_linuxdesktop_v1_linux_desktop_proto_depIdxs = nil
}
@@ -0,0 +1,324 @@
// Copyright 2026 Gravitational, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: teleport/linuxdesktop/v1/linux_desktop.proto
//go:build !teleport_protohybrid
package linuxdesktopv1
import (
v1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// LinuxDesktop represents Linux desktop resource.
type LinuxDesktop struct {
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_Kind string `protobuf:"bytes,1,opt,name=kind,proto3"`
xxx_hidden_SubKind string `protobuf:"bytes,2,opt,name=sub_kind,json=subKind,proto3"`
xxx_hidden_Version string `protobuf:"bytes,3,opt,name=version,proto3"`
xxx_hidden_Metadata *v1.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3"`
xxx_hidden_Spec *LinuxDesktopSpec `protobuf:"bytes,5,opt,name=spec,proto3"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LinuxDesktop) Reset() {
*x = LinuxDesktop{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LinuxDesktop) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LinuxDesktop) ProtoMessage() {}
func (x *LinuxDesktop) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *LinuxDesktop) GetKind() string {
if x != nil {
return x.xxx_hidden_Kind
}
return ""
}
func (x *LinuxDesktop) GetSubKind() string {
if x != nil {
return x.xxx_hidden_SubKind
}
return ""
}
func (x *LinuxDesktop) GetVersion() string {
if x != nil {
return x.xxx_hidden_Version
}
return ""
}
func (x *LinuxDesktop) GetMetadata() *v1.Metadata {
if x != nil {
return x.xxx_hidden_Metadata
}
return nil
}
func (x *LinuxDesktop) GetSpec() *LinuxDesktopSpec {
if x != nil {
return x.xxx_hidden_Spec
}
return nil
}
func (x *LinuxDesktop) SetKind(v string) {
x.xxx_hidden_Kind = v
}
func (x *LinuxDesktop) SetSubKind(v string) {
x.xxx_hidden_SubKind = v
}
func (x *LinuxDesktop) SetVersion(v string) {
x.xxx_hidden_Version = v
}
func (x *LinuxDesktop) SetMetadata(v *v1.Metadata) {
x.xxx_hidden_Metadata = v
}
func (x *LinuxDesktop) SetSpec(v *LinuxDesktopSpec) {
x.xxx_hidden_Spec = v
}
func (x *LinuxDesktop) HasMetadata() bool {
if x == nil {
return false
}
return x.xxx_hidden_Metadata != nil
}
func (x *LinuxDesktop) HasSpec() bool {
if x == nil {
return false
}
return x.xxx_hidden_Spec != nil
}
func (x *LinuxDesktop) ClearMetadata() {
x.xxx_hidden_Metadata = nil
}
func (x *LinuxDesktop) ClearSpec() {
x.xxx_hidden_Spec = nil
}
type LinuxDesktop_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Kind is the resource kind.
Kind string
// SubKind is the resource sub-kind.
SubKind string
// Version is the resource version.
Version string
// Metadata contains the resource metadata.
Metadata *v1.Metadata
// Spec is the Linux desktop specification.
Spec *LinuxDesktopSpec
}
func (b0 LinuxDesktop_builder) Build() *LinuxDesktop {
m0 := &LinuxDesktop{}
b, x := &b0, m0
_, _ = b, x
x.xxx_hidden_Kind = b.Kind
x.xxx_hidden_SubKind = b.SubKind
x.xxx_hidden_Version = b.Version
x.xxx_hidden_Metadata = b.Metadata
x.xxx_hidden_Spec = b.Spec
return m0
}
// LinuxDesktopSpec is the specification of a Linux desktop.
type LinuxDesktopSpec struct {
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_Addr string `protobuf:"bytes,1,opt,name=addr,proto3"`
xxx_hidden_Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3"`
xxx_hidden_ProxyIds []string `protobuf:"bytes,3,rep,name=proxy_ids,json=proxyIds,proto3"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LinuxDesktopSpec) Reset() {
*x = LinuxDesktopSpec{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LinuxDesktopSpec) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LinuxDesktopSpec) ProtoMessage() {}
func (x *LinuxDesktopSpec) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *LinuxDesktopSpec) GetAddr() string {
if x != nil {
return x.xxx_hidden_Addr
}
return ""
}
func (x *LinuxDesktopSpec) GetHostname() string {
if x != nil {
return x.xxx_hidden_Hostname
}
return ""
}
func (x *LinuxDesktopSpec) GetProxyIds() []string {
if x != nil {
return x.xxx_hidden_ProxyIds
}
return nil
}
func (x *LinuxDesktopSpec) SetAddr(v string) {
x.xxx_hidden_Addr = v
}
func (x *LinuxDesktopSpec) SetHostname(v string) {
x.xxx_hidden_Hostname = v
}
func (x *LinuxDesktopSpec) SetProxyIds(v []string) {
x.xxx_hidden_ProxyIds = v
}
type LinuxDesktopSpec_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Address of the server for this desktop.
Addr string
// Hostname is name of this host
Hostname string
// ProxyIDs is a list of proxy IDs this server is expected to be connected to.
ProxyIds []string
}
func (b0 LinuxDesktopSpec_builder) Build() *LinuxDesktopSpec {
m0 := &LinuxDesktopSpec{}
b, x := &b0, m0
_, _ = b, x
x.xxx_hidden_Addr = b.Addr
x.xxx_hidden_Hostname = b.Hostname
x.xxx_hidden_ProxyIds = b.ProxyIds
return m0
}
var File_teleport_linuxdesktop_v1_linux_desktop_proto protoreflect.FileDescriptor
const file_teleport_linuxdesktop_v1_linux_desktop_proto_rawDesc = "" +
"\n" +
",teleport/linuxdesktop/v1/linux_desktop.proto\x12\x18teleport.linuxdesktop.v1\x1a!teleport/header/v1/metadata.proto\"\xd1\x01\n" +
"\fLinuxDesktop\x12\x12\n" +
"\x04kind\x18\x01 \x01(\tR\x04kind\x12\x19\n" +
"\bsub_kind\x18\x02 \x01(\tR\asubKind\x12\x18\n" +
"\aversion\x18\x03 \x01(\tR\aversion\x128\n" +
"\bmetadata\x18\x04 \x01(\v2\x1c.teleport.header.v1.MetadataR\bmetadata\x12>\n" +
"\x04spec\x18\x05 \x01(\v2*.teleport.linuxdesktop.v1.LinuxDesktopSpecR\x04spec\"_\n" +
"\x10LinuxDesktopSpec\x12\x12\n" +
"\x04addr\x18\x01 \x01(\tR\x04addr\x12\x1a\n" +
"\bhostname\x18\x02 \x01(\tR\bhostname\x12\x1b\n" +
"\tproxy_ids\x18\x03 \x03(\tR\bproxyIdsB\\ZZgithub.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1;linuxdesktopv1b\x06proto3"
var file_teleport_linuxdesktop_v1_linux_desktop_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_teleport_linuxdesktop_v1_linux_desktop_proto_goTypes = []any{
(*LinuxDesktop)(nil), // 0: teleport.linuxdesktop.v1.LinuxDesktop
(*LinuxDesktopSpec)(nil), // 1: teleport.linuxdesktop.v1.LinuxDesktopSpec
(*v1.Metadata)(nil), // 2: teleport.header.v1.Metadata
}
var file_teleport_linuxdesktop_v1_linux_desktop_proto_depIdxs = []int32{
2, // 0: teleport.linuxdesktop.v1.LinuxDesktop.metadata:type_name -> teleport.header.v1.Metadata
1, // 1: teleport.linuxdesktop.v1.LinuxDesktop.spec:type_name -> teleport.linuxdesktop.v1.LinuxDesktopSpec
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_teleport_linuxdesktop_v1_linux_desktop_proto_init() }
func file_teleport_linuxdesktop_v1_linux_desktop_proto_init() {
if File_teleport_linuxdesktop_v1_linux_desktop_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_teleport_linuxdesktop_v1_linux_desktop_proto_rawDesc), len(file_teleport_linuxdesktop_v1_linux_desktop_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_teleport_linuxdesktop_v1_linux_desktop_proto_goTypes,
DependencyIndexes: file_teleport_linuxdesktop_v1_linux_desktop_proto_depIdxs,
MessageInfos: file_teleport_linuxdesktop_v1_linux_desktop_proto_msgTypes,
}.Build()
File_teleport_linuxdesktop_v1_linux_desktop_proto = out.File
file_teleport_linuxdesktop_v1_linux_desktop_proto_goTypes = nil
file_teleport_linuxdesktop_v1_linux_desktop_proto_depIdxs = nil
}
@@ -0,0 +1,342 @@
// Copyright 2026 Gravitational, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc (unknown)
// source: teleport/linuxdesktop/v1/linux_desktop_service.proto
package linuxdesktopv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
LinuxDesktopService_CreateLinuxDesktop_FullMethodName = "/teleport.linuxdesktop.v1.LinuxDesktopService/CreateLinuxDesktop"
LinuxDesktopService_UpdateLinuxDesktop_FullMethodName = "/teleport.linuxdesktop.v1.LinuxDesktopService/UpdateLinuxDesktop"
LinuxDesktopService_UpsertLinuxDesktop_FullMethodName = "/teleport.linuxdesktop.v1.LinuxDesktopService/UpsertLinuxDesktop"
LinuxDesktopService_GetLinuxDesktop_FullMethodName = "/teleport.linuxdesktop.v1.LinuxDesktopService/GetLinuxDesktop"
LinuxDesktopService_ListLinuxDesktops_FullMethodName = "/teleport.linuxdesktop.v1.LinuxDesktopService/ListLinuxDesktops"
LinuxDesktopService_DeleteLinuxDesktop_FullMethodName = "/teleport.linuxdesktop.v1.LinuxDesktopService/DeleteLinuxDesktop"
)
// LinuxDesktopServiceClient is the client API for LinuxDesktopService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// LinuxDesktopService is a service to fetch information about Linux desktops.
type LinuxDesktopServiceClient interface {
// Creates a new LinuxDesktop resource in the backend.
CreateLinuxDesktop(ctx context.Context, in *CreateLinuxDesktopRequest, opts ...grpc.CallOption) (*LinuxDesktop, error)
// Updates an existing LinuxDesktop in the backend.
UpdateLinuxDesktop(ctx context.Context, in *UpdateLinuxDesktopRequest, opts ...grpc.CallOption) (*LinuxDesktop, error)
// Updates an existing LinuxDesktop in the backend or creates one if needed.
UpsertLinuxDesktop(ctx context.Context, in *UpsertLinuxDesktopRequest, opts ...grpc.CallOption) (*LinuxDesktop, error)
// Returns a single LinuxDesktop matching the request
GetLinuxDesktop(ctx context.Context, in *GetLinuxDesktopRequest, opts ...grpc.CallOption) (*LinuxDesktop, error)
// Returns a page of LinuxDesktop and the token to find the next page of items.
ListLinuxDesktops(ctx context.Context, in *ListLinuxDesktopsRequest, opts ...grpc.CallOption) (*ListLinuxDesktopsResponse, error)
// Remove a matching LinuxDesktop resource
DeleteLinuxDesktop(ctx context.Context, in *DeleteLinuxDesktopRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type linuxDesktopServiceClient struct {
cc grpc.ClientConnInterface
}
func NewLinuxDesktopServiceClient(cc grpc.ClientConnInterface) LinuxDesktopServiceClient {
return &linuxDesktopServiceClient{cc}
}
func (c *linuxDesktopServiceClient) CreateLinuxDesktop(ctx context.Context, in *CreateLinuxDesktopRequest, opts ...grpc.CallOption) (*LinuxDesktop, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(LinuxDesktop)
err := c.cc.Invoke(ctx, LinuxDesktopService_CreateLinuxDesktop_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *linuxDesktopServiceClient) UpdateLinuxDesktop(ctx context.Context, in *UpdateLinuxDesktopRequest, opts ...grpc.CallOption) (*LinuxDesktop, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(LinuxDesktop)
err := c.cc.Invoke(ctx, LinuxDesktopService_UpdateLinuxDesktop_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *linuxDesktopServiceClient) UpsertLinuxDesktop(ctx context.Context, in *UpsertLinuxDesktopRequest, opts ...grpc.CallOption) (*LinuxDesktop, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(LinuxDesktop)
err := c.cc.Invoke(ctx, LinuxDesktopService_UpsertLinuxDesktop_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *linuxDesktopServiceClient) GetLinuxDesktop(ctx context.Context, in *GetLinuxDesktopRequest, opts ...grpc.CallOption) (*LinuxDesktop, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(LinuxDesktop)
err := c.cc.Invoke(ctx, LinuxDesktopService_GetLinuxDesktop_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *linuxDesktopServiceClient) ListLinuxDesktops(ctx context.Context, in *ListLinuxDesktopsRequest, opts ...grpc.CallOption) (*ListLinuxDesktopsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListLinuxDesktopsResponse)
err := c.cc.Invoke(ctx, LinuxDesktopService_ListLinuxDesktops_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *linuxDesktopServiceClient) DeleteLinuxDesktop(ctx context.Context, in *DeleteLinuxDesktopRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, LinuxDesktopService_DeleteLinuxDesktop_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// LinuxDesktopServiceServer is the server API for LinuxDesktopService service.
// All implementations must embed UnimplementedLinuxDesktopServiceServer
// for forward compatibility.
//
// LinuxDesktopService is a service to fetch information about Linux desktops.
type LinuxDesktopServiceServer interface {
// Creates a new LinuxDesktop resource in the backend.
CreateLinuxDesktop(context.Context, *CreateLinuxDesktopRequest) (*LinuxDesktop, error)
// Updates an existing LinuxDesktop in the backend.
UpdateLinuxDesktop(context.Context, *UpdateLinuxDesktopRequest) (*LinuxDesktop, error)
// Updates an existing LinuxDesktop in the backend or creates one if needed.
UpsertLinuxDesktop(context.Context, *UpsertLinuxDesktopRequest) (*LinuxDesktop, error)
// Returns a single LinuxDesktop matching the request
GetLinuxDesktop(context.Context, *GetLinuxDesktopRequest) (*LinuxDesktop, error)
// Returns a page of LinuxDesktop and the token to find the next page of items.
ListLinuxDesktops(context.Context, *ListLinuxDesktopsRequest) (*ListLinuxDesktopsResponse, error)
// Remove a matching LinuxDesktop resource
DeleteLinuxDesktop(context.Context, *DeleteLinuxDesktopRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedLinuxDesktopServiceServer()
}
// UnimplementedLinuxDesktopServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedLinuxDesktopServiceServer struct{}
func (UnimplementedLinuxDesktopServiceServer) CreateLinuxDesktop(context.Context, *CreateLinuxDesktopRequest) (*LinuxDesktop, error) {
return nil, status.Error(codes.Unimplemented, "method CreateLinuxDesktop not implemented")
}
func (UnimplementedLinuxDesktopServiceServer) UpdateLinuxDesktop(context.Context, *UpdateLinuxDesktopRequest) (*LinuxDesktop, error) {
return nil, status.Error(codes.Unimplemented, "method UpdateLinuxDesktop not implemented")
}
func (UnimplementedLinuxDesktopServiceServer) UpsertLinuxDesktop(context.Context, *UpsertLinuxDesktopRequest) (*LinuxDesktop, error) {
return nil, status.Error(codes.Unimplemented, "method UpsertLinuxDesktop not implemented")
}
func (UnimplementedLinuxDesktopServiceServer) GetLinuxDesktop(context.Context, *GetLinuxDesktopRequest) (*LinuxDesktop, error) {
return nil, status.Error(codes.Unimplemented, "method GetLinuxDesktop not implemented")
}
func (UnimplementedLinuxDesktopServiceServer) ListLinuxDesktops(context.Context, *ListLinuxDesktopsRequest) (*ListLinuxDesktopsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListLinuxDesktops not implemented")
}
func (UnimplementedLinuxDesktopServiceServer) DeleteLinuxDesktop(context.Context, *DeleteLinuxDesktopRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method DeleteLinuxDesktop not implemented")
}
func (UnimplementedLinuxDesktopServiceServer) mustEmbedUnimplementedLinuxDesktopServiceServer() {}
func (UnimplementedLinuxDesktopServiceServer) testEmbeddedByValue() {}
// UnsafeLinuxDesktopServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to LinuxDesktopServiceServer will
// result in compilation errors.
type UnsafeLinuxDesktopServiceServer interface {
mustEmbedUnimplementedLinuxDesktopServiceServer()
}
func RegisterLinuxDesktopServiceServer(s grpc.ServiceRegistrar, srv LinuxDesktopServiceServer) {
// If the following call panics, it indicates UnimplementedLinuxDesktopServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&LinuxDesktopService_ServiceDesc, srv)
}
func _LinuxDesktopService_CreateLinuxDesktop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateLinuxDesktopRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LinuxDesktopServiceServer).CreateLinuxDesktop(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LinuxDesktopService_CreateLinuxDesktop_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LinuxDesktopServiceServer).CreateLinuxDesktop(ctx, req.(*CreateLinuxDesktopRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LinuxDesktopService_UpdateLinuxDesktop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateLinuxDesktopRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LinuxDesktopServiceServer).UpdateLinuxDesktop(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LinuxDesktopService_UpdateLinuxDesktop_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LinuxDesktopServiceServer).UpdateLinuxDesktop(ctx, req.(*UpdateLinuxDesktopRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LinuxDesktopService_UpsertLinuxDesktop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpsertLinuxDesktopRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LinuxDesktopServiceServer).UpsertLinuxDesktop(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LinuxDesktopService_UpsertLinuxDesktop_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LinuxDesktopServiceServer).UpsertLinuxDesktop(ctx, req.(*UpsertLinuxDesktopRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LinuxDesktopService_GetLinuxDesktop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLinuxDesktopRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LinuxDesktopServiceServer).GetLinuxDesktop(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LinuxDesktopService_GetLinuxDesktop_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LinuxDesktopServiceServer).GetLinuxDesktop(ctx, req.(*GetLinuxDesktopRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LinuxDesktopService_ListLinuxDesktops_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListLinuxDesktopsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LinuxDesktopServiceServer).ListLinuxDesktops(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LinuxDesktopService_ListLinuxDesktops_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LinuxDesktopServiceServer).ListLinuxDesktops(ctx, req.(*ListLinuxDesktopsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LinuxDesktopService_DeleteLinuxDesktop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteLinuxDesktopRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LinuxDesktopServiceServer).DeleteLinuxDesktop(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LinuxDesktopService_DeleteLinuxDesktop_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LinuxDesktopServiceServer).DeleteLinuxDesktop(ctx, req.(*DeleteLinuxDesktopRequest))
}
return interceptor(ctx, in, info, handler)
}
// LinuxDesktopService_ServiceDesc is the grpc.ServiceDesc for LinuxDesktopService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var LinuxDesktopService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "teleport.linuxdesktop.v1.LinuxDesktopService",
HandlerType: (*LinuxDesktopServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateLinuxDesktop",
Handler: _LinuxDesktopService_CreateLinuxDesktop_Handler,
},
{
MethodName: "UpdateLinuxDesktop",
Handler: _LinuxDesktopService_UpdateLinuxDesktop_Handler,
},
{
MethodName: "UpsertLinuxDesktop",
Handler: _LinuxDesktopService_UpsertLinuxDesktop_Handler,
},
{
MethodName: "GetLinuxDesktop",
Handler: _LinuxDesktopService_GetLinuxDesktop_Handler,
},
{
MethodName: "ListLinuxDesktops",
Handler: _LinuxDesktopService_ListLinuxDesktops_Handler,
},
{
MethodName: "DeleteLinuxDesktop",
Handler: _LinuxDesktopService_DeleteLinuxDesktop_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "teleport/linuxdesktop/v1/linux_desktop_service.proto",
}
@@ -0,0 +1,618 @@
// Copyright 2026 Gravitational, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: teleport/linuxdesktop/v1/linux_desktop_service.proto
//go:build teleport_protohybrid
package linuxdesktopv1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// CreateLinuxDesktopRequest is request for CreateLinuxDesktop method
type CreateLinuxDesktopRequest struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
// The desired LinuxDesktop to be created.
LinuxDesktop *LinuxDesktop `protobuf:"bytes,1,opt,name=linux_desktop,json=linuxDesktop,proto3" json:"linux_desktop,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateLinuxDesktopRequest) Reset() {
*x = CreateLinuxDesktopRequest{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateLinuxDesktopRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateLinuxDesktopRequest) ProtoMessage() {}
func (x *CreateLinuxDesktopRequest) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *CreateLinuxDesktopRequest) GetLinuxDesktop() *LinuxDesktop {
if x != nil {
return x.LinuxDesktop
}
return nil
}
func (x *CreateLinuxDesktopRequest) SetLinuxDesktop(v *LinuxDesktop) {
x.LinuxDesktop = v
}
func (x *CreateLinuxDesktopRequest) HasLinuxDesktop() bool {
if x == nil {
return false
}
return x.LinuxDesktop != nil
}
func (x *CreateLinuxDesktopRequest) ClearLinuxDesktop() {
x.LinuxDesktop = nil
}
type CreateLinuxDesktopRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// The desired LinuxDesktop to be created.
LinuxDesktop *LinuxDesktop
}
func (b0 CreateLinuxDesktopRequest_builder) Build() *CreateLinuxDesktopRequest {
m0 := &CreateLinuxDesktopRequest{}
b, x := &b0, m0
_, _ = b, x
x.LinuxDesktop = b.LinuxDesktop
return m0
}
// UpdateLinuxDesktopRequest is request for UpdateLinuxDesktop method
type UpdateLinuxDesktopRequest struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
// The full LinuxDesktop resource to update in the backend.
LinuxDesktop *LinuxDesktop `protobuf:"bytes,1,opt,name=linux_desktop,json=linuxDesktop,proto3" json:"linux_desktop,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UpdateLinuxDesktopRequest) Reset() {
*x = UpdateLinuxDesktopRequest{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpdateLinuxDesktopRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateLinuxDesktopRequest) ProtoMessage() {}
func (x *UpdateLinuxDesktopRequest) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *UpdateLinuxDesktopRequest) GetLinuxDesktop() *LinuxDesktop {
if x != nil {
return x.LinuxDesktop
}
return nil
}
func (x *UpdateLinuxDesktopRequest) SetLinuxDesktop(v *LinuxDesktop) {
x.LinuxDesktop = v
}
func (x *UpdateLinuxDesktopRequest) HasLinuxDesktop() bool {
if x == nil {
return false
}
return x.LinuxDesktop != nil
}
func (x *UpdateLinuxDesktopRequest) ClearLinuxDesktop() {
x.LinuxDesktop = nil
}
type UpdateLinuxDesktopRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// The full LinuxDesktop resource to update in the backend.
LinuxDesktop *LinuxDesktop
}
func (b0 UpdateLinuxDesktopRequest_builder) Build() *UpdateLinuxDesktopRequest {
m0 := &UpdateLinuxDesktopRequest{}
b, x := &b0, m0
_, _ = b, x
x.LinuxDesktop = b.LinuxDesktop
return m0
}
// UpsertLinuxDesktopRequest is request for UpsertLinuxDesktop method
type UpsertLinuxDesktopRequest struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
// The full LinuxDesktop resource to create or update in the backend.
LinuxDesktop *LinuxDesktop `protobuf:"bytes,1,opt,name=linux_desktop,json=linuxDesktop,proto3" json:"linux_desktop,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UpsertLinuxDesktopRequest) Reset() {
*x = UpsertLinuxDesktopRequest{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpsertLinuxDesktopRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpsertLinuxDesktopRequest) ProtoMessage() {}
func (x *UpsertLinuxDesktopRequest) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *UpsertLinuxDesktopRequest) GetLinuxDesktop() *LinuxDesktop {
if x != nil {
return x.LinuxDesktop
}
return nil
}
func (x *UpsertLinuxDesktopRequest) SetLinuxDesktop(v *LinuxDesktop) {
x.LinuxDesktop = v
}
func (x *UpsertLinuxDesktopRequest) HasLinuxDesktop() bool {
if x == nil {
return false
}
return x.LinuxDesktop != nil
}
func (x *UpsertLinuxDesktopRequest) ClearLinuxDesktop() {
x.LinuxDesktop = nil
}
type UpsertLinuxDesktopRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// The full LinuxDesktop resource to create or update in the backend.
LinuxDesktop *LinuxDesktop
}
func (b0 UpsertLinuxDesktopRequest_builder) Build() *UpsertLinuxDesktopRequest {
m0 := &UpsertLinuxDesktopRequest{}
b, x := &b0, m0
_, _ = b, x
x.LinuxDesktop = b.LinuxDesktop
return m0
}
// GetLinuxDesktopRequest is request for GetLinuxDesktop method
type GetLinuxDesktopRequest struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
// Name of the LinuxDesktop to retrieve
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetLinuxDesktopRequest) Reset() {
*x = GetLinuxDesktopRequest{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetLinuxDesktopRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetLinuxDesktopRequest) ProtoMessage() {}
func (x *GetLinuxDesktopRequest) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *GetLinuxDesktopRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *GetLinuxDesktopRequest) SetName(v string) {
x.Name = v
}
type GetLinuxDesktopRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Name of the LinuxDesktop to retrieve
Name string
}
func (b0 GetLinuxDesktopRequest_builder) Build() *GetLinuxDesktopRequest {
m0 := &GetLinuxDesktopRequest{}
b, x := &b0, m0
_, _ = b, x
x.Name = b.Name
return m0
}
// ListLinuxDesktopRequest is request for ListLinuxDesktops method
type ListLinuxDesktopsRequest struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
// The maximum number of items to return.
// The server may impose a different page size at its discretion.
PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// The next_page_token value returned from a previous List request, if any.
PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ListLinuxDesktopsRequest) Reset() {
*x = ListLinuxDesktopsRequest{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ListLinuxDesktopsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListLinuxDesktopsRequest) ProtoMessage() {}
func (x *ListLinuxDesktopsRequest) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *ListLinuxDesktopsRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *ListLinuxDesktopsRequest) GetPageToken() string {
if x != nil {
return x.PageToken
}
return ""
}
func (x *ListLinuxDesktopsRequest) SetPageSize(v int32) {
x.PageSize = v
}
func (x *ListLinuxDesktopsRequest) SetPageToken(v string) {
x.PageToken = v
}
type ListLinuxDesktopsRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// The maximum number of items to return.
// The server may impose a different page size at its discretion.
PageSize int32
// The next_page_token value returned from a previous List request, if any.
PageToken string
}
func (b0 ListLinuxDesktopsRequest_builder) Build() *ListLinuxDesktopsRequest {
m0 := &ListLinuxDesktopsRequest{}
b, x := &b0, m0
_, _ = b, x
x.PageSize = b.PageSize
x.PageToken = b.PageToken
return m0
}
// ListLinuxDesktopsResponse is response of ListLinuxDesktop method
type ListLinuxDesktopsResponse struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
// The page of LinuxDesktop that matched the request.
LinuxDesktops []*LinuxDesktop `protobuf:"bytes,1,rep,name=linux_desktops,json=linuxDesktops,proto3" json:"linux_desktops,omitempty"`
// Token to retrieve the next page of results, or empty if there are no
// more results in the list.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ListLinuxDesktopsResponse) Reset() {
*x = ListLinuxDesktopsResponse{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ListLinuxDesktopsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListLinuxDesktopsResponse) ProtoMessage() {}
func (x *ListLinuxDesktopsResponse) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *ListLinuxDesktopsResponse) GetLinuxDesktops() []*LinuxDesktop {
if x != nil {
return x.LinuxDesktops
}
return nil
}
func (x *ListLinuxDesktopsResponse) GetNextPageToken() string {
if x != nil {
return x.NextPageToken
}
return ""
}
func (x *ListLinuxDesktopsResponse) SetLinuxDesktops(v []*LinuxDesktop) {
x.LinuxDesktops = v
}
func (x *ListLinuxDesktopsResponse) SetNextPageToken(v string) {
x.NextPageToken = v
}
type ListLinuxDesktopsResponse_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// The page of LinuxDesktop that matched the request.
LinuxDesktops []*LinuxDesktop
// Token to retrieve the next page of results, or empty if there are no
// more results in the list.
NextPageToken string
}
func (b0 ListLinuxDesktopsResponse_builder) Build() *ListLinuxDesktopsResponse {
m0 := &ListLinuxDesktopsResponse{}
b, x := &b0, m0
_, _ = b, x
x.LinuxDesktops = b.LinuxDesktops
x.NextPageToken = b.NextPageToken
return m0
}
// DeleteLinuxDesktopRequest is request for DeleteLinuxDesktop method
type DeleteLinuxDesktopRequest struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
// Name of the LinuxDesktop to remove.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeleteLinuxDesktopRequest) Reset() {
*x = DeleteLinuxDesktopRequest{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeleteLinuxDesktopRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteLinuxDesktopRequest) ProtoMessage() {}
func (x *DeleteLinuxDesktopRequest) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *DeleteLinuxDesktopRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *DeleteLinuxDesktopRequest) SetName(v string) {
x.Name = v
}
type DeleteLinuxDesktopRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Name of the LinuxDesktop to remove.
Name string
}
func (b0 DeleteLinuxDesktopRequest_builder) Build() *DeleteLinuxDesktopRequest {
m0 := &DeleteLinuxDesktopRequest{}
b, x := &b0, m0
_, _ = b, x
x.Name = b.Name
return m0
}
var File_teleport_linuxdesktop_v1_linux_desktop_service_proto protoreflect.FileDescriptor
const file_teleport_linuxdesktop_v1_linux_desktop_service_proto_rawDesc = "" +
"\n" +
"4teleport/linuxdesktop/v1/linux_desktop_service.proto\x12\x18teleport.linuxdesktop.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a,teleport/linuxdesktop/v1/linux_desktop.proto\"h\n" +
"\x19CreateLinuxDesktopRequest\x12K\n" +
"\rlinux_desktop\x18\x01 \x01(\v2&.teleport.linuxdesktop.v1.LinuxDesktopR\flinuxDesktop\"h\n" +
"\x19UpdateLinuxDesktopRequest\x12K\n" +
"\rlinux_desktop\x18\x01 \x01(\v2&.teleport.linuxdesktop.v1.LinuxDesktopR\flinuxDesktop\"h\n" +
"\x19UpsertLinuxDesktopRequest\x12K\n" +
"\rlinux_desktop\x18\x01 \x01(\v2&.teleport.linuxdesktop.v1.LinuxDesktopR\flinuxDesktop\",\n" +
"\x16GetLinuxDesktopRequest\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\"V\n" +
"\x18ListLinuxDesktopsRequest\x12\x1b\n" +
"\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" +
"\n" +
"page_token\x18\x02 \x01(\tR\tpageToken\"\x92\x01\n" +
"\x19ListLinuxDesktopsResponse\x12M\n" +
"\x0elinux_desktops\x18\x01 \x03(\v2&.teleport.linuxdesktop.v1.LinuxDesktopR\rlinuxDesktops\x12&\n" +
"\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"/\n" +
"\x19DeleteLinuxDesktopRequest\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name2\xbc\x05\n" +
"\x13LinuxDesktopService\x12q\n" +
"\x12CreateLinuxDesktop\x123.teleport.linuxdesktop.v1.CreateLinuxDesktopRequest\x1a&.teleport.linuxdesktop.v1.LinuxDesktop\x12q\n" +
"\x12UpdateLinuxDesktop\x123.teleport.linuxdesktop.v1.UpdateLinuxDesktopRequest\x1a&.teleport.linuxdesktop.v1.LinuxDesktop\x12q\n" +
"\x12UpsertLinuxDesktop\x123.teleport.linuxdesktop.v1.UpsertLinuxDesktopRequest\x1a&.teleport.linuxdesktop.v1.LinuxDesktop\x12k\n" +
"\x0fGetLinuxDesktop\x120.teleport.linuxdesktop.v1.GetLinuxDesktopRequest\x1a&.teleport.linuxdesktop.v1.LinuxDesktop\x12|\n" +
"\x11ListLinuxDesktops\x122.teleport.linuxdesktop.v1.ListLinuxDesktopsRequest\x1a3.teleport.linuxdesktop.v1.ListLinuxDesktopsResponse\x12a\n" +
"\x12DeleteLinuxDesktop\x123.teleport.linuxdesktop.v1.DeleteLinuxDesktopRequest\x1a\x16.google.protobuf.EmptyB\\ZZgithub.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1;linuxdesktopv1b\x06proto3"
var file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_teleport_linuxdesktop_v1_linux_desktop_service_proto_goTypes = []any{
(*CreateLinuxDesktopRequest)(nil), // 0: teleport.linuxdesktop.v1.CreateLinuxDesktopRequest
(*UpdateLinuxDesktopRequest)(nil), // 1: teleport.linuxdesktop.v1.UpdateLinuxDesktopRequest
(*UpsertLinuxDesktopRequest)(nil), // 2: teleport.linuxdesktop.v1.UpsertLinuxDesktopRequest
(*GetLinuxDesktopRequest)(nil), // 3: teleport.linuxdesktop.v1.GetLinuxDesktopRequest
(*ListLinuxDesktopsRequest)(nil), // 4: teleport.linuxdesktop.v1.ListLinuxDesktopsRequest
(*ListLinuxDesktopsResponse)(nil), // 5: teleport.linuxdesktop.v1.ListLinuxDesktopsResponse
(*DeleteLinuxDesktopRequest)(nil), // 6: teleport.linuxdesktop.v1.DeleteLinuxDesktopRequest
(*LinuxDesktop)(nil), // 7: teleport.linuxdesktop.v1.LinuxDesktop
(*emptypb.Empty)(nil), // 8: google.protobuf.Empty
}
var file_teleport_linuxdesktop_v1_linux_desktop_service_proto_depIdxs = []int32{
7, // 0: teleport.linuxdesktop.v1.CreateLinuxDesktopRequest.linux_desktop:type_name -> teleport.linuxdesktop.v1.LinuxDesktop
7, // 1: teleport.linuxdesktop.v1.UpdateLinuxDesktopRequest.linux_desktop:type_name -> teleport.linuxdesktop.v1.LinuxDesktop
7, // 2: teleport.linuxdesktop.v1.UpsertLinuxDesktopRequest.linux_desktop:type_name -> teleport.linuxdesktop.v1.LinuxDesktop
7, // 3: teleport.linuxdesktop.v1.ListLinuxDesktopsResponse.linux_desktops:type_name -> teleport.linuxdesktop.v1.LinuxDesktop
0, // 4: teleport.linuxdesktop.v1.LinuxDesktopService.CreateLinuxDesktop:input_type -> teleport.linuxdesktop.v1.CreateLinuxDesktopRequest
1, // 5: teleport.linuxdesktop.v1.LinuxDesktopService.UpdateLinuxDesktop:input_type -> teleport.linuxdesktop.v1.UpdateLinuxDesktopRequest
2, // 6: teleport.linuxdesktop.v1.LinuxDesktopService.UpsertLinuxDesktop:input_type -> teleport.linuxdesktop.v1.UpsertLinuxDesktopRequest
3, // 7: teleport.linuxdesktop.v1.LinuxDesktopService.GetLinuxDesktop:input_type -> teleport.linuxdesktop.v1.GetLinuxDesktopRequest
4, // 8: teleport.linuxdesktop.v1.LinuxDesktopService.ListLinuxDesktops:input_type -> teleport.linuxdesktop.v1.ListLinuxDesktopsRequest
6, // 9: teleport.linuxdesktop.v1.LinuxDesktopService.DeleteLinuxDesktop:input_type -> teleport.linuxdesktop.v1.DeleteLinuxDesktopRequest
7, // 10: teleport.linuxdesktop.v1.LinuxDesktopService.CreateLinuxDesktop:output_type -> teleport.linuxdesktop.v1.LinuxDesktop
7, // 11: teleport.linuxdesktop.v1.LinuxDesktopService.UpdateLinuxDesktop:output_type -> teleport.linuxdesktop.v1.LinuxDesktop
7, // 12: teleport.linuxdesktop.v1.LinuxDesktopService.UpsertLinuxDesktop:output_type -> teleport.linuxdesktop.v1.LinuxDesktop
7, // 13: teleport.linuxdesktop.v1.LinuxDesktopService.GetLinuxDesktop:output_type -> teleport.linuxdesktop.v1.LinuxDesktop
5, // 14: teleport.linuxdesktop.v1.LinuxDesktopService.ListLinuxDesktops:output_type -> teleport.linuxdesktop.v1.ListLinuxDesktopsResponse
8, // 15: teleport.linuxdesktop.v1.LinuxDesktopService.DeleteLinuxDesktop:output_type -> google.protobuf.Empty
10, // [10:16] is the sub-list for method output_type
4, // [4:10] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_teleport_linuxdesktop_v1_linux_desktop_service_proto_init() }
func file_teleport_linuxdesktop_v1_linux_desktop_service_proto_init() {
if File_teleport_linuxdesktop_v1_linux_desktop_service_proto != nil {
return
}
file_teleport_linuxdesktop_v1_linux_desktop_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_teleport_linuxdesktop_v1_linux_desktop_service_proto_rawDesc), len(file_teleport_linuxdesktop_v1_linux_desktop_service_proto_rawDesc)),
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_teleport_linuxdesktop_v1_linux_desktop_service_proto_goTypes,
DependencyIndexes: file_teleport_linuxdesktop_v1_linux_desktop_service_proto_depIdxs,
MessageInfos: file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes,
}.Build()
File_teleport_linuxdesktop_v1_linux_desktop_service_proto = out.File
file_teleport_linuxdesktop_v1_linux_desktop_service_proto_goTypes = nil
file_teleport_linuxdesktop_v1_linux_desktop_service_proto_depIdxs = nil
}
@@ -0,0 +1,609 @@
// Copyright 2026 Gravitational, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: teleport/linuxdesktop/v1/linux_desktop_service.proto
//go:build !teleport_protohybrid
package linuxdesktopv1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// CreateLinuxDesktopRequest is request for CreateLinuxDesktop method
type CreateLinuxDesktopRequest struct {
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_LinuxDesktop *LinuxDesktop `protobuf:"bytes,1,opt,name=linux_desktop,json=linuxDesktop,proto3"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateLinuxDesktopRequest) Reset() {
*x = CreateLinuxDesktopRequest{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateLinuxDesktopRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateLinuxDesktopRequest) ProtoMessage() {}
func (x *CreateLinuxDesktopRequest) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *CreateLinuxDesktopRequest) GetLinuxDesktop() *LinuxDesktop {
if x != nil {
return x.xxx_hidden_LinuxDesktop
}
return nil
}
func (x *CreateLinuxDesktopRequest) SetLinuxDesktop(v *LinuxDesktop) {
x.xxx_hidden_LinuxDesktop = v
}
func (x *CreateLinuxDesktopRequest) HasLinuxDesktop() bool {
if x == nil {
return false
}
return x.xxx_hidden_LinuxDesktop != nil
}
func (x *CreateLinuxDesktopRequest) ClearLinuxDesktop() {
x.xxx_hidden_LinuxDesktop = nil
}
type CreateLinuxDesktopRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// The desired LinuxDesktop to be created.
LinuxDesktop *LinuxDesktop
}
func (b0 CreateLinuxDesktopRequest_builder) Build() *CreateLinuxDesktopRequest {
m0 := &CreateLinuxDesktopRequest{}
b, x := &b0, m0
_, _ = b, x
x.xxx_hidden_LinuxDesktop = b.LinuxDesktop
return m0
}
// UpdateLinuxDesktopRequest is request for UpdateLinuxDesktop method
type UpdateLinuxDesktopRequest struct {
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_LinuxDesktop *LinuxDesktop `protobuf:"bytes,1,opt,name=linux_desktop,json=linuxDesktop,proto3"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UpdateLinuxDesktopRequest) Reset() {
*x = UpdateLinuxDesktopRequest{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpdateLinuxDesktopRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateLinuxDesktopRequest) ProtoMessage() {}
func (x *UpdateLinuxDesktopRequest) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *UpdateLinuxDesktopRequest) GetLinuxDesktop() *LinuxDesktop {
if x != nil {
return x.xxx_hidden_LinuxDesktop
}
return nil
}
func (x *UpdateLinuxDesktopRequest) SetLinuxDesktop(v *LinuxDesktop) {
x.xxx_hidden_LinuxDesktop = v
}
func (x *UpdateLinuxDesktopRequest) HasLinuxDesktop() bool {
if x == nil {
return false
}
return x.xxx_hidden_LinuxDesktop != nil
}
func (x *UpdateLinuxDesktopRequest) ClearLinuxDesktop() {
x.xxx_hidden_LinuxDesktop = nil
}
type UpdateLinuxDesktopRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// The full LinuxDesktop resource to update in the backend.
LinuxDesktop *LinuxDesktop
}
func (b0 UpdateLinuxDesktopRequest_builder) Build() *UpdateLinuxDesktopRequest {
m0 := &UpdateLinuxDesktopRequest{}
b, x := &b0, m0
_, _ = b, x
x.xxx_hidden_LinuxDesktop = b.LinuxDesktop
return m0
}
// UpsertLinuxDesktopRequest is request for UpsertLinuxDesktop method
type UpsertLinuxDesktopRequest struct {
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_LinuxDesktop *LinuxDesktop `protobuf:"bytes,1,opt,name=linux_desktop,json=linuxDesktop,proto3"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UpsertLinuxDesktopRequest) Reset() {
*x = UpsertLinuxDesktopRequest{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpsertLinuxDesktopRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpsertLinuxDesktopRequest) ProtoMessage() {}
func (x *UpsertLinuxDesktopRequest) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *UpsertLinuxDesktopRequest) GetLinuxDesktop() *LinuxDesktop {
if x != nil {
return x.xxx_hidden_LinuxDesktop
}
return nil
}
func (x *UpsertLinuxDesktopRequest) SetLinuxDesktop(v *LinuxDesktop) {
x.xxx_hidden_LinuxDesktop = v
}
func (x *UpsertLinuxDesktopRequest) HasLinuxDesktop() bool {
if x == nil {
return false
}
return x.xxx_hidden_LinuxDesktop != nil
}
func (x *UpsertLinuxDesktopRequest) ClearLinuxDesktop() {
x.xxx_hidden_LinuxDesktop = nil
}
type UpsertLinuxDesktopRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// The full LinuxDesktop resource to create or update in the backend.
LinuxDesktop *LinuxDesktop
}
func (b0 UpsertLinuxDesktopRequest_builder) Build() *UpsertLinuxDesktopRequest {
m0 := &UpsertLinuxDesktopRequest{}
b, x := &b0, m0
_, _ = b, x
x.xxx_hidden_LinuxDesktop = b.LinuxDesktop
return m0
}
// GetLinuxDesktopRequest is request for GetLinuxDesktop method
type GetLinuxDesktopRequest struct {
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name,proto3"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetLinuxDesktopRequest) Reset() {
*x = GetLinuxDesktopRequest{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetLinuxDesktopRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetLinuxDesktopRequest) ProtoMessage() {}
func (x *GetLinuxDesktopRequest) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *GetLinuxDesktopRequest) GetName() string {
if x != nil {
return x.xxx_hidden_Name
}
return ""
}
func (x *GetLinuxDesktopRequest) SetName(v string) {
x.xxx_hidden_Name = v
}
type GetLinuxDesktopRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Name of the LinuxDesktop to retrieve
Name string
}
func (b0 GetLinuxDesktopRequest_builder) Build() *GetLinuxDesktopRequest {
m0 := &GetLinuxDesktopRequest{}
b, x := &b0, m0
_, _ = b, x
x.xxx_hidden_Name = b.Name
return m0
}
// ListLinuxDesktopRequest is request for ListLinuxDesktops method
type ListLinuxDesktopsRequest struct {
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3"`
xxx_hidden_PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ListLinuxDesktopsRequest) Reset() {
*x = ListLinuxDesktopsRequest{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ListLinuxDesktopsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListLinuxDesktopsRequest) ProtoMessage() {}
func (x *ListLinuxDesktopsRequest) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *ListLinuxDesktopsRequest) GetPageSize() int32 {
if x != nil {
return x.xxx_hidden_PageSize
}
return 0
}
func (x *ListLinuxDesktopsRequest) GetPageToken() string {
if x != nil {
return x.xxx_hidden_PageToken
}
return ""
}
func (x *ListLinuxDesktopsRequest) SetPageSize(v int32) {
x.xxx_hidden_PageSize = v
}
func (x *ListLinuxDesktopsRequest) SetPageToken(v string) {
x.xxx_hidden_PageToken = v
}
type ListLinuxDesktopsRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// The maximum number of items to return.
// The server may impose a different page size at its discretion.
PageSize int32
// The next_page_token value returned from a previous List request, if any.
PageToken string
}
func (b0 ListLinuxDesktopsRequest_builder) Build() *ListLinuxDesktopsRequest {
m0 := &ListLinuxDesktopsRequest{}
b, x := &b0, m0
_, _ = b, x
x.xxx_hidden_PageSize = b.PageSize
x.xxx_hidden_PageToken = b.PageToken
return m0
}
// ListLinuxDesktopsResponse is response of ListLinuxDesktop method
type ListLinuxDesktopsResponse struct {
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_LinuxDesktops *[]*LinuxDesktop `protobuf:"bytes,1,rep,name=linux_desktops,json=linuxDesktops,proto3"`
xxx_hidden_NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ListLinuxDesktopsResponse) Reset() {
*x = ListLinuxDesktopsResponse{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ListLinuxDesktopsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListLinuxDesktopsResponse) ProtoMessage() {}
func (x *ListLinuxDesktopsResponse) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *ListLinuxDesktopsResponse) GetLinuxDesktops() []*LinuxDesktop {
if x != nil {
if x.xxx_hidden_LinuxDesktops != nil {
return *x.xxx_hidden_LinuxDesktops
}
}
return nil
}
func (x *ListLinuxDesktopsResponse) GetNextPageToken() string {
if x != nil {
return x.xxx_hidden_NextPageToken
}
return ""
}
func (x *ListLinuxDesktopsResponse) SetLinuxDesktops(v []*LinuxDesktop) {
x.xxx_hidden_LinuxDesktops = &v
}
func (x *ListLinuxDesktopsResponse) SetNextPageToken(v string) {
x.xxx_hidden_NextPageToken = v
}
type ListLinuxDesktopsResponse_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// The page of LinuxDesktop that matched the request.
LinuxDesktops []*LinuxDesktop
// Token to retrieve the next page of results, or empty if there are no
// more results in the list.
NextPageToken string
}
func (b0 ListLinuxDesktopsResponse_builder) Build() *ListLinuxDesktopsResponse {
m0 := &ListLinuxDesktopsResponse{}
b, x := &b0, m0
_, _ = b, x
x.xxx_hidden_LinuxDesktops = &b.LinuxDesktops
x.xxx_hidden_NextPageToken = b.NextPageToken
return m0
}
// DeleteLinuxDesktopRequest is request for DeleteLinuxDesktop method
type DeleteLinuxDesktopRequest struct {
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name,proto3"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeleteLinuxDesktopRequest) Reset() {
*x = DeleteLinuxDesktopRequest{}
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeleteLinuxDesktopRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteLinuxDesktopRequest) ProtoMessage() {}
func (x *DeleteLinuxDesktopRequest) ProtoReflect() protoreflect.Message {
mi := &file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (x *DeleteLinuxDesktopRequest) GetName() string {
if x != nil {
return x.xxx_hidden_Name
}
return ""
}
func (x *DeleteLinuxDesktopRequest) SetName(v string) {
x.xxx_hidden_Name = v
}
type DeleteLinuxDesktopRequest_builder struct {
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
// Name of the LinuxDesktop to remove.
Name string
}
func (b0 DeleteLinuxDesktopRequest_builder) Build() *DeleteLinuxDesktopRequest {
m0 := &DeleteLinuxDesktopRequest{}
b, x := &b0, m0
_, _ = b, x
x.xxx_hidden_Name = b.Name
return m0
}
var File_teleport_linuxdesktop_v1_linux_desktop_service_proto protoreflect.FileDescriptor
const file_teleport_linuxdesktop_v1_linux_desktop_service_proto_rawDesc = "" +
"\n" +
"4teleport/linuxdesktop/v1/linux_desktop_service.proto\x12\x18teleport.linuxdesktop.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a,teleport/linuxdesktop/v1/linux_desktop.proto\"h\n" +
"\x19CreateLinuxDesktopRequest\x12K\n" +
"\rlinux_desktop\x18\x01 \x01(\v2&.teleport.linuxdesktop.v1.LinuxDesktopR\flinuxDesktop\"h\n" +
"\x19UpdateLinuxDesktopRequest\x12K\n" +
"\rlinux_desktop\x18\x01 \x01(\v2&.teleport.linuxdesktop.v1.LinuxDesktopR\flinuxDesktop\"h\n" +
"\x19UpsertLinuxDesktopRequest\x12K\n" +
"\rlinux_desktop\x18\x01 \x01(\v2&.teleport.linuxdesktop.v1.LinuxDesktopR\flinuxDesktop\",\n" +
"\x16GetLinuxDesktopRequest\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\"V\n" +
"\x18ListLinuxDesktopsRequest\x12\x1b\n" +
"\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" +
"\n" +
"page_token\x18\x02 \x01(\tR\tpageToken\"\x92\x01\n" +
"\x19ListLinuxDesktopsResponse\x12M\n" +
"\x0elinux_desktops\x18\x01 \x03(\v2&.teleport.linuxdesktop.v1.LinuxDesktopR\rlinuxDesktops\x12&\n" +
"\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"/\n" +
"\x19DeleteLinuxDesktopRequest\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name2\xbc\x05\n" +
"\x13LinuxDesktopService\x12q\n" +
"\x12CreateLinuxDesktop\x123.teleport.linuxdesktop.v1.CreateLinuxDesktopRequest\x1a&.teleport.linuxdesktop.v1.LinuxDesktop\x12q\n" +
"\x12UpdateLinuxDesktop\x123.teleport.linuxdesktop.v1.UpdateLinuxDesktopRequest\x1a&.teleport.linuxdesktop.v1.LinuxDesktop\x12q\n" +
"\x12UpsertLinuxDesktop\x123.teleport.linuxdesktop.v1.UpsertLinuxDesktopRequest\x1a&.teleport.linuxdesktop.v1.LinuxDesktop\x12k\n" +
"\x0fGetLinuxDesktop\x120.teleport.linuxdesktop.v1.GetLinuxDesktopRequest\x1a&.teleport.linuxdesktop.v1.LinuxDesktop\x12|\n" +
"\x11ListLinuxDesktops\x122.teleport.linuxdesktop.v1.ListLinuxDesktopsRequest\x1a3.teleport.linuxdesktop.v1.ListLinuxDesktopsResponse\x12a\n" +
"\x12DeleteLinuxDesktop\x123.teleport.linuxdesktop.v1.DeleteLinuxDesktopRequest\x1a\x16.google.protobuf.EmptyB\\ZZgithub.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1;linuxdesktopv1b\x06proto3"
var file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_teleport_linuxdesktop_v1_linux_desktop_service_proto_goTypes = []any{
(*CreateLinuxDesktopRequest)(nil), // 0: teleport.linuxdesktop.v1.CreateLinuxDesktopRequest
(*UpdateLinuxDesktopRequest)(nil), // 1: teleport.linuxdesktop.v1.UpdateLinuxDesktopRequest
(*UpsertLinuxDesktopRequest)(nil), // 2: teleport.linuxdesktop.v1.UpsertLinuxDesktopRequest
(*GetLinuxDesktopRequest)(nil), // 3: teleport.linuxdesktop.v1.GetLinuxDesktopRequest
(*ListLinuxDesktopsRequest)(nil), // 4: teleport.linuxdesktop.v1.ListLinuxDesktopsRequest
(*ListLinuxDesktopsResponse)(nil), // 5: teleport.linuxdesktop.v1.ListLinuxDesktopsResponse
(*DeleteLinuxDesktopRequest)(nil), // 6: teleport.linuxdesktop.v1.DeleteLinuxDesktopRequest
(*LinuxDesktop)(nil), // 7: teleport.linuxdesktop.v1.LinuxDesktop
(*emptypb.Empty)(nil), // 8: google.protobuf.Empty
}
var file_teleport_linuxdesktop_v1_linux_desktop_service_proto_depIdxs = []int32{
7, // 0: teleport.linuxdesktop.v1.CreateLinuxDesktopRequest.linux_desktop:type_name -> teleport.linuxdesktop.v1.LinuxDesktop
7, // 1: teleport.linuxdesktop.v1.UpdateLinuxDesktopRequest.linux_desktop:type_name -> teleport.linuxdesktop.v1.LinuxDesktop
7, // 2: teleport.linuxdesktop.v1.UpsertLinuxDesktopRequest.linux_desktop:type_name -> teleport.linuxdesktop.v1.LinuxDesktop
7, // 3: teleport.linuxdesktop.v1.ListLinuxDesktopsResponse.linux_desktops:type_name -> teleport.linuxdesktop.v1.LinuxDesktop
0, // 4: teleport.linuxdesktop.v1.LinuxDesktopService.CreateLinuxDesktop:input_type -> teleport.linuxdesktop.v1.CreateLinuxDesktopRequest
1, // 5: teleport.linuxdesktop.v1.LinuxDesktopService.UpdateLinuxDesktop:input_type -> teleport.linuxdesktop.v1.UpdateLinuxDesktopRequest
2, // 6: teleport.linuxdesktop.v1.LinuxDesktopService.UpsertLinuxDesktop:input_type -> teleport.linuxdesktop.v1.UpsertLinuxDesktopRequest
3, // 7: teleport.linuxdesktop.v1.LinuxDesktopService.GetLinuxDesktop:input_type -> teleport.linuxdesktop.v1.GetLinuxDesktopRequest
4, // 8: teleport.linuxdesktop.v1.LinuxDesktopService.ListLinuxDesktops:input_type -> teleport.linuxdesktop.v1.ListLinuxDesktopsRequest
6, // 9: teleport.linuxdesktop.v1.LinuxDesktopService.DeleteLinuxDesktop:input_type -> teleport.linuxdesktop.v1.DeleteLinuxDesktopRequest
7, // 10: teleport.linuxdesktop.v1.LinuxDesktopService.CreateLinuxDesktop:output_type -> teleport.linuxdesktop.v1.LinuxDesktop
7, // 11: teleport.linuxdesktop.v1.LinuxDesktopService.UpdateLinuxDesktop:output_type -> teleport.linuxdesktop.v1.LinuxDesktop
7, // 12: teleport.linuxdesktop.v1.LinuxDesktopService.UpsertLinuxDesktop:output_type -> teleport.linuxdesktop.v1.LinuxDesktop
7, // 13: teleport.linuxdesktop.v1.LinuxDesktopService.GetLinuxDesktop:output_type -> teleport.linuxdesktop.v1.LinuxDesktop
5, // 14: teleport.linuxdesktop.v1.LinuxDesktopService.ListLinuxDesktops:output_type -> teleport.linuxdesktop.v1.ListLinuxDesktopsResponse
8, // 15: teleport.linuxdesktop.v1.LinuxDesktopService.DeleteLinuxDesktop:output_type -> google.protobuf.Empty
10, // [10:16] is the sub-list for method output_type
4, // [4:10] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_teleport_linuxdesktop_v1_linux_desktop_service_proto_init() }
func file_teleport_linuxdesktop_v1_linux_desktop_service_proto_init() {
if File_teleport_linuxdesktop_v1_linux_desktop_service_proto != nil {
return
}
file_teleport_linuxdesktop_v1_linux_desktop_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_teleport_linuxdesktop_v1_linux_desktop_service_proto_rawDesc), len(file_teleport_linuxdesktop_v1_linux_desktop_service_proto_rawDesc)),
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_teleport_linuxdesktop_v1_linux_desktop_service_proto_goTypes,
DependencyIndexes: file_teleport_linuxdesktop_v1_linux_desktop_service_proto_depIdxs,
MessageInfos: file_teleport_linuxdesktop_v1_linux_desktop_service_proto_msgTypes,
}.Build()
File_teleport_linuxdesktop_v1_linux_desktop_service_proto = out.File
file_teleport_linuxdesktop_v1_linux_desktop_service_proto_goTypes = nil
file_teleport_linuxdesktop_v1_linux_desktop_service_proto_depIdxs = nil
}
@@ -171,6 +171,9 @@ message LockTarget {
// joined. This only applies to bot identities, and cannot be used to target
// bots that joined via the `token` join method.
string join_token = 10;
// LinuxDesktop specifies the name of a Linux desktop.
string linux_desktop = 11;
}
// HostUserMode determines how host users should be created.
+12 -2
View File
@@ -33,12 +33,21 @@ message ServerHello {
ConnectionActivated activation_spec = 1;
bool clipboard_enabled = 2;
bool directory_remove_supported = 3;
// Field number 5 matches master. v18 doesn't use fields 3 and 4
// (directory_remove_supported and sessions on master).
repeated SessionIdentifier sessions = 4;
bool hidpi_supported = 5;
bool multidirectory_sharing_supported = 6;
}
// Used to identify sessions available to and selected by users
message SessionIdentifier {
string name = 1;
}
// Sent by client to select one of available sessions
message SessionSelection {
SessionIdentifier session = 1;
}
// Defines the boundaries that PNG frame will update.
// Used for composition on PNG frame messages only.
message Rectangle {
@@ -353,5 +362,6 @@ message Envelope {
LatencyStats latency_stats = 19;
Ping ping = 20;
SharedDirectoryRemove shared_directory_remove = 21;
SessionSelection session_selection = 22;
}
}
@@ -195,6 +195,10 @@ message UserCertsRequest {
WindowsDesktop = 5;
// AccessGraphAPI means a request for a TLS certificate for access to the Access Graph API.
AccessGraphAPI = 6;
// LinuxDesktop means a request for a TLS certificate for access to a specific
// linux desktop.
// Field number 7 matches master
LinuxDesktop = 7;
}
// CertUsage limits the resulting user certificate to a single protocol.
CertUsage Usage = 10 [(gogoproto.jsontag) = "usage,omitempty"];
@@ -311,6 +315,13 @@ message UserCertsRequest {
// re-issuable. This flag is only applicable when UseRoleRequests is set to
// true.
bool ReissuableRoleImpersonation = 27 [(gogoproto.jsontag) = "reissuable_role_impersonation"];
// RouteToLinuxDesktop specifies the target linux desktop name to encode into
// certificate so linux desktop client requests are routed appropriately.
RouteToLinuxDesktop RouteToLinuxDesktop = 28 [
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "route_to_linux_desktop,omitempty"
];
}
// RouteToDatabase combines parameters for database service routing information.
@@ -335,6 +346,14 @@ message RouteToWindowsDesktop {
string Login = 2 [(gogoproto.jsontag) = "login"];
}
// RouteToLinuxDesktop combines parameters for Linux desktop routing information.
message RouteToLinuxDesktop {
// LinuxDesktop is the Linux Desktop server name to embed.
string linux_desktop = 1;
// Login is the Linux desktop user login to embed.
string login = 2;
}
// RouteToApp contains parameters for application access certificate requests.
message RouteToApp {
reserved 2; // SessionID, jsontag "session_id"
@@ -1619,6 +1638,8 @@ message IsMFARequiredRequest {
AdminAction AdminAction = 5;
// App specifies the target App.
RouteToApp App = 6;
// LinuxDesktop specifies the target Linux Desktop.
RouteToLinuxDesktop LinuxDesktop = 7;
}
}
@@ -2283,6 +2304,23 @@ message IdentityCenterAccountAssignment {
IdentityCenterPermissionSet PermissionSet = 7;
}
// LinuxDesktop represents Linux desktop. This is strictly a wire-format object
// for use with the unified resource cache, and the types defined in the
// `linuxdesktop` package should be used for actual processing.
message LinuxDesktop {
// Kind is the Linux desktop resource kind.
string kind = 1;
// SubKind is an optional resource subkind.
string sub_kind = 2;
// Version is the resource version.
string version = 3;
// Metadata is the account metadata.
types.Metadata metadata = 4 [(gogoproto.nullable) = false];
string addr = 5;
string hostname = 6;
repeated string proxy_ids = 7;
}
message ListInstallersRequest {
// The maximum number of items to return.
// The server may impose a different page size at its discretion.
@@ -2329,6 +2367,8 @@ message PaginatedResource {
// IdentityCenterAccountAssignment represents a requestable Identity Center
// Account Assignment
IdentityCenterAccountAssignment IdentityCenterAccountAssignment = 16 [(gogoproto.jsontag) = "identity_center_account_assignment,omitempty"];
// LinuxDesktop represents LinuxDesktop resource
LinuxDesktop linux_desktop = 17;
}
// Logins allowed for the included resource. Only to be populated for SSH and Desktops.
@@ -29,6 +29,7 @@ import "teleport/healthcheckconfig/v1/health_check_config.proto";
import "teleport/identitycenter/v1/identitycenter.proto";
import "teleport/kubewaitingcontainer/v1/kubewaitingcontainer.proto";
import "teleport/legacy/types/types.proto";
import "teleport/linuxdesktop/v1/linux_desktop.proto";
import "teleport/machineid/v1/bot_instance.proto";
import "teleport/machineid/v1/federation.proto";
import "teleport/notifications/v1/notifications.proto";
@@ -241,6 +242,8 @@ message Event {
types.PluginV1 plugin = 84;
// AutoUpdateAgentReport is a resource for counting connected bot instances.
teleport.autoupdate.v1.AutoUpdateBotInstanceReport AutoUpdateBotInstanceReport = 85;
// LinuxDesktop is a resource for linux desktop.
teleport.linuxdesktop.v1.LinuxDesktop LinuxDesktop = 87;
// CertAuthorityOverride allows admins to override Teleport CA certificates.
teleport.subca.v1.CertAuthorityOverride CertAuthorityOverride = 90;
// InferenceModel is a resource for defining inference models.
@@ -20,6 +20,7 @@ package proto;
import "google/protobuf/timestamp.proto";
import "teleport/legacy/types/types.proto";
import "teleport/linuxdesktop/v1/linux_desktop.proto";
import "teleport/presence/v1/relay_server.proto";
import "teleport/scopes/joining/v1/token.proto";
@@ -181,6 +182,10 @@ message DownstreamInventoryHello {
bool relay_server_heartbeats_cleanup = 19;
// DatabaseHeartbeatGracefulStop indicates the ICS supports stopping an individual database heartbeat.
bool database_heartbeat_graceful_stop = 20;
// LinuxDesktopHeartbeats indicates the ICS supports heartbeating linux desktops.
bool linux_desktop_heartbeats = 21;
// LinuxDesktopCleanup indicates the ICS supports deleting linux desktops when UpstreamInventoryGoodbye.DeleteResources is set.
bool linux_desktop_cleanup = 22;
}
// SupportedCapabilities advertises the supported features of the auth server.
@@ -234,6 +239,8 @@ message InventoryHeartbeat {
types.KubernetesServerV3 KubernetesServer = 4;
// A relay_server to be heartbeated.
teleport.presence.v1.RelayServer relay_server = 5;
// LinuxDesktop is a complete linux desktop spec to be heartbeated.
teleport.linuxdesktop.v1.LinuxDesktop linux_desktop = 6;
}
// UpstreamInventoryGoodbye informs the upstream service that instance
@@ -3860,7 +3860,7 @@ message WindowsCertificateMetadata {
repeated string EnhancedKeyUsage = 7 [(gogoproto.jsontag) = "enhanced_key_usage"];
}
// WindowsDesktopSessionStart is emitted when a user connects to a desktop.
// WindowsDesktopSessionStart is emitted when a user connects to a Windows desktop.
message WindowsDesktopSessionStart {
// Metadata is common event metadata.
Metadata Metadata = 1 [
@@ -3924,6 +3924,48 @@ message CAOverrideCertificateDetails {
string public_key_hash = 2 [(gogoproto.jsontag) = "public_key_hash"];
}
// LinuxDesktopSessionStart is emitted when a user connects to a Linux desktop.
message LinuxDesktopSessionStart {
// Metadata is common event metadata.
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is common user event metadata.
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Session is common event session metadata.
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Connection holds information about the connection.
ConnectionMetadata Connection = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Status indicates whether the connection was successful or denied.
Status Status = 5 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// DesktopAddr is the address of the desktop being accessed.
string DesktopAddr = 6 [(gogoproto.jsontag) = "desktop_addr"];
// LinuxUser is the Linux username used to connect.
string LinuxUser = 7 [(gogoproto.jsontag) = "linux_user"];
// DesktopLabels are the labels on the desktop resource.
map<string, string> DesktopLabels = 8 [(gogoproto.jsontag) = "desktop_labels"];
// DesktopName is the name of the desktop resource.
string DesktopName = 9 [(gogoproto.jsontag) = "desktop_name"];
}
// DatabaseSessionEnd is emitted when a user ends the database session.
message DatabaseSessionEnd {
// Metadata is a common event metadata.
@@ -4259,6 +4301,57 @@ message WindowsDesktopSessionEnd {
];
}
// LinuxDesktopSessionEnd is emitted when a user ends a Linux desktop session.
message LinuxDesktopSessionEnd {
// Metadata is a common event metadata.
Metadata Metadata = 1 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// User is a common user event metadata.
UserMetadata User = 2 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Session is a common event session metadata.
SessionMetadata Session = 3 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// Connection holds information about the connection.
ConnectionMetadata Connection = 4 [
(gogoproto.nullable) = false,
(gogoproto.embed) = true,
(gogoproto.jsontag) = ""
];
// DesktopAddr is the address of the desktop being accessed.
string DesktopAddr = 5 [(gogoproto.jsontag) = "desktop_addr"];
string LinuxUser = 6 [(gogoproto.jsontag) = "linux_user"];
// DesktopLabels are the labels on the desktop resource.
map<string, string> DesktopLabels = 7 [(gogoproto.jsontag) = "desktop_labels"];
// StartTime is the timestamp at which the session began.
google.protobuf.Timestamp StartTime = 8 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "session_start,omitempty" // JSON tag intentionally matches SessionEnd event
];
// EndTime is the timestamp at which the session ended.
google.protobuf.Timestamp EndTime = 9 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "session_stop,omitempty"
];
// DesktopName is the name of the desktop resource.
string DesktopName = 10 [(gogoproto.jsontag) = "desktop_name"];
// Recorded is true if the session was recorded, false otherwise.
bool Recorded = 11 [(gogoproto.jsontag) = "recorded"];
// Participants is a list of participants in the session.
repeated string Participants = 12 [(gogoproto.jsontag) = "participants"];
}
// CertificateCreate is emitted when a certificate is issued.
message CertificateCreate {
// Metadata is a common event metadata.
@@ -5184,6 +5277,8 @@ message OneOf {
events.RetrievalModelUpdate RetrievalModelUpdate = 251;
events.RetrievalModelDelete RetrievalModelDelete = 252;
events.AzureRun AzureRun = 253;
events.LinuxDesktopSessionStart LinuxDesktopSessionStart = 254;
events.LinuxDesktopSessionEnd LinuxDesktopSessionEnd = 255;
events.EnvironmentProfileUpdate EnvironmentProfileUpdate = 256;
events.BeamsConfigCreate BeamsConfigCreate = 257;
events.BeamsConfigUpdate BeamsConfigUpdate = 258;
@@ -4337,6 +4337,20 @@ message RoleConditions {
// MCPPermissions defines MCP servers related permissions.
MCPPermissions MCP = 46 [(gogoproto.jsontag) = "mcp,omitempty"];
// LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.
repeated string LinuxDesktopLogins = 47 [(gogoproto.jsontag) = "linux_desktop_logins,omitempty"];
// LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.
wrappers.LabelValues LinuxDesktopLabels = 48 [
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "linux_desktop_labels,omitempty",
(gogoproto.customtype) = "Labels"
];
// LinuxDesktopLabelsExpression is a predicate expression used to allow/deny
// access to Linux desktops.
string LinuxDesktopLabelsExpression = 49 [(gogoproto.jsontag) = "linux_desktop_labels_expression,omitempty"];
// BeamLabels are used in the RBAC system to allow/deny access to beams.
wrappers.LabelValues BeamLabels = 50 [
(gogoproto.nullable) = false,
@@ -6654,6 +6668,9 @@ message LockTarget {
// joined. This is only valid for bot identities, and cannot be used to target
// `token`-joined bots.
string JoinToken = 11 [(gogoproto.jsontag) = "join_token,omitempty"];
// LinuxDesktop specifies the name of a Linux desktop.
string LinuxDesktop = 12 [(gogoproto.jsontag) = "linux_desktop,omitempty"];
}
// LockFilter encodes optional filters to apply when listing Lock resources
@@ -0,0 +1,51 @@
// Copyright 2026 Gravitational, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package teleport.linuxdesktop.v1;
import "teleport/header/v1/metadata.proto";
option go_package = "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1;linuxdesktopv1";
// LinuxDesktop represents Linux desktop resource.
message LinuxDesktop {
// Kind is the resource kind.
string kind = 1;
// SubKind is the resource sub-kind.
string sub_kind = 2;
// Version is the resource version.
string version = 3;
// Metadata contains the resource metadata.
teleport.header.v1.Metadata metadata = 4;
// Spec is the Linux desktop specification.
LinuxDesktopSpec spec = 5;
}
// LinuxDesktopSpec is the specification of a Linux desktop.
message LinuxDesktopSpec {
// Address of the server for this desktop.
string addr = 1;
// Hostname is name of this host
string hostname = 2;
// ProxyIDs is a list of proxy IDs this server is expected to be connected to.
repeated string proxy_ids = 3;
}
@@ -0,0 +1,91 @@
// Copyright 2026 Gravitational, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package teleport.linuxdesktop.v1;
import "google/protobuf/empty.proto";
import "teleport/linuxdesktop/v1/linux_desktop.proto";
option go_package = "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1;linuxdesktopv1";
// LinuxDesktopService is a service to fetch information about Linux desktops.
service LinuxDesktopService {
// Creates a new LinuxDesktop resource in the backend.
rpc CreateLinuxDesktop(CreateLinuxDesktopRequest) returns (LinuxDesktop);
// Updates an existing LinuxDesktop in the backend.
rpc UpdateLinuxDesktop(UpdateLinuxDesktopRequest) returns (LinuxDesktop);
// Updates an existing LinuxDesktop in the backend or creates one if needed.
rpc UpsertLinuxDesktop(UpsertLinuxDesktopRequest) returns (LinuxDesktop);
// Returns a single LinuxDesktop matching the request
rpc GetLinuxDesktop(GetLinuxDesktopRequest) returns (LinuxDesktop);
// Returns a page of LinuxDesktop and the token to find the next page of items.
rpc ListLinuxDesktops(ListLinuxDesktopsRequest) returns (ListLinuxDesktopsResponse);
// Remove a matching LinuxDesktop resource
rpc DeleteLinuxDesktop(DeleteLinuxDesktopRequest) returns (google.protobuf.Empty);
}
// CreateLinuxDesktopRequest is request for CreateLinuxDesktop method
message CreateLinuxDesktopRequest {
// The desired LinuxDesktop to be created.
LinuxDesktop linux_desktop = 1;
}
// UpdateLinuxDesktopRequest is request for UpdateLinuxDesktop method
message UpdateLinuxDesktopRequest {
// The full LinuxDesktop resource to update in the backend.
LinuxDesktop linux_desktop = 1;
}
// UpsertLinuxDesktopRequest is request for UpsertLinuxDesktop method
message UpsertLinuxDesktopRequest {
// The full LinuxDesktop resource to create or update in the backend.
LinuxDesktop linux_desktop = 1;
}
// GetLinuxDesktopRequest is request for GetLinuxDesktop method
message GetLinuxDesktopRequest {
// Name of the LinuxDesktop to retrieve
string name = 1;
}
// ListLinuxDesktopRequest is request for ListLinuxDesktops method
message ListLinuxDesktopsRequest {
// The maximum number of items to return.
// The server may impose a different page size at its discretion.
int32 page_size = 1;
// The next_page_token value returned from a previous List request, if any.
string page_token = 2;
}
// ListLinuxDesktopsResponse is response of ListLinuxDesktop method
message ListLinuxDesktopsResponse {
// The page of LinuxDesktop that matched the request.
repeated LinuxDesktop linux_desktops = 1;
// Token to retrieve the next page of results, or empty if there are no
// more results in the list.
string next_page_token = 2;
}
// DeleteLinuxDesktopRequest is request for DeleteLinuxDesktop method
message DeleteLinuxDesktopRequest {
// Name of the LinuxDesktop to remove.
string name = 1;
}
+6
View File
@@ -477,6 +477,9 @@ const (
// KindDynamicWindowsDesktop is a dynamic Windows desktop host.
KindDynamicWindowsDesktop = "dynamic_windows_desktop"
// KindLinuxDesktop is a Linux desktop host.
KindLinuxDesktop = "linux_desktop"
// KindRecoveryCodes is a resource that holds users recovery codes.
KindRecoveryCodes = "recovery_codes"
@@ -1523,6 +1526,9 @@ const (
// WindowsDesktopTunnel is a tunnel where the Windows desktop service dials back to the proxy.
WindowsDesktopTunnel TunnelType = "windows_desktop"
// LinuxDesktopTunnel is a tunnel where the Linux desktop service dials back to the proxy.
LinuxDesktopTunnel TunnelType = "linux_desktop"
// OktaTunnel is a tunnel where the Okta service dials back to the proxy.
OktaTunnel TunnelType = "okta"
)
+54
View File
@@ -1459,6 +1459,60 @@ func (m *WindowsDesktopSessionEnd) TrimToMaxSize(maxSize int) AuditEvent {
return out
}
func (m *LinuxDesktopSessionStart) TrimToMaxSize(maxSize int) AuditEvent {
size := m.Size()
if size <= maxSize {
return m
}
out := utils.CloneProtoMsg(m)
out.Status = Status{}
out.LinuxUser = ""
out.DesktopLabels = nil
out.DesktopName = ""
maxSize = adjustedMaxSize(out, maxSize)
customFieldsCount := m.Status.nonEmptyStrs() +
nonEmptyStrs(m.LinuxUser, m.DesktopName) +
nonEmptyStrsInMap(m.DesktopLabels)
maxFieldsSize := maxSizePerField(maxSize, customFieldsCount)
out.Status = m.Status.trimToMaxFieldSize(maxFieldsSize)
out.LinuxUser = trimStr(m.LinuxUser, maxFieldsSize)
out.DesktopLabels = trimMap(m.DesktopLabels, maxFieldsSize)
out.DesktopName = trimStr(m.DesktopName, maxFieldsSize)
return out
}
func (m *LinuxDesktopSessionEnd) TrimToMaxSize(maxSize int) AuditEvent {
size := m.Size()
if size <= maxSize {
return m
}
out := utils.CloneProtoMsg(m)
out.LinuxUser = ""
out.DesktopLabels = nil
out.DesktopName = ""
out.Participants = nil
maxSize = adjustedMaxSize(out, maxSize)
customFieldsCount := nonEmptyStrs(m.LinuxUser, m.DesktopName) +
nonEmptyStrsInMap(m.DesktopLabels) +
nonEmptyStrsInSlice(m.Participants)
maxFieldsSize := maxSizePerField(maxSize, customFieldsCount)
out.LinuxUser = trimStr(m.LinuxUser, maxFieldsSize)
out.DesktopLabels = trimMap(m.DesktopLabels, maxFieldsSize)
out.DesktopName = trimStr(m.DesktopName, maxFieldsSize)
out.Participants = trimStrSlice(m.Participants, maxFieldsSize)
return out
}
func (m *DesktopClipboardSend) TrimToMaxSize(maxSize int) AuditEvent {
return m
}
+3371 -1748
View File
File diff suppressed because it is too large Load Diff
+8
View File
@@ -356,6 +356,14 @@ func ToOneOf(in AuditEvent) (*OneOf, error) {
out.Event = &OneOf_WindowsDesktopSessionEnd{
WindowsDesktopSessionEnd: e,
}
case *LinuxDesktopSessionStart:
out.Event = &OneOf_LinuxDesktopSessionStart{
LinuxDesktopSessionStart: e,
}
case *LinuxDesktopSessionEnd:
out.Event = &OneOf_LinuxDesktopSessionEnd{
LinuxDesktopSessionEnd: e,
}
case *SessionConnect:
out.Event = &OneOf_SessionConnect{
SessionConnect: e,
+1
View File
@@ -279,6 +279,7 @@ func (t LockTarget) Match(lock Lock) bool {
(t.Login == "" || lockTarget.Login == t.Login) &&
(t.MFADevice == "" || lockTarget.MFADevice == t.MFADevice) &&
(t.WindowsDesktop == "" || lockTarget.WindowsDesktop == t.WindowsDesktop) &&
(t.LinuxDesktop == "" || lockTarget.LinuxDesktop == t.LinuxDesktop) &&
(t.AccessRequest == "" || lockTarget.AccessRequest == t.AccessRequest) &&
(t.Device == "" || lockTarget.Device == t.Device) &&
(t.ServerID == "" || lockTarget.ServerID == t.ServerID) &&
+15 -3
View File
@@ -336,7 +336,12 @@ type ProtoResource153 interface {
type protoResource153ToLegacyAdapter[T ProtoResource153] struct {
inner T
resource153ToLegacyAdapter[T]
resource153ToResourceWithLabelsAdapter[T]
}
func (r *protoResource153ToLegacyAdapter[T]) CloneResource() ResourceWithLabels {
clone := proto.CloneOf(r.inner)
return ProtoResource153ToLegacy(clone)
}
// UnwrapT is an escape hatch for Resource153 instances that are piped down into
@@ -362,10 +367,12 @@ func (r *protoResource153ToLegacyAdapter[T]) MarshalJSON() ([]byte, error) {
//
// Note that CheckAndSetDefaults is a noop for the returned resource and
// SetSubKind is not implemented and panics on use.
func ProtoResource153ToLegacy[T ProtoResource153](r T) Resource {
func ProtoResource153ToLegacy[T ProtoResource153](r T) ClonableResourceWithLabels {
return &protoResource153ToLegacyAdapter[T]{
r,
resource153ToLegacyAdapter[T]{r},
resource153ToResourceWithLabelsAdapter[T]{
resource153ToLegacyAdapter[T]{r},
},
}
}
@@ -381,3 +388,8 @@ func ConvertResource[T any](resource Resource) (T, error) {
var zero T
return zero, trace.BadParameter("expected resource type %T, got %T", zero, resource)
}
type ClonableResourceWithLabels interface {
ResourceWithLabels
CloneResource() ResourceWithLabels
}
+53
View File
@@ -223,6 +223,17 @@ type Role interface {
// SetWindowsLogins sets Windows desktop logins for allow or deny condition.
SetWindowsLogins(RoleConditionType, []string)
// GetLinuxDesktopLabels gets the Linux desktop labels this role
// is allowed or denied access to.
GetLinuxDesktopLabels(RoleConditionType) Labels
// SetLinuxDesktopLabels sets the Linux desktop labels this role
// is allowed or denied access to.
SetLinuxDesktopLabels(RoleConditionType, Labels)
// GetLinuxDesktopLogins gets Linux desktop logins for allow or deny condition.
GetLinuxDesktopLogins(RoleConditionType) []string
// SetLinuxDesktopLogins sets Linux desktop logins for allow or deny condition.
SetLinuxDesktopLogins(RoleConditionType, []string)
// GetSessionRequirePolicies returns the RBAC required policies for a session.
GetSessionRequirePolicies() []*SessionRequirePolicy
// SetSessionRequirePolicies sets the RBAC required policies for a session.
@@ -1064,6 +1075,42 @@ func (r *RoleV6) SetWindowsLogins(rct RoleConditionType, logins []string) {
}
}
// GetLinuxDesktopLabels gets the desktop labels this role is allowed or denied access to.
func (r *RoleV6) GetLinuxDesktopLabels(rct RoleConditionType) Labels {
if rct == Allow {
return r.Spec.Allow.LinuxDesktopLabels
}
return r.Spec.Deny.LinuxDesktopLabels
}
// SetLinuxDesktopLabels sets the desktop labels this role is allowed or denied access to.
func (r *RoleV6) SetLinuxDesktopLabels(rct RoleConditionType, labels Labels) {
if rct == Allow {
r.Spec.Allow.LinuxDesktopLabels = labels.Clone()
} else {
r.Spec.Deny.LinuxDesktopLabels = labels.Clone()
}
}
// GetLinuxLogins gets Linux desktop logins for the role's allow or deny condition.
func (r *RoleV6) GetLinuxDesktopLogins(rct RoleConditionType) []string {
if rct == Allow {
return r.Spec.Allow.LinuxDesktopLogins
}
return r.Spec.Deny.LinuxDesktopLogins
}
// SetLinuxLogins sets Linux desktop logins for the role's allow or deny condition.
func (r *RoleV6) SetLinuxDesktopLogins(rct RoleConditionType, logins []string) {
lcopy := slices.Clone(logins)
if rct == Allow {
r.Spec.Allow.LinuxDesktopLogins = lcopy
} else {
r.Spec.Deny.LinuxDesktopLogins = lcopy
}
}
// GetRules gets all allow or deny rules.
func (r *RoleV6) GetRules(rct RoleConditionType) []Rule {
if rct == Allow {
@@ -2248,6 +2295,8 @@ func (r *RoleV6) GetLabelMatchers(rct RoleConditionType, kind string) (LabelMatc
return LabelMatchers{cond.WindowsDesktopLabels, cond.WindowsDesktopLabelsExpression}, nil
case KindWindowsDesktopService:
return LabelMatchers{cond.WindowsDesktopLabels, cond.WindowsDesktopLabelsExpression}, nil
case KindLinuxDesktop:
return LabelMatchers{cond.LinuxDesktopLabels, cond.LinuxDesktopLabelsExpression}, nil
case KindUserGroup:
return LabelMatchers{cond.GroupLabels, cond.GroupLabelsExpression}, nil
case KindGitServer:
@@ -2297,6 +2346,10 @@ func (r *RoleV6) SetLabelMatchers(rct RoleConditionType, kind string, labelMatch
cond.DatabaseServiceLabels = labelMatchers.Labels
cond.DatabaseServiceLabelsExpression = labelMatchers.Expression
return nil
case KindLinuxDesktop:
cond.LinuxDesktopLabels = labelMatchers.Labels
cond.LinuxDesktopLabelsExpression = labelMatchers.Expression
return nil
case KindWindowsDesktop:
cond.WindowsDesktopLabels = labelMatchers.Labels
cond.WindowsDesktopLabelsExpression = labelMatchers.Expression
+1
View File
@@ -39,6 +39,7 @@ const (
DatabaseSessionKind SessionKind = "db"
AppSessionKind SessionKind = "app"
WindowsDesktopSessionKind SessionKind = "desktop"
LinuxDesktopSessionKind SessionKind = "linuxdesktop"
GitSessionKind SessionKind = "git"
UnknownSessionKind SessionKind = ""
)
+5
View File
@@ -84,6 +84,8 @@ const (
RoleDatabase SystemRole = "Db"
// RoleWindowsDesktop is a role for a Windows desktop service.
RoleWindowsDesktop SystemRole = "WindowsDesktop"
// RoleLinuxDesktop is a role for a Linux desktop service.
RoleLinuxDesktop SystemRole = "LinuxDesktop"
// RoleBot is a role for a bot.
RoleBot SystemRole = "Bot"
// RoleInstance is a role implicitly held by teleport servers (i.e. any teleport
@@ -128,6 +130,8 @@ var roleMappings = map[string]SystemRole{
"db": RoleDatabase,
"windowsdesktop": RoleWindowsDesktop,
"windows_desktop": RoleWindowsDesktop,
"linux_desktop": RoleLinuxDesktop,
"linuxdesktop": RoleLinuxDesktop,
"bot": RoleBot,
"instance": RoleInstance,
"discovery": RoleDiscovery,
@@ -163,6 +167,7 @@ var localServiceMappings = map[SystemRole]struct{}{
RoleApp: {},
RoleDatabase: {},
RoleWindowsDesktop: {},
RoleLinuxDesktop: {},
RoleDiscovery: {},
RoleOkta: {},
RoleMDM: {},
+2728 -2529
View File
File diff suppressed because it is too large Load Diff
+14
View File
@@ -94,6 +94,8 @@ type User interface {
GetKubeGroups() []string
// GetWindowsLogins gets the list of Windows Logins for the user
GetWindowsLogins() []string
// GetLinuxDesktopLogins gets the list of Linux desktop logins for the user
GetLinuxDesktopLogins() []string
// GetAWSRoleARNs gets the list of AWS role ARNs for the user
GetAWSRoleARNs() []string
// GetAzureIdentities gets a list of Azure identities for the user
@@ -126,6 +128,8 @@ type User interface {
SetKubeGroups(kubeGroups []string)
// SetWindowsLogins sets a list of Windows Logins for user
SetWindowsLogins(logins []string)
// SetLinuxDesktopLogins sets a list of Linux desktop logins for user
SetLinuxDesktopLogins(logins []string)
// SetAWSRoleARNs sets a list of AWS role ARNs for user
SetAWSRoleARNs(awsRoleARNs []string)
// SetAzureIdentities sets a list of Azure identities for the user
@@ -457,6 +461,11 @@ func (u *UserV2) SetWindowsLogins(logins []string) {
u.setTrait(constants.TraitWindowsLogins, logins)
}
// SetLinuxDesktopLogins sets the LinuxLogins trait for the user
func (u *UserV2) SetLinuxDesktopLogins(logins []string) {
u.setTrait(constants.TraitLinuxDesktopLogins, logins)
}
// SetAWSRoleARNs sets the AWSRoleARNs trait for the user
func (u *UserV2) SetAWSRoleARNs(awsRoleARNs []string) {
u.setTrait(constants.TraitAWSRoleARNs, awsRoleARNs)
@@ -591,6 +600,11 @@ func (u UserV2) GetWindowsLogins() []string {
return u.getTrait(constants.TraitWindowsLogins)
}
// GetLinuxDesktopLogins gets the list of Linux desktop logins for the user
func (u UserV2) GetLinuxDesktopLogins() []string {
return u.getTrait(constants.TraitLinuxDesktopLogins)
}
// GetAWSRoleARNs gets the list of AWS role ARNs for the user
func (u UserV2) GetAWSRoleARNs() []string {
return u.getTrait(constants.TraitAWSRoleARNs)
+2
View File
@@ -166,6 +166,8 @@ RUN apt-get -y update && \
tree \
unzip \
xauth \
xclip \
xvfb \
zip \
zlib1g-dev \
&& \
+2
View File
@@ -36,10 +36,12 @@ RUN apt-get -y update && \
apt-get install -q -y --no-install-recommends \
build-essential \
ca-certificates \
clang \
git \
golang \
libc6-dev \
libssl-dev \
llvm \
locales \
openssh-client \
pkg-config \
+7
View File
@@ -269,6 +269,9 @@ const (
// ComponentWindowsDesktop is a Windows desktop access server.
ComponentWindowsDesktop = "windows_desktop"
// ComponentLinuxDesktop is a Linux desktop access server.
ComponentLinuxDesktop = "linux_desktop"
// ComponentTracing is a tracing exporter
ComponentTracing = "tracing"
@@ -923,6 +926,10 @@ const (
// certificate to be only used for Windows desktop access
UsageWindowsDesktopOnly = "usage:windows_desktop"
// UsageLinuxDesktopOnly specifies certificate usage metadata that limits
// certificate to be only used for Linux desktop access
UsageLinuxDesktopOnly = "usage:linux_desktop"
// UsageAccessGraphAPIOnly specifies certificate usage metadata that limits
// certificate to be only used for Access Graph API access.
UsageAccessGraphAPIOnly = "usage:access_graph_api"
+49
View File
@@ -4195,6 +4195,55 @@ Example:
}
```
## linux.desktop.session.end
Linux Desktop Session Ended
Example:
```json
{
"code": "TDP08I",
"event": "linux.desktop.session.end",
"time": "2020-06-05T16:24:05Z",
"uid": "68a83a99-73ce-4bd7-bbf7-99103c2ba6a0"
}
```
## linux.desktop.session.start
There are multiple events with the `linux.desktop.session.start` type.
### TDP07I
Linux Desktop Session Started
Example:
```json
{
"code": "TDP07I",
"event": "linux.desktop.session.start",
"time": "2020-06-05T16:24:05Z",
"uid": "68a83a99-73ce-4bd7-bbf7-99103c2ba6a0"
}
```
### TDP07W
Linux Desktop Session Denied
Example:
```json
{
"code": "TDP07W",
"event": "linux.desktop.session.start",
"time": "2020-06-05T16:24:05Z",
"uid": "68a83a99-73ce-4bd7-bbf7-99103c2ba6a0"
}
```
## lock.created
Lock Created
+3
View File
@@ -1787,6 +1787,7 @@ Flags:
|`--device`|*no default*|UUID of a trusted device to disable.|
|`--expires`|*no default*|Time point (RFC3339) when the lock expires.|
|`--join-token`|*no default*|Bot join token name to disable|
|`--linux-desktop`|*no default*|Name of a Linux desktop to disable.|
|`--login`|*no default*|Name of a local UNIX user to disable.|
|`--message`|*no default*|Message to display to locked-out users.|
|`--mfa-device`|*no default*|UUID of a user MFA device to disable.|
@@ -2887,6 +2888,7 @@ Flags:
|`--host-user-uid`|*no default*|UID for auto provisioned host users to use|
|`--kubernetes-groups`|*no default*|List of allowed Kubernetes groups for the new user|
|`--kubernetes-users`|*no default*|List of allowed Kubernetes users for the new user|
|`--linux-desktop-logins`|*no default*|List of allowed Linux desktop logins for the new user|
|`--logins`|*no default*|List of allowed SSH logins for the new user|
|`--mcp-tools`|*no default*|List of allowed MCP tools for the new user|
|`--roles`|*no default*|List of roles for the new user to assume|
@@ -2972,6 +2974,7 @@ Flags:
|`--set-host-user-uid`|*no default*|UID for auto provisioned host users to use. Value can be reset by providing an empty string|
|`--set-kubernetes-groups`|*no default*|List of allowed Kubernetes groups for the user, replaces current Kubernetes groups|
|`--set-kubernetes-users`|*no default*|List of allowed Kubernetes users for the user, replaces current Kubernetes users|
|`--set-linux-desktop-logins`|*no default*|List of allowed Linux desktop logins for the user, replaces current Linux logins|
|`--set-logins`|*no default*|List of allowed SSH logins for the user, replaces current logins|
|`--set-mcp-tools`|*no default*|List of allowed MCP tools for the user, replaces current allowed MCP tools.|
|`--set-roles`|*no default*|List of roles for the user to assume, replaces current roles|
@@ -39,6 +39,7 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|bot_instance_id|string|BotInstanceID is the bot instance ID if this is a bot identity and is ignored otherwise.|
|device|string|Device is the device ID of a trusted device. Requires Teleport Enterprise.|
|join_token|string|JoinToken is the name of the join token used when this identity originally joined. This is only valid for bot identities, and cannot be used to target `token`-joined bots.|
|linux_desktop|string|LinuxDesktop specifies the name of a Linux desktop.|
|login|string|Login specifies the name of a local UNIX user.|
|mfa_device|string|MFADevice specifies the UUID of a user MFA device.|
|role|string|Role specifies the name of an RBAC role known to the root cluster. In remote clusters, this constraint is evaluated before translating to local roles.|
@@ -64,6 +64,9 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|kubernetes_labels_expression|string|KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.|
|kubernetes_resources|[][object](#specallowkubernetes_resources-items)|KubernetesResources is the Kubernetes Resources this Role grants access to.|
|kubernetes_users|[]string|KubeUsers is an optional kubernetes users to impersonate|
|linux_desktop_labels|[object](#specallowlinux_desktop_labels)|LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.|
|linux_desktop_labels_expression|string|LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.|
|linux_desktop_logins|[]string|LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.|
|logins|[]string|Logins is a list of *nix system logins.|
|mcp|[object](#specallowmcp)|MCPPermissions defines MCP servers related permissions.|
|node_labels|[object](#specallownode_labels)|NodeLabels is a map of node labels (used to dynamically grant access to nodes).|
@@ -182,6 +185,13 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|namespace|string|Namespace is the resource namespace. It supports wildcards.|
|verbs|[]string|Verbs are the allowed Kubernetes verbs for the following resource.|
### spec.allow.linux_desktop_labels
|Field|Type|Description|
|---|---|---|
|key|string||
|value|string||
### spec.allow.mcp
|Field|Type|Description|
@@ -341,6 +351,9 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|kubernetes_labels_expression|string|KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.|
|kubernetes_resources|[][object](#specdenykubernetes_resources-items)|KubernetesResources is the Kubernetes Resources this Role grants access to.|
|kubernetes_users|[]string|KubeUsers is an optional kubernetes users to impersonate|
|linux_desktop_labels|[object](#specdenylinux_desktop_labels)|LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.|
|linux_desktop_labels_expression|string|LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.|
|linux_desktop_logins|[]string|LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.|
|logins|[]string|Logins is a list of *nix system logins.|
|mcp|[object](#specdenymcp)|MCPPermissions defines MCP servers related permissions.|
|node_labels|[object](#specdenynode_labels)|NodeLabels is a map of node labels (used to dynamically grant access to nodes).|
@@ -459,6 +472,13 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|namespace|string|Namespace is the resource namespace. It supports wildcards.|
|verbs|[]string|Verbs are the allowed Kubernetes verbs for the following resource.|
### spec.deny.linux_desktop_labels
|Field|Type|Description|
|---|---|---|
|key|string||
|value|string||
### spec.deny.mcp
|Field|Type|Description|
@@ -722,6 +742,9 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|kubernetes_labels_expression|string|KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.|
|kubernetes_resources|[][object](#specallowkubernetes_resources-items)|KubernetesResources is the Kubernetes Resources this Role grants access to.|
|kubernetes_users|[]string|KubeUsers is an optional kubernetes users to impersonate|
|linux_desktop_labels|[object](#specallowlinux_desktop_labels)|LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.|
|linux_desktop_labels_expression|string|LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.|
|linux_desktop_logins|[]string|LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.|
|logins|[]string|Logins is a list of *nix system logins.|
|mcp|[object](#specallowmcp)|MCPPermissions defines MCP servers related permissions.|
|node_labels|[object](#specallownode_labels)|NodeLabels is a map of node labels (used to dynamically grant access to nodes).|
@@ -840,6 +863,13 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|namespace|string|Namespace is the resource namespace. It supports wildcards.|
|verbs|[]string|Verbs are the allowed Kubernetes verbs for the following resource.|
### spec.allow.linux_desktop_labels
|Field|Type|Description|
|---|---|---|
|key|string||
|value|string||
### spec.allow.mcp
|Field|Type|Description|
@@ -999,6 +1029,9 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|kubernetes_labels_expression|string|KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.|
|kubernetes_resources|[][object](#specdenykubernetes_resources-items)|KubernetesResources is the Kubernetes Resources this Role grants access to.|
|kubernetes_users|[]string|KubeUsers is an optional kubernetes users to impersonate|
|linux_desktop_labels|[object](#specdenylinux_desktop_labels)|LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.|
|linux_desktop_labels_expression|string|LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.|
|linux_desktop_logins|[]string|LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.|
|logins|[]string|Logins is a list of *nix system logins.|
|mcp|[object](#specdenymcp)|MCPPermissions defines MCP servers related permissions.|
|node_labels|[object](#specdenynode_labels)|NodeLabels is a map of node labels (used to dynamically grant access to nodes).|
@@ -1117,6 +1150,13 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|namespace|string|Namespace is the resource namespace. It supports wildcards.|
|verbs|[]string|Verbs are the allowed Kubernetes verbs for the following resource.|
### spec.deny.linux_desktop_labels
|Field|Type|Description|
|---|---|---|
|key|string||
|value|string||
### spec.deny.mcp
|Field|Type|Description|
@@ -64,6 +64,9 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|kubernetes_labels_expression|string|KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.|
|kubernetes_resources|[][object](#specallowkubernetes_resources-items)|KubernetesResources is the Kubernetes Resources this Role grants access to.|
|kubernetes_users|[]string|KubeUsers is an optional kubernetes users to impersonate|
|linux_desktop_labels|[object](#specallowlinux_desktop_labels)|LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.|
|linux_desktop_labels_expression|string|LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.|
|linux_desktop_logins|[]string|LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.|
|logins|[]string|Logins is a list of *nix system logins.|
|mcp|[object](#specallowmcp)|MCPPermissions defines MCP servers related permissions.|
|node_labels|[object](#specallownode_labels)|NodeLabels is a map of node labels (used to dynamically grant access to nodes).|
@@ -182,6 +185,13 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|namespace|string|Namespace is the resource namespace. It supports wildcards.|
|verbs|[]string|Verbs are the allowed Kubernetes verbs for the following resource.|
### spec.allow.linux_desktop_labels
|Field|Type|Description|
|---|---|---|
|key|string||
|value|string||
### spec.allow.mcp
|Field|Type|Description|
@@ -341,6 +351,9 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|kubernetes_labels_expression|string|KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.|
|kubernetes_resources|[][object](#specdenykubernetes_resources-items)|KubernetesResources is the Kubernetes Resources this Role grants access to.|
|kubernetes_users|[]string|KubeUsers is an optional kubernetes users to impersonate|
|linux_desktop_labels|[object](#specdenylinux_desktop_labels)|LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.|
|linux_desktop_labels_expression|string|LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.|
|linux_desktop_logins|[]string|LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.|
|logins|[]string|Logins is a list of *nix system logins.|
|mcp|[object](#specdenymcp)|MCPPermissions defines MCP servers related permissions.|
|node_labels|[object](#specdenynode_labels)|NodeLabels is a map of node labels (used to dynamically grant access to nodes).|
@@ -459,6 +472,13 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|namespace|string|Namespace is the resource namespace. It supports wildcards.|
|verbs|[]string|Verbs are the allowed Kubernetes verbs for the following resource.|
### spec.deny.linux_desktop_labels
|Field|Type|Description|
|---|---|---|
|key|string||
|value|string||
### spec.deny.mcp
|Field|Type|Description|
@@ -64,6 +64,9 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|kubernetes_labels_expression|string|KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.|
|kubernetes_resources|[][object](#specallowkubernetes_resources-items)|KubernetesResources is the Kubernetes Resources this Role grants access to.|
|kubernetes_users|[]string|KubeUsers is an optional kubernetes users to impersonate|
|linux_desktop_labels|[object](#specallowlinux_desktop_labels)|LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.|
|linux_desktop_labels_expression|string|LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.|
|linux_desktop_logins|[]string|LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.|
|logins|[]string|Logins is a list of *nix system logins.|
|mcp|[object](#specallowmcp)|MCPPermissions defines MCP servers related permissions.|
|node_labels|[object](#specallownode_labels)|NodeLabels is a map of node labels (used to dynamically grant access to nodes).|
@@ -182,6 +185,13 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|namespace|string|Namespace is the resource namespace. It supports wildcards.|
|verbs|[]string|Verbs are the allowed Kubernetes verbs for the following resource.|
### spec.allow.linux_desktop_labels
|Field|Type|Description|
|---|---|---|
|key|string||
|value|string||
### spec.allow.mcp
|Field|Type|Description|
@@ -341,6 +351,9 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|kubernetes_labels_expression|string|KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.|
|kubernetes_resources|[][object](#specdenykubernetes_resources-items)|KubernetesResources is the Kubernetes Resources this Role grants access to.|
|kubernetes_users|[]string|KubeUsers is an optional kubernetes users to impersonate|
|linux_desktop_labels|[object](#specdenylinux_desktop_labels)|LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.|
|linux_desktop_labels_expression|string|LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.|
|linux_desktop_logins|[]string|LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.|
|logins|[]string|Logins is a list of *nix system logins.|
|mcp|[object](#specdenymcp)|MCPPermissions defines MCP servers related permissions.|
|node_labels|[object](#specdenynode_labels)|NodeLabels is a map of node labels (used to dynamically grant access to nodes).|
@@ -459,6 +472,13 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|namespace|string|Namespace is the resource namespace. It supports wildcards.|
|verbs|[]string|Verbs are the allowed Kubernetes verbs for the following resource.|
### spec.deny.linux_desktop_labels
|Field|Type|Description|
|---|---|---|
|key|string||
|value|string||
### spec.deny.mcp
|Field|Type|Description|
@@ -64,6 +64,9 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|kubernetes_labels_expression|string|KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.|
|kubernetes_resources|[][object](#specallowkubernetes_resources-items)|KubernetesResources is the Kubernetes Resources this Role grants access to.|
|kubernetes_users|[]string|KubeUsers is an optional kubernetes users to impersonate|
|linux_desktop_labels|[object](#specallowlinux_desktop_labels)|LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.|
|linux_desktop_labels_expression|string|LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.|
|linux_desktop_logins|[]string|LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.|
|logins|[]string|Logins is a list of *nix system logins.|
|mcp|[object](#specallowmcp)|MCPPermissions defines MCP servers related permissions.|
|node_labels|[object](#specallownode_labels)|NodeLabels is a map of node labels (used to dynamically grant access to nodes).|
@@ -182,6 +185,13 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|namespace|string|Namespace is the resource namespace. It supports wildcards.|
|verbs|[]string|Verbs are the allowed Kubernetes verbs for the following resource.|
### spec.allow.linux_desktop_labels
|Field|Type|Description|
|---|---|---|
|key|string||
|value|string||
### spec.allow.mcp
|Field|Type|Description|
@@ -341,6 +351,9 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|kubernetes_labels_expression|string|KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.|
|kubernetes_resources|[][object](#specdenykubernetes_resources-items)|KubernetesResources is the Kubernetes Resources this Role grants access to.|
|kubernetes_users|[]string|KubeUsers is an optional kubernetes users to impersonate|
|linux_desktop_labels|[object](#specdenylinux_desktop_labels)|LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.|
|linux_desktop_labels_expression|string|LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.|
|linux_desktop_logins|[]string|LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.|
|logins|[]string|Logins is a list of *nix system logins.|
|mcp|[object](#specdenymcp)|MCPPermissions defines MCP servers related permissions.|
|node_labels|[object](#specdenynode_labels)|NodeLabels is a map of node labels (used to dynamically grant access to nodes).|
@@ -459,6 +472,13 @@ resource, which you can apply after installing the Teleport Kubernetes operator.
|namespace|string|Namespace is the resource namespace. It supports wildcards.|
|verbs|[]string|Verbs are the allowed Kubernetes verbs for the following resource.|
### spec.deny.linux_desktop_labels
|Field|Type|Description|
|---|---|---|
|key|string||
|value|string||
### spec.deny.mcp
|Field|Type|Description|
@@ -52,6 +52,7 @@ Optional:
- `bot_instance_id` (String) BotInstanceID is the bot instance ID if this is a bot identity and is ignored otherwise.
- `device` (String) Device is the device ID of a trusted device. Requires Teleport Enterprise.
- `join_token` (String) JoinToken is the name of the join token used when this identity originally joined. This is only valid for bot identities, and cannot be used to target `token`-joined bots.
- `linux_desktop` (String) LinuxDesktop specifies the name of a Linux desktop.
- `login` (String) Login specifies the name of a local UNIX user.
- `mfa_device` (String) MFADevice specifies the UUID of a user MFA device.
- `role` (String) Role specifies the name of an RBAC role known to the root cluster. In remote clusters, this constraint is evaluated before translating to local roles.
@@ -83,6 +83,9 @@ Optional:
- `kubernetes_labels_expression` (String) KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.
- `kubernetes_resources` (Attributes List) KubernetesResources is the Kubernetes Resources this Role grants access to. (see [below for nested schema](#nested-schema-for-specallowkubernetes_resources))
- `kubernetes_users` (List of String) KubeUsers is an optional kubernetes users to impersonate
- `linux_desktop_labels` (Map of List of String) LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.
- `linux_desktop_labels_expression` (String) LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.
- `linux_desktop_logins` (List of String) LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.
- `logins` (List of String) Logins is a list of *nix system logins.
- `mcp` (Attributes) MCPPermissions defines MCP servers related permissions. (see [below for nested schema](#nested-schema-for-specallowmcp))
- `node_labels` (Map of List of String) NodeLabels is a map of node labels (used to dynamically grant access to nodes).
@@ -294,6 +297,9 @@ Optional:
- `kubernetes_labels_expression` (String) KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.
- `kubernetes_resources` (Attributes List) KubernetesResources is the Kubernetes Resources this Role grants access to. (see [below for nested schema](#nested-schema-for-specdenykubernetes_resources))
- `kubernetes_users` (List of String) KubeUsers is an optional kubernetes users to impersonate
- `linux_desktop_labels` (Map of List of String) LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.
- `linux_desktop_labels_expression` (String) LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.
- `linux_desktop_logins` (List of String) LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.
- `logins` (List of String) Logins is a list of *nix system logins.
- `mcp` (Attributes) MCPPermissions defines MCP servers related permissions. (see [below for nested schema](#nested-schema-for-specdenymcp))
- `node_labels` (Map of List of String) NodeLabels is a map of node labels (used to dynamically grant access to nodes).
@@ -71,6 +71,7 @@ Optional:
- `bot_instance_id` (String) BotInstanceID is the bot instance ID if this is a bot identity and is ignored otherwise.
- `device` (String) Device is the device ID of a trusted device. Requires Teleport Enterprise.
- `join_token` (String) JoinToken is the name of the join token used when this identity originally joined. This is only valid for bot identities, and cannot be used to target `token`-joined bots.
- `linux_desktop` (String) LinuxDesktop specifies the name of a Linux desktop.
- `login` (String) Login specifies the name of a local UNIX user.
- `mfa_device` (String) MFADevice specifies the UUID of a user MFA device.
- `role` (String) Role specifies the name of an RBAC role known to the root cluster. In remote clusters, this constraint is evaluated before translating to local roles.
@@ -145,6 +145,9 @@ Optional:
- `kubernetes_labels_expression` (String) KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.
- `kubernetes_resources` (Attributes List) KubernetesResources is the Kubernetes Resources this Role grants access to. (see [below for nested schema](#nested-schema-for-specallowkubernetes_resources))
- `kubernetes_users` (List of String) KubeUsers is an optional kubernetes users to impersonate
- `linux_desktop_labels` (Map of List of String) LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.
- `linux_desktop_labels_expression` (String) LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.
- `linux_desktop_logins` (List of String) LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.
- `logins` (List of String) Logins is a list of *nix system logins.
- `mcp` (Attributes) MCPPermissions defines MCP servers related permissions. (see [below for nested schema](#nested-schema-for-specallowmcp))
- `node_labels` (Map of List of String) NodeLabels is a map of node labels (used to dynamically grant access to nodes).
@@ -356,6 +359,9 @@ Optional:
- `kubernetes_labels_expression` (String) KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters.
- `kubernetes_resources` (Attributes List) KubernetesResources is the Kubernetes Resources this Role grants access to. (see [below for nested schema](#nested-schema-for-specdenykubernetes_resources))
- `kubernetes_users` (List of String) KubeUsers is an optional kubernetes users to impersonate
- `linux_desktop_labels` (Map of List of String) LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.
- `linux_desktop_labels_expression` (String) LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.
- `linux_desktop_logins` (List of String) LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.
- `logins` (List of String) Logins is a list of *nix system logins.
- `mcp` (Attributes) MCPPermissions defines MCP servers related permissions. (see [below for nested schema](#nested-schema-for-specdenymcp))
- `node_labels` (Map of List of String) NodeLabels is a map of node labels (used to dynamically grant access to nodes).
@@ -69,6 +69,9 @@ spec:
this identity originally joined. This is only valid for bot
identities, and cannot be used to target `token`-joined bots.
type: string
linux_desktop:
description: LinuxDesktop specifies the name of a Linux desktop.
type: string
login:
description: Login specifies the name of a local UNIX user.
type: string
@@ -308,6 +308,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -935,6 +952,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -1864,6 +1898,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -2491,6 +2542,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -311,6 +311,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -938,6 +955,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -311,6 +311,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -938,6 +955,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -311,6 +311,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -938,6 +955,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
+21 -7
View File
@@ -204,6 +204,8 @@ const (
//
// PostHog property value: "node.openssh_ec2_ice"
ResourceKind_RESOURCE_KIND_NODE_OPENSSH_EICE ResourceKind = 7
// PostHog property value: "linux_desktop"
ResourceKind_RESOURCE_KIND_LINUX_DESKTOP ResourceKind = 8
)
// Enum value maps for ResourceKind.
@@ -217,6 +219,7 @@ var (
5: "RESOURCE_KIND_WINDOWS_DESKTOP",
6: "RESOURCE_KIND_NODE_OPENSSH",
7: "RESOURCE_KIND_NODE_OPENSSH_EICE",
8: "RESOURCE_KIND_LINUX_DESKTOP",
}
ResourceKind_value = map[string]int32{
"RESOURCE_KIND_UNSPECIFIED": 0,
@@ -227,6 +230,7 @@ var (
"RESOURCE_KIND_WINDOWS_DESKTOP": 5,
"RESOURCE_KIND_NODE_OPENSSH": 6,
"RESOURCE_KIND_NODE_OPENSSH_EICE": 7,
"RESOURCE_KIND_LINUX_DESKTOP": 8,
}
)
@@ -421,8 +425,10 @@ type UserActivityRecord struct {
// counter of free-text session summary search queries submitted by this user
// where the request included filters.
SessionSummarySearchQueriesWithFilters uint64 `protobuf:"varint,28,opt,name=session_summary_search_queries_with_filters,json=sessionSummarySearchQueriesWithFilters,proto3" json:"session_summary_search_queries_with_filters,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
// counter of linux.desktop.session.start events
LinuxDesktopSessions uint64 `protobuf:"varint,29,opt,name=linux_desktop_sessions,json=linuxDesktopSessions,proto3" json:"linux_desktop_sessions,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UserActivityRecord) Reset() {
@@ -652,6 +658,13 @@ func (x *UserActivityRecord) GetSessionSummarySearchQueriesWithFilters() uint64
return 0
}
func (x *UserActivityRecord) GetLinuxDesktopSessions() uint64 {
if x != nil {
return x.LinuxDesktopSessions
}
return 0
}
type ResourcePresenceReport struct {
state protoimpl.MessageState `protogen:"open.v1"`
// randomly generated UUID for this specific report, 16 bytes (in string order)
@@ -1640,8 +1653,7 @@ const file_prehog_v1_teleport_proto_rawDesc = "" +
"\x0freporter_hostid\x18\x03 \x01(\fR\x0ereporterHostid\x129\n" +
"\n" +
"start_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tstartTime\x127\n" +
"\arecords\x18\x05 \x03(\v2\x1d.prehog.v1.UserActivityRecordR\arecords\"\xed\n" +
"\n" +
"\arecords\x18\x05 \x03(\v2\x1d.prehog.v1.UserActivityRecordR\arecords\"\xa3\v\n" +
"\x12UserActivityRecord\x12\x1b\n" +
"\tuser_name\x18\x01 \x01(\fR\buserName\x120\n" +
"\tuser_kind\x18\x0e \x01(\x0e2\x13.prehog.v1.UserKindR\buserKind\x12\x16\n" +
@@ -1674,7 +1686,8 @@ const file_prehog_v1_teleport_proto_rawDesc = "" +
"\x1asession_summaries_accessed\x18\x19 \x03(\v2).prehog.v1.SessionSummariesAccessedRecordR\x18sessionSummariesAccessed\x120\n" +
"\x14access_graph_queries\x18\x1a \x01(\x04R\x12accessGraphQueries\x12C\n" +
"\x1esession_summary_search_queries\x18\x1b \x01(\x04R\x1bsessionSummarySearchQueries\x12[\n" +
"+session_summary_search_queries_with_filters\x18\x1c \x01(\x04R&sessionSummarySearchQueriesWithFilters\"\x9b\x02\n" +
"+session_summary_search_queries_with_filters\x18\x1c \x01(\x04R&sessionSummarySearchQueriesWithFilters\x124\n" +
"\x16linux_desktop_sessions\x18\x1d \x01(\x04R\x14linuxDesktopSessions\"\x9b\x02\n" +
"\x16ResourcePresenceReport\x12\x1f\n" +
"\vreport_uuid\x18\x01 \x01(\fR\n" +
"reportUuid\x12!\n" +
@@ -1758,7 +1771,7 @@ const file_prehog_v1_teleport_proto_rawDesc = "" +
"\x0fUSER_ORIGIN_SSO\x10\x02\x12\x14\n" +
"\x10USER_ORIGIN_OKTA\x10\x03\x12\x14\n" +
"\x10USER_ORIGIN_SCIM\x10\x04\x12\x17\n" +
"\x13USER_ORIGIN_ENTRAID\x10\x05*\x87\x02\n" +
"\x13USER_ORIGIN_ENTRAID\x10\x05*\xa8\x02\n" +
"\fResourceKind\x12\x1d\n" +
"\x19RESOURCE_KIND_UNSPECIFIED\x10\x00\x12\x16\n" +
"\x12RESOURCE_KIND_NODE\x10\x01\x12\x1c\n" +
@@ -1767,7 +1780,8 @@ const file_prehog_v1_teleport_proto_rawDesc = "" +
"\x17RESOURCE_KIND_DB_SERVER\x10\x04\x12!\n" +
"\x1dRESOURCE_KIND_WINDOWS_DESKTOP\x10\x05\x12\x1e\n" +
"\x1aRESOURCE_KIND_NODE_OPENSSH\x10\x06\x12#\n" +
"\x1fRESOURCE_KIND_NODE_OPENSSH_EICE\x10\a2\x7f\n" +
"\x1fRESOURCE_KIND_NODE_OPENSSH_EICE\x10\a\x12\x1f\n" +
"\x1bRESOURCE_KIND_LINUX_DESKTOP\x10\b2\x7f\n" +
"\x18TeleportReportingService\x12c\n" +
"\x12SubmitUsageReports\x12$.prehog.v1.SubmitUsageReportsRequest\x1a%.prehog.v1.SubmitUsageReportsResponse\"\x00B\xa6\x01\n" +
"\rcom.prehog.v1B\rTeleportProtoP\x01ZAgithub.com/gravitational/teleport/gen/proto/go/prehog/v1;prehogv1\xa2\x02\x03PXX\xaa\x02\tPrehog.V1\xca\x02\tPrehog\\V1\xe2\x02\x15Prehog\\V1\\GPBMetadata\xea\x02\n" +
+7 -2
View File
@@ -135,6 +135,8 @@ const (
//
// PostHog property value: "node.openssh_ec2_ice"
ResourceKind_RESOURCE_KIND_NODE_OPENSSH_EICE ResourceKind = 7
// PostHog property value: "linux_desktop"
ResourceKind_RESOURCE_KIND_LINUX_DESKTOP ResourceKind = 8
)
// Enum value maps for ResourceKind.
@@ -148,6 +150,7 @@ var (
5: "RESOURCE_KIND_WINDOWS_DESKTOP",
6: "RESOURCE_KIND_NODE_OPENSSH",
7: "RESOURCE_KIND_NODE_OPENSSH_EICE",
8: "RESOURCE_KIND_LINUX_DESKTOP",
}
ResourceKind_value = map[string]int32{
"RESOURCE_KIND_UNSPECIFIED": 0,
@@ -158,6 +161,7 @@ var (
"RESOURCE_KIND_WINDOWS_DESKTOP": 5,
"RESOURCE_KIND_NODE_OPENSSH": 6,
"RESOURCE_KIND_NODE_OPENSSH_EICE": 7,
"RESOURCE_KIND_LINUX_DESKTOP": 8,
}
)
@@ -13503,7 +13507,7 @@ const file_prehog_v1alpha_teleport_proto_rawDesc = "" +
"\x0fUSER_ORIGIN_SSO\x10\x02\x12\x14\n" +
"\x10USER_ORIGIN_OKTA\x10\x03\x12\x14\n" +
"\x10USER_ORIGIN_SCIM\x10\x04\x12\x17\n" +
"\x13USER_ORIGIN_ENTRAID\x10\x05*\x87\x02\n" +
"\x13USER_ORIGIN_ENTRAID\x10\x05*\xa8\x02\n" +
"\fResourceKind\x12\x1d\n" +
"\x19RESOURCE_KIND_UNSPECIFIED\x10\x00\x12\x16\n" +
"\x12RESOURCE_KIND_NODE\x10\x01\x12\x1c\n" +
@@ -13512,7 +13516,8 @@ const file_prehog_v1alpha_teleport_proto_rawDesc = "" +
"\x17RESOURCE_KIND_DB_SERVER\x10\x04\x12!\n" +
"\x1dRESOURCE_KIND_WINDOWS_DESKTOP\x10\x05\x12\x1e\n" +
"\x1aRESOURCE_KIND_NODE_OPENSSH\x10\x06\x12#\n" +
"\x1fRESOURCE_KIND_NODE_OPENSSH_EICE\x10\a*c\n" +
"\x1fRESOURCE_KIND_NODE_OPENSSH_EICE\x10\a\x12\x1f\n" +
"\x1bRESOURCE_KIND_LINUX_DESKTOP\x10\b*c\n" +
"\bUserKind\x12\x19\n" +
"\x15USER_KIND_UNSPECIFIED\x10\x00\x12\x13\n" +
"\x0fUSER_KIND_HUMAN\x10\x01\x12\x11\n" +
+22 -2
View File
@@ -265,6 +265,12 @@ export interface UserActivityRecord {
* @generated from protobuf field: uint64 session_summary_search_queries_with_filters = 28;
*/
sessionSummarySearchQueriesWithFilters: bigint;
/**
* counter of linux.desktop.session.start events
*
* @generated from protobuf field: uint64 linux_desktop_sessions = 29;
*/
linuxDesktopSessions: bigint;
}
/**
* @generated from protobuf message prehog.v1.ResourcePresenceReport
@@ -849,7 +855,13 @@ export enum ResourceKind {
*
* @generated from protobuf enum value: RESOURCE_KIND_NODE_OPENSSH_EICE = 7;
*/
NODE_OPENSSH_EICE = 7
NODE_OPENSSH_EICE = 7,
/**
* PostHog property value: "linux_desktop"
*
* @generated from protobuf enum value: RESOURCE_KIND_LINUX_DESKTOP = 8;
*/
LINUX_DESKTOP = 8
}
// @generated message type with reflection information, may provide speed optimized methods
class UserActivityReport$Type extends MessageType<UserActivityReport> {
@@ -960,7 +972,8 @@ class UserActivityRecord$Type extends MessageType<UserActivityRecord> {
{ no: 25, name: "session_summaries_accessed", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => SessionSummariesAccessedRecord },
{ no: 26, name: "access_graph_queries", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 27, name: "session_summary_search_queries", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 28, name: "session_summary_search_queries_with_filters", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
{ no: 28, name: "session_summary_search_queries_with_filters", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 29, name: "linux_desktop_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
]);
}
create(value?: PartialMessage<UserActivityRecord>): UserActivityRecord {
@@ -993,6 +1006,7 @@ class UserActivityRecord$Type extends MessageType<UserActivityRecord> {
message.accessGraphQueries = 0n;
message.sessionSummarySearchQueries = 0n;
message.sessionSummarySearchQueriesWithFilters = 0n;
message.linuxDesktopSessions = 0n;
if (value !== undefined)
reflectionMergePartial<UserActivityRecord>(this, message, value);
return message;
@@ -1086,6 +1100,9 @@ class UserActivityRecord$Type extends MessageType<UserActivityRecord> {
case /* uint64 session_summary_search_queries_with_filters */ 28:
message.sessionSummarySearchQueriesWithFilters = reader.uint64().toBigInt();
break;
case /* uint64 linux_desktop_sessions */ 29:
message.linuxDesktopSessions = reader.uint64().toBigInt();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -1182,6 +1199,9 @@ class UserActivityRecord$Type extends MessageType<UserActivityRecord> {
/* uint64 session_summary_search_queries_with_filters = 28; */
if (message.sessionSummarySearchQueriesWithFilters !== 0n)
writer.tag(28, WireType.Varint).uint64(message.sessionSummarySearchQueriesWithFilters);
/* uint64 linux_desktop_sessions = 29; */
if (message.linuxDesktopSessions !== 0n)
writer.tag(29, WireType.Varint).uint64(message.linuxDesktopSessions);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
+7 -1
View File
@@ -4583,7 +4583,13 @@ export enum ResourceKind {
*
* @generated from protobuf enum value: RESOURCE_KIND_NODE_OPENSSH_EICE = 7;
*/
NODE_OPENSSH_EICE = 7
NODE_OPENSSH_EICE = 7,
/**
* PostHog property value: "linux_desktop"
*
* @generated from protobuf enum value: RESOURCE_KIND_LINUX_DESKTOP = 8;
*/
LINUX_DESKTOP = 8
}
/**
* The kind of user a given username refers to. Usernames should always refer to
+144 -4
View File
@@ -67,9 +67,10 @@ export interface ServerHello {
*/
directoryRemoveSupported: boolean;
/**
* Field number 5 matches master. v18 doesn't use fields 3 and 4
* (directory_remove_supported and sessions on master).
*
* @generated from protobuf field: repeated teleport.desktop.v1.SessionIdentifier sessions = 4;
*/
sessions: SessionIdentifier[];
/**
* @generated from protobuf field: bool hidpi_supported = 5;
*/
hidpiSupported: boolean;
@@ -78,6 +79,28 @@ export interface ServerHello {
*/
multidirectorySharingSupported: boolean;
}
/**
* Used to identify sessions available to and selected by users
*
* @generated from protobuf message teleport.desktop.v1.SessionIdentifier
*/
export interface SessionIdentifier {
/**
* @generated from protobuf field: string name = 1;
*/
name: string;
}
/**
* Sent by client to select one of available sessions
*
* @generated from protobuf message teleport.desktop.v1.SessionSelection
*/
export interface SessionSelection {
/**
* @generated from protobuf field: teleport.desktop.v1.SessionIdentifier session = 1;
*/
session?: SessionIdentifier;
}
/**
* Defines the boundaries that PNG frame will update.
* Used for composition on PNG frame messages only.
@@ -891,6 +914,12 @@ export interface Envelope {
* @generated from protobuf field: teleport.desktop.v1.SharedDirectoryRemove shared_directory_remove = 21;
*/
sharedDirectoryRemove: SharedDirectoryRemove;
} | {
oneofKind: "sessionSelection";
/**
* @generated from protobuf field: teleport.desktop.v1.SessionSelection session_selection = 22;
*/
sessionSelection: SessionSelection;
} | {
oneofKind: undefined;
};
@@ -1048,6 +1077,7 @@ class ServerHello$Type extends MessageType<ServerHello> {
{ no: 1, name: "activation_spec", kind: "message", T: () => ConnectionActivated },
{ no: 2, name: "clipboard_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 3, name: "directory_remove_supported", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 4, name: "sessions", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => SessionIdentifier },
{ no: 5, name: "hidpi_supported", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 6, name: "multidirectory_sharing_supported", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
]);
@@ -1056,6 +1086,7 @@ class ServerHello$Type extends MessageType<ServerHello> {
const message = globalThis.Object.create((this.messagePrototype!));
message.clipboardEnabled = false;
message.directoryRemoveSupported = false;
message.sessions = [];
message.hidpiSupported = false;
message.multidirectorySharingSupported = false;
if (value !== undefined)
@@ -1076,6 +1107,9 @@ class ServerHello$Type extends MessageType<ServerHello> {
case /* bool directory_remove_supported */ 3:
message.directoryRemoveSupported = reader.bool();
break;
case /* repeated teleport.desktop.v1.SessionIdentifier sessions */ 4:
message.sessions.push(SessionIdentifier.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* bool hidpi_supported */ 5:
message.hidpiSupported = reader.bool();
break;
@@ -1103,6 +1137,9 @@ class ServerHello$Type extends MessageType<ServerHello> {
/* bool directory_remove_supported = 3; */
if (message.directoryRemoveSupported !== false)
writer.tag(3, WireType.Varint).bool(message.directoryRemoveSupported);
/* repeated teleport.desktop.v1.SessionIdentifier sessions = 4; */
for (let i = 0; i < message.sessions.length; i++)
SessionIdentifier.internalBinaryWrite(message.sessions[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* bool hidpi_supported = 5; */
if (message.hidpiSupported !== false)
writer.tag(5, WireType.Varint).bool(message.hidpiSupported);
@@ -1120,6 +1157,99 @@ class ServerHello$Type extends MessageType<ServerHello> {
*/
export const ServerHello = new ServerHello$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SessionIdentifier$Type extends MessageType<SessionIdentifier> {
constructor() {
super("teleport.desktop.v1.SessionIdentifier", [
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<SessionIdentifier>): SessionIdentifier {
const message = globalThis.Object.create((this.messagePrototype!));
message.name = "";
if (value !== undefined)
reflectionMergePartial<SessionIdentifier>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SessionIdentifier): SessionIdentifier {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string name */ 1:
message.name = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: SessionIdentifier, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string name = 1; */
if (message.name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.name);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message teleport.desktop.v1.SessionIdentifier
*/
export const SessionIdentifier = new SessionIdentifier$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SessionSelection$Type extends MessageType<SessionSelection> {
constructor() {
super("teleport.desktop.v1.SessionSelection", [
{ no: 1, name: "session", kind: "message", T: () => SessionIdentifier }
]);
}
create(value?: PartialMessage<SessionSelection>): SessionSelection {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<SessionSelection>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SessionSelection): SessionSelection {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* teleport.desktop.v1.SessionIdentifier session */ 1:
message.session = SessionIdentifier.internalBinaryRead(reader, reader.uint32(), options, message.session);
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: SessionSelection, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* teleport.desktop.v1.SessionIdentifier session = 1; */
if (message.session)
SessionIdentifier.internalBinaryWrite(message.session, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message teleport.desktop.v1.SessionSelection
*/
export const SessionSelection = new SessionSelection$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Rectangle$Type extends MessageType<Rectangle> {
constructor() {
super("teleport.desktop.v1.Rectangle", [
@@ -3316,7 +3446,8 @@ class Envelope$Type extends MessageType<Envelope> {
{ no: 18, name: "shared_directory_response", kind: "message", oneof: "payload", T: () => SharedDirectoryResponse },
{ no: 19, name: "latency_stats", kind: "message", oneof: "payload", T: () => LatencyStats },
{ no: 20, name: "ping", kind: "message", oneof: "payload", T: () => Ping },
{ no: 21, name: "shared_directory_remove", kind: "message", oneof: "payload", T: () => SharedDirectoryRemove }
{ no: 21, name: "shared_directory_remove", kind: "message", oneof: "payload", T: () => SharedDirectoryRemove },
{ no: 22, name: "session_selection", kind: "message", oneof: "payload", T: () => SessionSelection }
]);
}
create(value?: PartialMessage<Envelope>): Envelope {
@@ -3457,6 +3588,12 @@ class Envelope$Type extends MessageType<Envelope> {
sharedDirectoryRemove: SharedDirectoryRemove.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).sharedDirectoryRemove)
};
break;
case /* teleport.desktop.v1.SessionSelection session_selection */ 22:
message.payload = {
oneofKind: "sessionSelection",
sessionSelection: SessionSelection.internalBinaryRead(reader, reader.uint32(), options, (message.payload as any).sessionSelection)
};
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -3532,6 +3669,9 @@ class Envelope$Type extends MessageType<Envelope> {
/* teleport.desktop.v1.SharedDirectoryRemove shared_directory_remove = 21; */
if (message.payload.oneofKind === "sharedDirectoryRemove")
SharedDirectoryRemove.internalBinaryWrite(message.payload.sharedDirectoryRemove, writer.tag(21, WireType.LengthDelimited).fork(), options).join();
/* teleport.desktop.v1.SessionSelection session_selection = 22; */
if (message.payload.oneofKind === "sessionSelection")
SessionSelection.internalBinaryWrite(message.payload.sessionSelection, writer.tag(22, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
+1
View File
@@ -169,6 +169,7 @@ require (
github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438
github.com/jackc/pgx/v5 v5.9.2
github.com/jcmturner/gokrb5/v8 v8.4.4
github.com/jezek/xgb v1.3.1
github.com/johannesboyne/gofakes3 v0.0.0-20250916175020-ebf3e50324d3
github.com/jonboulle/clockwork v0.5.0
github.com/joshlf/go-acl v0.0.0-20200411065538-eae00ae38531
+2
View File
@@ -934,6 +934,8 @@ github.com/jellydator/ttlcache/v3 v3.4.0 h1:YS4P125qQS0tNhtL6aeYkheEaB/m8HCqdMMP
github.com/jellydator/ttlcache/v3 v3.4.0/go.mod h1:Hw9EgjymziQD3yGsQdf1FqFdpp7YjFMd4Srg5EJlgD4=
github.com/jeremija/gosubmit v0.2.8 h1:mmSITBz9JxVtu8eqbN+zmmwX7Ij2RidQxhcwRVI4wqA=
github.com/jeremija/gosubmit v0.2.8/go.mod h1:Ui+HS073lCFREXBbdfrJzMB57OI/bdxTiLtrDHHhFPI=
github.com/jezek/xgb v1.3.1 h1:NQCAEfQyzN+3RjWUSHBuVIxQcy2YfG3/mNvKfs/0rEg=
github.com/jezek/xgb v1.3.1/go.mod h1:nrhwO0FX/enq75I7Y7G8iN1ubpSGZEiA3v9e9GyRFlk=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
github.com/jmhodges/clock v1.2.0 h1:eq4kys+NI0PLngzaHEe7AmPT90XMGIEySD1JfV1PDIs=
@@ -69,6 +69,9 @@ spec:
this identity originally joined. This is only valid for bot
identities, and cannot be used to target `token`-joined bots.
type: string
linux_desktop:
description: LinuxDesktop specifies the name of a Linux desktop.
type: string
login:
description: Login specifies the name of a local UNIX user.
type: string
@@ -308,6 +308,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -935,6 +952,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -1864,6 +1898,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -2491,6 +2542,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -311,6 +311,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -938,6 +955,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -311,6 +311,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -938,6 +955,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -311,6 +311,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
@@ -938,6 +955,23 @@ spec:
type: string
nullable: true
type: array
linux_desktop_labels:
additionalProperties:
x-kubernetes-preserve-unknown-fields: true
description: LinuxDesktopLabels are used in the RBAC system to
allow/deny access to Linux desktops.
type: object
linux_desktop_labels_expression:
description: LinuxDesktopLabelsExpression is a predicate expression
used to allow/deny access to Linux desktops.
type: string
linux_desktop_logins:
description: LinuxDesktopLogins is a list of desktop login names
allowed/denied for Linux desktops.
items:
type: string
nullable: true
type: array
logins:
description: Logins is a list of *nix system logins.
items:
+1
View File
@@ -310,6 +310,7 @@ require (
github.com/jcmturner/goidentity/v6 v6.0.1 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/jezek/xgb v1.3.1 // indirect
github.com/jmoiron/sqlx v1.4.0 // indirect
github.com/josharian/native v1.1.0 // indirect
github.com/joshlf/go-acl v0.0.0-20200411065538-eae00ae38531 // indirect
+2
View File
@@ -893,6 +893,8 @@ github.com/jellydator/ttlcache/v3 v3.4.0 h1:YS4P125qQS0tNhtL6aeYkheEaB/m8HCqdMMP
github.com/jellydator/ttlcache/v3 v3.4.0/go.mod h1:Hw9EgjymziQD3yGsQdf1FqFdpp7YjFMd4Srg5EJlgD4=
github.com/jeremija/gosubmit v0.2.8 h1:mmSITBz9JxVtu8eqbN+zmmwX7Ij2RidQxhcwRVI4wqA=
github.com/jeremija/gosubmit v0.2.8/go.mod h1:Ui+HS073lCFREXBbdfrJzMB57OI/bdxTiLtrDHHhFPI=
github.com/jezek/xgb v1.3.1 h1:NQCAEfQyzN+3RjWUSHBuVIxQcy2YfG3/mNvKfs/0rEg=
github.com/jezek/xgb v1.3.1/go.mod h1:nrhwO0FX/enq75I7Y7G8iN1ubpSGZEiA3v9e9GyRFlk=
github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94=
github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
+1
View File
@@ -309,6 +309,7 @@ require (
github.com/jcmturner/goidentity/v6 v6.0.1 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/jezek/xgb v1.3.1 // indirect
github.com/jmoiron/sqlx v1.4.0 // indirect
github.com/josharian/native v1.1.0 // indirect
github.com/joshlf/go-acl v0.0.0-20200411065538-eae00ae38531 // indirect
+2
View File
@@ -1015,6 +1015,8 @@ github.com/jellydator/ttlcache/v3 v3.4.0/go.mod h1:Hw9EgjymziQD3yGsQdf1FqFdpp7Yj
github.com/jeremija/gosubmit v0.2.8 h1:mmSITBz9JxVtu8eqbN+zmmwX7Ij2RidQxhcwRVI4wqA=
github.com/jeremija/gosubmit v0.2.8/go.mod h1:Ui+HS073lCFREXBbdfrJzMB57OI/bdxTiLtrDHHhFPI=
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
github.com/jezek/xgb v1.3.1 h1:NQCAEfQyzN+3RjWUSHBuVIxQcy2YfG3/mNvKfs/0rEg=
github.com/jezek/xgb v1.3.1/go.mod h1:nrhwO0FX/enq75I7Y7G8iN1ubpSGZEiA3v9e9GyRFlk=
github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74=
github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94=
github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8=
@@ -3118,6 +3118,20 @@ func GenSchemaRoleV6(ctx context.Context) (github_com_hashicorp_terraform_plugin
Optional: true,
Type: github_com_hashicorp_terraform_plugin_framework_types.ListType{ElemType: github_com_hashicorp_terraform_plugin_framework_types.StringType},
},
"linux_desktop_labels": GenSchemaLabels(ctx, github_com_hashicorp_terraform_plugin_framework_tfsdk.Attribute{
Description: "LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.",
Optional: true,
}),
"linux_desktop_labels_expression": {
Description: "LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.",
Optional: true,
Type: github_com_hashicorp_terraform_plugin_framework_types.StringType,
},
"linux_desktop_logins": {
Description: "LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.",
Optional: true,
Type: github_com_hashicorp_terraform_plugin_framework_types.ListType{ElemType: github_com_hashicorp_terraform_plugin_framework_types.StringType},
},
"logins": {
Description: "Logins is a list of *nix system logins.",
Optional: true,
@@ -3640,6 +3654,20 @@ func GenSchemaRoleV6(ctx context.Context) (github_com_hashicorp_terraform_plugin
Optional: true,
Type: github_com_hashicorp_terraform_plugin_framework_types.ListType{ElemType: github_com_hashicorp_terraform_plugin_framework_types.StringType},
},
"linux_desktop_labels": GenSchemaLabels(ctx, github_com_hashicorp_terraform_plugin_framework_tfsdk.Attribute{
Description: "LinuxDesktopLabels are used in the RBAC system to allow/deny access to Linux desktops.",
Optional: true,
}),
"linux_desktop_labels_expression": {
Description: "LinuxDesktopLabelsExpression is a predicate expression used to allow/deny access to Linux desktops.",
Optional: true,
Type: github_com_hashicorp_terraform_plugin_framework_types.StringType,
},
"linux_desktop_logins": {
Description: "LinuxDesktopLogins is a list of desktop login names allowed/denied for Linux desktops.",
Optional: true,
Type: github_com_hashicorp_terraform_plugin_framework_types.ListType{ElemType: github_com_hashicorp_terraform_plugin_framework_types.StringType},
},
"logins": {
Description: "Logins is a list of *nix system logins.",
Optional: true,
@@ -5363,6 +5391,11 @@ func GenSchemaLockV2(ctx context.Context) (github_com_hashicorp_terraform_plugin
Optional: true,
Type: github_com_hashicorp_terraform_plugin_framework_types.StringType,
},
"linux_desktop": {
Description: "LinuxDesktop specifies the name of a Linux desktop.",
Optional: true,
Type: github_com_hashicorp_terraform_plugin_framework_types.StringType,
},
"login": {
Description: "Login specifies the name of a local UNIX user.",
Optional: true,
@@ -32809,6 +32842,57 @@ func CopyRoleV6FromTerraform(_ context.Context, tf github_com_hashicorp_terrafor
}
}
}
{
a, ok := tf.Attrs["linux_desktop_logins"]
if !ok {
diags.Append(attrReadMissingDiag{"RoleV6.Spec.Allow.LinuxDesktopLogins"})
} else {
v, ok := a.(github_com_hashicorp_terraform_plugin_framework_types.List)
if !ok {
diags.Append(attrReadConversionFailureDiag{"RoleV6.Spec.Allow.LinuxDesktopLogins", "github.com/hashicorp/terraform-plugin-framework/types.List"})
} else {
obj.LinuxDesktopLogins = make([]string, len(v.Elems))
if !v.Null && !v.Unknown {
for k, a := range v.Elems {
v, ok := a.(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
diags.Append(attrReadConversionFailureDiag{"RoleV6.Spec.Allow.LinuxDesktopLogins", "github_com_hashicorp_terraform_plugin_framework_types.String"})
} else {
var t string
if !v.Null && !v.Unknown {
t = string(v.Value)
}
obj.LinuxDesktopLogins[k] = t
}
}
}
}
}
}
{
a, ok := tf.Attrs["linux_desktop_labels"]
if !ok {
diags.Append(attrReadMissingDiag{"RoleV6.Spec.Allow.LinuxDesktopLabels"})
}
CopyFromLabels(diags, a, &obj.LinuxDesktopLabels)
}
{
a, ok := tf.Attrs["linux_desktop_labels_expression"]
if !ok {
diags.Append(attrReadMissingDiag{"RoleV6.Spec.Allow.LinuxDesktopLabelsExpression"})
} else {
v, ok := a.(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
diags.Append(attrReadConversionFailureDiag{"RoleV6.Spec.Allow.LinuxDesktopLabelsExpression", "github.com/hashicorp/terraform-plugin-framework/types.String"})
} else {
var t string
if !v.Null && !v.Unknown {
t = string(v.Value)
}
obj.LinuxDesktopLabelsExpression = t
}
}
}
{
a, ok := tf.Attrs["beam_labels"]
if !ok {
@@ -34957,6 +35041,57 @@ func CopyRoleV6FromTerraform(_ context.Context, tf github_com_hashicorp_terrafor
}
}
}
{
a, ok := tf.Attrs["linux_desktop_logins"]
if !ok {
diags.Append(attrReadMissingDiag{"RoleV6.Spec.Deny.LinuxDesktopLogins"})
} else {
v, ok := a.(github_com_hashicorp_terraform_plugin_framework_types.List)
if !ok {
diags.Append(attrReadConversionFailureDiag{"RoleV6.Spec.Deny.LinuxDesktopLogins", "github.com/hashicorp/terraform-plugin-framework/types.List"})
} else {
obj.LinuxDesktopLogins = make([]string, len(v.Elems))
if !v.Null && !v.Unknown {
for k, a := range v.Elems {
v, ok := a.(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
diags.Append(attrReadConversionFailureDiag{"RoleV6.Spec.Deny.LinuxDesktopLogins", "github_com_hashicorp_terraform_plugin_framework_types.String"})
} else {
var t string
if !v.Null && !v.Unknown {
t = string(v.Value)
}
obj.LinuxDesktopLogins[k] = t
}
}
}
}
}
}
{
a, ok := tf.Attrs["linux_desktop_labels"]
if !ok {
diags.Append(attrReadMissingDiag{"RoleV6.Spec.Deny.LinuxDesktopLabels"})
}
CopyFromLabels(diags, a, &obj.LinuxDesktopLabels)
}
{
a, ok := tf.Attrs["linux_desktop_labels_expression"]
if !ok {
diags.Append(attrReadMissingDiag{"RoleV6.Spec.Deny.LinuxDesktopLabelsExpression"})
} else {
v, ok := a.(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
diags.Append(attrReadConversionFailureDiag{"RoleV6.Spec.Deny.LinuxDesktopLabelsExpression", "github.com/hashicorp/terraform-plugin-framework/types.String"})
} else {
var t string
if !v.Null && !v.Unknown {
t = string(v.Value)
}
obj.LinuxDesktopLabelsExpression = t
}
}
}
{
a, ok := tf.Attrs["beam_labels"]
if !ok {
@@ -39972,6 +40107,90 @@ func CopyRoleV6ToTerraform(ctx context.Context, obj *github_com_gravitational_te
}
}
}
{
a, ok := tf.AttrTypes["linux_desktop_logins"]
if !ok {
diags.Append(attrWriteMissingDiag{"RoleV6.Spec.Allow.LinuxDesktopLogins"})
} else {
o, ok := a.(github_com_hashicorp_terraform_plugin_framework_types.ListType)
if !ok {
diags.Append(attrWriteConversionFailureDiag{"RoleV6.Spec.Allow.LinuxDesktopLogins", "github.com/hashicorp/terraform-plugin-framework/types.ListType"})
} else {
c, ok := tf.Attrs["linux_desktop_logins"].(github_com_hashicorp_terraform_plugin_framework_types.List)
if !ok {
c = github_com_hashicorp_terraform_plugin_framework_types.List{
ElemType: o.ElemType,
Elems: make([]github_com_hashicorp_terraform_plugin_framework_attr.Value, len(obj.LinuxDesktopLogins)),
Null: true,
}
} else {
if c.Elems == nil {
c.Elems = make([]github_com_hashicorp_terraform_plugin_framework_attr.Value, len(obj.LinuxDesktopLogins))
}
}
if obj.LinuxDesktopLogins != nil {
t := o.ElemType
if len(obj.LinuxDesktopLogins) != len(c.Elems) {
c.Elems = make([]github_com_hashicorp_terraform_plugin_framework_attr.Value, len(obj.LinuxDesktopLogins))
}
for k, a := range obj.LinuxDesktopLogins {
v, ok := tf.Attrs["linux_desktop_logins"].(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
i, err := t.ValueFromTerraform(ctx, github_com_hashicorp_terraform_plugin_go_tftypes.NewValue(t.TerraformType(ctx), nil))
if err != nil {
diags.Append(attrWriteGeneralError{"RoleV6.Spec.Allow.LinuxDesktopLogins", err})
}
v, ok = i.(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
diags.Append(attrWriteConversionFailureDiag{"RoleV6.Spec.Allow.LinuxDesktopLogins", "github.com/hashicorp/terraform-plugin-framework/types.String"})
}
v.Null = string(a) == ""
}
v.Value = string(a)
v.Unknown = false
c.Elems[k] = v
}
if len(obj.LinuxDesktopLogins) > 0 {
c.Null = false
}
}
c.Unknown = false
tf.Attrs["linux_desktop_logins"] = c
}
}
}
{
t, ok := tf.AttrTypes["linux_desktop_labels"]
if !ok {
diags.Append(attrWriteMissingDiag{"RoleV6.Spec.Allow.LinuxDesktopLabels"})
} else {
v := CopyToLabels(diags, obj.LinuxDesktopLabels, t, tf.Attrs["linux_desktop_labels"])
tf.Attrs["linux_desktop_labels"] = v
}
}
{
t, ok := tf.AttrTypes["linux_desktop_labels_expression"]
if !ok {
diags.Append(attrWriteMissingDiag{"RoleV6.Spec.Allow.LinuxDesktopLabelsExpression"})
} else {
v, ok := tf.Attrs["linux_desktop_labels_expression"].(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
i, err := t.ValueFromTerraform(ctx, github_com_hashicorp_terraform_plugin_go_tftypes.NewValue(t.TerraformType(ctx), nil))
if err != nil {
diags.Append(attrWriteGeneralError{"RoleV6.Spec.Allow.LinuxDesktopLabelsExpression", err})
}
v, ok = i.(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
diags.Append(attrWriteConversionFailureDiag{"RoleV6.Spec.Allow.LinuxDesktopLabelsExpression", "github.com/hashicorp/terraform-plugin-framework/types.String"})
}
v.Null = string(obj.LinuxDesktopLabelsExpression) == ""
}
v.Value = string(obj.LinuxDesktopLabelsExpression)
v.Unknown = false
tf.Attrs["linux_desktop_labels_expression"] = v
}
}
{
t, ok := tf.AttrTypes["beam_labels"]
if !ok {
@@ -43692,6 +43911,90 @@ func CopyRoleV6ToTerraform(ctx context.Context, obj *github_com_gravitational_te
}
}
}
{
a, ok := tf.AttrTypes["linux_desktop_logins"]
if !ok {
diags.Append(attrWriteMissingDiag{"RoleV6.Spec.Deny.LinuxDesktopLogins"})
} else {
o, ok := a.(github_com_hashicorp_terraform_plugin_framework_types.ListType)
if !ok {
diags.Append(attrWriteConversionFailureDiag{"RoleV6.Spec.Deny.LinuxDesktopLogins", "github.com/hashicorp/terraform-plugin-framework/types.ListType"})
} else {
c, ok := tf.Attrs["linux_desktop_logins"].(github_com_hashicorp_terraform_plugin_framework_types.List)
if !ok {
c = github_com_hashicorp_terraform_plugin_framework_types.List{
ElemType: o.ElemType,
Elems: make([]github_com_hashicorp_terraform_plugin_framework_attr.Value, len(obj.LinuxDesktopLogins)),
Null: true,
}
} else {
if c.Elems == nil {
c.Elems = make([]github_com_hashicorp_terraform_plugin_framework_attr.Value, len(obj.LinuxDesktopLogins))
}
}
if obj.LinuxDesktopLogins != nil {
t := o.ElemType
if len(obj.LinuxDesktopLogins) != len(c.Elems) {
c.Elems = make([]github_com_hashicorp_terraform_plugin_framework_attr.Value, len(obj.LinuxDesktopLogins))
}
for k, a := range obj.LinuxDesktopLogins {
v, ok := tf.Attrs["linux_desktop_logins"].(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
i, err := t.ValueFromTerraform(ctx, github_com_hashicorp_terraform_plugin_go_tftypes.NewValue(t.TerraformType(ctx), nil))
if err != nil {
diags.Append(attrWriteGeneralError{"RoleV6.Spec.Deny.LinuxDesktopLogins", err})
}
v, ok = i.(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
diags.Append(attrWriteConversionFailureDiag{"RoleV6.Spec.Deny.LinuxDesktopLogins", "github.com/hashicorp/terraform-plugin-framework/types.String"})
}
v.Null = string(a) == ""
}
v.Value = string(a)
v.Unknown = false
c.Elems[k] = v
}
if len(obj.LinuxDesktopLogins) > 0 {
c.Null = false
}
}
c.Unknown = false
tf.Attrs["linux_desktop_logins"] = c
}
}
}
{
t, ok := tf.AttrTypes["linux_desktop_labels"]
if !ok {
diags.Append(attrWriteMissingDiag{"RoleV6.Spec.Deny.LinuxDesktopLabels"})
} else {
v := CopyToLabels(diags, obj.LinuxDesktopLabels, t, tf.Attrs["linux_desktop_labels"])
tf.Attrs["linux_desktop_labels"] = v
}
}
{
t, ok := tf.AttrTypes["linux_desktop_labels_expression"]
if !ok {
diags.Append(attrWriteMissingDiag{"RoleV6.Spec.Deny.LinuxDesktopLabelsExpression"})
} else {
v, ok := tf.Attrs["linux_desktop_labels_expression"].(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
i, err := t.ValueFromTerraform(ctx, github_com_hashicorp_terraform_plugin_go_tftypes.NewValue(t.TerraformType(ctx), nil))
if err != nil {
diags.Append(attrWriteGeneralError{"RoleV6.Spec.Deny.LinuxDesktopLabelsExpression", err})
}
v, ok = i.(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
diags.Append(attrWriteConversionFailureDiag{"RoleV6.Spec.Deny.LinuxDesktopLabelsExpression", "github.com/hashicorp/terraform-plugin-framework/types.String"})
}
v.Null = string(obj.LinuxDesktopLabelsExpression) == ""
}
v.Value = string(obj.LinuxDesktopLabelsExpression)
v.Unknown = false
tf.Attrs["linux_desktop_labels_expression"] = v
}
}
{
t, ok := tf.AttrTypes["beam_labels"]
if !ok {
@@ -53029,6 +53332,23 @@ func CopyLockV2FromTerraform(_ context.Context, tf github_com_hashicorp_terrafor
}
}
}
{
a, ok := tf.Attrs["linux_desktop"]
if !ok {
diags.Append(attrReadMissingDiag{"LockV2.Spec.Target.LinuxDesktop"})
} else {
v, ok := a.(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
diags.Append(attrReadConversionFailureDiag{"LockV2.Spec.Target.LinuxDesktop", "github.com/hashicorp/terraform-plugin-framework/types.String"})
} else {
var t string
if !v.Null && !v.Unknown {
t = string(v.Value)
}
obj.LinuxDesktop = t
}
}
}
}
}
}
@@ -53646,6 +53966,28 @@ func CopyLockV2ToTerraform(ctx context.Context, obj *github_com_gravitational_te
tf.Attrs["join_token"] = v
}
}
{
t, ok := tf.AttrTypes["linux_desktop"]
if !ok {
diags.Append(attrWriteMissingDiag{"LockV2.Spec.Target.LinuxDesktop"})
} else {
v, ok := tf.Attrs["linux_desktop"].(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
i, err := t.ValueFromTerraform(ctx, github_com_hashicorp_terraform_plugin_go_tftypes.NewValue(t.TerraformType(ctx), nil))
if err != nil {
diags.Append(attrWriteGeneralError{"LockV2.Spec.Target.LinuxDesktop", err})
}
v, ok = i.(github_com_hashicorp_terraform_plugin_framework_types.String)
if !ok {
diags.Append(attrWriteConversionFailureDiag{"LockV2.Spec.Target.LinuxDesktop", "github.com/hashicorp/terraform-plugin-framework/types.String"})
}
v.Null = string(obj.LinuxDesktop) == ""
}
v.Value = string(obj.LinuxDesktop)
v.Unknown = false
tf.Attrs["linux_desktop"] = v
}
}
}
v.Unknown = false
tf.Attrs["target"] = v
+2
View File
@@ -110,6 +110,7 @@ type Config struct {
WorkloadIdentity services.WorkloadIdentities
DynamicWindowsDesktops services.DynamicWindowsDesktops
WindowsDesktops services.WindowsDesktops
LinuxDesktops services.LinuxDesktops
AutoUpdateService services.AutoUpdateServiceGetter
ProvisioningStates services.ProvisioningStates
IdentityCenter services.IdentityCenter
@@ -200,6 +201,7 @@ func NewCache(cfg Config) (*cache.Cache, error) {
WebToken: cfg.WebToken,
WorkloadIdentity: cfg.WorkloadIdentity,
WindowsDesktops: cfg.WindowsDesktops,
LinuxDesktops: cfg.LinuxDesktops,
DynamicWindowsDesktops: cfg.DynamicWindowsDesktops,
ProvisioningStates: cfg.ProvisioningStates,
IdentityCenter: cfg.IdentityCenter,
+42
View File
@@ -71,6 +71,7 @@ import (
apidefaults "github.com/gravitational/teleport/api/defaults"
devicepb "github.com/gravitational/teleport/api/gen/proto/go/teleport/devicetrust/v1"
headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
mfav1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/mfa/v1"
notificationsv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/notifications/v1"
presencev1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/presence/v1"
@@ -375,6 +376,12 @@ func NewServer(cfg *InitConfig, opts ...ServerOption) (as *Server, err error) {
return nil, trace.Wrap(err)
}
}
if cfg.LinuxDesktops == nil {
cfg.LinuxDesktops, err = local.NewLinuxDesktopService(cfg.Backend)
if err != nil {
return nil, trace.Wrap(err)
}
}
if cfg.SAMLIdPServiceProviders == nil {
cfg.SAMLIdPServiceProviders, err = local.NewSAMLIdPServiceProviderService(cfg.Backend)
if err != nil {
@@ -684,6 +691,7 @@ func NewServer(cfg *InitConfig, opts ...ServerOption) (as *Server, err error) {
Events: cfg.Events,
WindowsDesktops: cfg.WindowsDesktops,
DynamicWindowsDesktops: cfg.DynamicWindowsDesktops,
LinuxDesktops: cfg.LinuxDesktops,
SAMLIdPServiceProviders: cfg.SAMLIdPServiceProviders,
UserGroups: cfg.UserGroups,
SessionTrackerService: cfg.SessionTrackerService,
@@ -990,6 +998,7 @@ type Services struct {
services.DatabaseServices
services.DelegationSessions
services.WindowsDesktops
services.LinuxDesktops
services.DynamicWindowsDesktops
services.SAMLIdPServiceProviders
services.UserGroups
@@ -5776,6 +5785,8 @@ func (a *Server) RegisterInventoryControlStream(ics client.UpstreamInventoryCont
KubernetesHeartbeats: true,
KubernetesCleanup: true,
RelayServerHeartbeatsCleanup: true,
LinuxDesktopHeartbeats: true,
LinuxDesktopCleanup: true,
},
}
if err := ics.Send(a.CloseContext(), downstreamHello); err != nil {
@@ -6915,6 +6926,27 @@ func (a *Server) UpsertApplicationServer(ctx context.Context, server types.AppSe
return lease, nil
}
// UpsertLinuxDesktop upserts a Linux desktop resource.
func (a *Server) UpsertLinuxDesktop(ctx context.Context, desktop *linuxdesktopv1.LinuxDesktop) (*linuxdesktopv1.LinuxDesktop, error) {
updated, err := a.Services.LinuxDesktops.UpsertLinuxDesktop(ctx, desktop)
if err != nil {
return nil, trace.Wrap(err)
}
a.AnonymizeAndSubmit(&usagereporter.ResourceHeartbeatEvent{
Name: desktop.GetMetadata().GetName(),
Kind: usagereporter.ResourceKindLinuxDesktop,
Static: false,
})
return updated, nil
}
// DeleteLinuxDesktop deletes the Linux desktop resource by name.
func (a *Server) DeleteLinuxDesktop(ctx context.Context, name string) error {
return trace.Wrap(a.Services.LinuxDesktops.DeleteLinuxDesktop(ctx, name))
}
// UnconditionalUpdateApplicationServer implements [services.PresenceInternal]
// by delegating to [Server.Services] and then potentially emitting a
// [usagereporter] event.
@@ -8212,6 +8244,16 @@ func (a *Server) isMFARequired(ctx context.Context, scopedCtx *authz.ScopedConte
services.AccessState{},
services.NewWindowsLoginMatcher(t.WindowsDesktop.GetLogin()))
case *proto.IsMFARequiredRequest_LinuxDesktop:
desktop, err := a.GetLinuxDesktop(ctx, t.LinuxDesktop.GetLinuxDesktop())
if err != nil {
return nil, trace.Wrap(err)
}
noMFAAccessErr = checker.CheckAccess(types.ProtoResource153ToLegacy(desktop),
services.AccessState{},
services.NewLinuxDesktopLoginMatcher(t.LinuxDesktop.GetLogin()))
case *proto.IsMFARequiredRequest_App:
if t.App.Name == "" {
return nil, trace.BadParameter("missing Name field in an app-only UserCertsRequest")
+26 -2
View File
@@ -45,6 +45,7 @@ import (
auditlogpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/auditlog/v1"
headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
identitycenterv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/identitycenter/v1"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
mfav1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/mfa/v1"
presencev1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/presence/v1"
scopesv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/scopes/v1"
@@ -1636,6 +1637,7 @@ var (
types.KindNode: {},
types.KindSAMLIdPServiceProvider: {},
types.KindWindowsDesktop: {},
types.KindLinuxDesktop: {},
types.KindMCP: {},
}
@@ -1813,6 +1815,17 @@ func (a *ServerWithRoles) ListUnifiedResources(ctx context.Context, req *proto.L
continue
}
r.Logins = logins
} else if d := r.GetLinuxDesktop(); d != nil {
desktop := proto.UnpackLinuxDesktop(d)
logins, err := resourceLister.getAllowedLogins(desktop)
if err != nil {
a.authServer.logger.WarnContext(ctx, "Unable to determine logins for Linux desktop",
"error", err,
"resource", desktop.GetName(),
)
continue
}
r.Logins = logins
} else if d := r.GetAppServer(); d != nil {
// Apps representing an Identity Center Account have a collection of Permission Sets
// that can be thought of as individually-addressable sub-resources. To present a consitent
@@ -2561,6 +2574,11 @@ func (r *resourceChecker) CanAccess(resource types.ResourceWithLabels) error {
if isCheckable {
return r.CheckAccess(checkable, state, services.NewIdentityCenterAccountAssignmentMatcher(rr.UnwrapT()))
}
case types.Resource153UnwrapperT[*linuxdesktopv1.LinuxDesktop]:
checkable, isCheckable := rr.(services.AccessCheckable)
if isCheckable {
return r.CheckAccess(checkable, state)
}
}
return trace.BadParameter("could not check access to resource type %T", resource)
@@ -2573,6 +2591,7 @@ func newResourceAccessChecker(authCtx authz.Context, resource string) (*resource
types.KindDatabaseServer,
types.KindDatabaseService,
types.KindWindowsDesktop,
types.KindLinuxDesktop,
types.KindWindowsDesktopService,
types.KindNode,
types.KindKubeServer,
@@ -4427,6 +4446,9 @@ func (a *ScopedServerWithRoles) generateUserCerts(ctx context.Context, req proto
case proto.UserCertsRequest_WindowsDesktop:
// Desktop certs.
certReq.Usage = []string{teleport.UsageWindowsDesktopOnly}
case proto.UserCertsRequest_LinuxDesktop:
// Desktop certs.
certReq.Usage = []string{teleport.UsageLinuxDesktopOnly}
default:
return nil, trace.BadParameter("unsupported cert usage %q", req.Usage)
}
@@ -4502,8 +4524,8 @@ func (a *ServerWithRoles) GetAccessRequestAllowedPromotions(ctx context.Context,
// progressing further and provides better feedback than other protocol-specific
// failures.
func verifyUserDeviceForCertIssuance(ctx context.Context, identity tlsca.Identity, usage proto.UserCertsRequest_CertUsage, dt *types.DeviceTrust) error {
// Ignore App or WindowsDesktop requests, they do not support device trust.
if usage == proto.UserCertsRequest_App || usage == proto.UserCertsRequest_WindowsDesktop {
// Ignore App, WindowsDesktop, and LinuxDesktop requests, they do not support device trust.
if usage == proto.UserCertsRequest_App || usage == proto.UserCertsRequest_WindowsDesktop || usage == proto.UserCertsRequest_LinuxDesktop {
return nil
}
return trace.Wrap(dtauthz.VerifyTLSUser(ctx, dt, identity))
@@ -7463,6 +7485,8 @@ func sessionTypeFromStartEvent(sessionStart apievents.AuditEvent) types.SessionK
return types.AppSessionKind
case *apievents.WindowsDesktopSessionStart:
return types.WindowsDesktopSessionKind
case *apievents.LinuxDesktopSessionStart:
return types.LinuxDesktopSessionKind
default:
return types.UnknownSessionKind
}
+85
View File
@@ -37,6 +37,7 @@ import (
identitycenterv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/identitycenter/v1"
integrationpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/integration/v1"
kubewaitingcontainerpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
machineidv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/machineid/v1"
presencev1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/presence/v1"
provisioningv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/provisioning/v1"
@@ -324,6 +325,8 @@ type ReadProxyAccessPoint interface {
// GetWindowsDesktopService returns a windows desktop host by name.
GetWindowsDesktopService(ctx context.Context, name string) (types.WindowsDesktopService, error)
GetLinuxDesktop(ctx context.Context, name string) (*linuxdesktopv1.LinuxDesktop, error)
// GetSAMLIdPServiceProvider returns the specified SAML IdP service provider resources.
GetSAMLIdPServiceProvider(ctx context.Context, name string) (types.SAMLIdPServiceProvider, error)
@@ -497,6 +500,9 @@ type ReadRemoteProxyAccessPoint interface {
// GetWindowsDesktopService returns a registered windows desktop service by name.
GetWindowsDesktopService(ctx context.Context, name string) (types.WindowsDesktopService, error)
// GetLinuxDesktop returns registered Linux desktop by name.
GetLinuxDesktop(ctx context.Context, name string) (*linuxdesktopv1.LinuxDesktop, error)
}
// RelayAccessPoint is the top-level access point interface required by a Relay service.
@@ -816,6 +822,58 @@ type WindowsDesktopAccessPoint interface {
accessPoint
}
// ReadLinuxDesktopAccessPoint is an API interface implemented by a certificate authority (CA) to be
// used by a teleport.ComponentLinuxDesktop.
//
// NOTE: This interface must match the resources replicated in cache.ForLinuxDesktop.
type ReadLinuxDesktopAccessPoint interface {
// Closer closes all the resources
io.Closer
// NewWatcher returns a new event watcher.
NewWatcher(ctx context.Context, watch types.Watch) (types.Watcher, error)
// GetCertAuthority returns cert authority by id
GetCertAuthority(ctx context.Context, id types.CertAuthID, loadKeys bool) (types.CertAuthority, error)
// GetCertAuthorities returns a list of cert authorities
GetCertAuthorities(ctx context.Context, caType types.CertAuthType, loadKeys bool) ([]types.CertAuthority, error)
// GetClusterName gets the name of the cluster from the backend.
GetClusterName(ctx context.Context) (types.ClusterName, error)
// GetClusterAuditConfig returns cluster audit configuration.
GetClusterAuditConfig(ctx context.Context) (types.ClusterAuditConfig, error)
// GetClusterNetworkingConfig returns cluster networking configuration.
GetClusterNetworkingConfig(ctx context.Context) (types.ClusterNetworkingConfig, error)
// GetAuthPreference returns the cluster authentication configuration.
GetAuthPreference(ctx context.Context) (types.AuthPreference, error)
// GetSessionRecordingConfig returns session recording configuration.
GetSessionRecordingConfig(ctx context.Context) (types.SessionRecordingConfig, error)
// GetUser returns a services.User for this cluster.
GetUser(ctx context.Context, name string, withSecrets bool) (types.User, error)
// GetRole returns role by name
GetRole(ctx context.Context, name string) (types.Role, error)
// GetRoles returns a list of roles
GetRoles(ctx context.Context) ([]types.Role, error)
}
// LinuxDesktopAccessPoint is an API interface implemented by a certificate authority (CA) to be
// used by a teleport.ComponentLinuxDesktop.
type LinuxDesktopAccessPoint interface {
// ReadLinuxDesktopAccessPoint provides methods to read data
ReadLinuxDesktopAccessPoint
// accessPoint provides common access point functionality
accessPoint
}
// ReadDiscoveryAccessPoint is a read only API interface to be
// used by a teleport.ComponentDiscovery.
//
@@ -1283,6 +1341,12 @@ type Cache interface {
// ListDynamicWindowsDesktops returns all registered dynamic Windows desktop.
ListDynamicWindowsDesktops(ctx context.Context, pageSize int, pageToken string) ([]types.DynamicWindowsDesktop, string, error)
// GetLinuxDesktop returns registered Linux desktop by name.
GetLinuxDesktop(ctx context.Context, name string) (*linuxdesktopv1.LinuxDesktop, error)
// ListLinuxDesktops returns all registered Linux desktop.
ListLinuxDesktops(ctx context.Context, pageSize int, nextToken string) ([]*linuxdesktopv1.LinuxDesktop, string, error)
// GetStaticTokens gets the list of static tokens used to provision nodes.
GetStaticTokens(ctx context.Context) (types.StaticTokens, error)
@@ -1709,6 +1773,27 @@ func (w *WindowsDesktopWrapper) Close() error {
return trace.NewAggregate(err, err2)
}
type LinuxDesktopWrapper struct {
ReadLinuxDesktopAccessPoint
accessPoint
NoCache LinuxDesktopAccessPoint
}
func NewLinuxDesktopWrapper(base LinuxDesktopAccessPoint, cache ReadLinuxDesktopAccessPoint) LinuxDesktopAccessPoint {
return &LinuxDesktopWrapper{
NoCache: base,
accessPoint: base,
ReadLinuxDesktopAccessPoint: cache,
}
}
// Close closes all associated resources
func (w *LinuxDesktopWrapper) Close() error {
err := w.NoCache.Close()
err2 := w.ReadLinuxDesktopAccessPoint.Close()
return trace.NewAggregate(err, err2)
}
type DiscoveryWrapper struct {
ReadDiscoveryAccessPoint
accessPoint
+5
View File
@@ -36,6 +36,7 @@ import (
"github.com/gravitational/teleport/api/client/dynamicwindows"
"github.com/gravitational/teleport/api/client/externalauditstorage"
"github.com/gravitational/teleport/api/client/gitserver"
"github.com/gravitational/teleport/api/client/linuxdesktop"
"github.com/gravitational/teleport/api/client/proto"
"github.com/gravitational/teleport/api/client/secreport"
"github.com/gravitational/teleport/api/client/usertask"
@@ -48,6 +49,7 @@ import (
devicepb "github.com/gravitational/teleport/api/gen/proto/go/teleport/devicetrust/v1"
integrationv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/integration/v1"
inventoryv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/inventory/v1"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
loginrulepb "github.com/gravitational/teleport/api/gen/proto/go/teleport/loginrule/v1"
machineidv1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/machineid/v1"
mfav1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/mfa/v1"
@@ -1546,6 +1548,9 @@ type ClientI interface {
GetDynamicWindowsDesktop(ctx context.Context, name string) (types.DynamicWindowsDesktop, error)
ListDynamicWindowsDesktops(ctx context.Context, pageSize int, pageToken string) ([]types.DynamicWindowsDesktop, string, error)
LinuxDesktopClient() *linuxdesktop.Client
GetLinuxDesktop(ctx context.Context, name string) (*linuxdesktopv1.LinuxDesktop, error)
// TrustClient returns a client to the Trust service.
TrustClient() trustpb.TrustServiceClient
+1
View File
@@ -636,6 +636,7 @@ func InitAuthCache(p AuthCacheParams) error {
WebToken: p.AuthServer.Services.IdentityInternal,
WorkloadIdentity: p.AuthServer.Services.WorkloadIdentities,
DynamicWindowsDesktops: p.AuthServer.Services.DynamicWindowsDesktops,
LinuxDesktops: p.AuthServer.Services.LinuxDesktops,
WindowsDesktops: p.AuthServer.Services.WindowsDesktops,
AutoUpdateService: p.AuthServer.Services.AutoUpdateService,
ProvisioningStates: p.AuthServer.Services.ProvisioningStates,
+24 -5
View File
@@ -72,6 +72,7 @@ import (
inventorypb "github.com/gravitational/teleport/api/gen/proto/go/teleport/inventory/v1"
issuancev1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/issuance/v1"
kubewaitingcontainerv1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
linuxdesktopv1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
loginrulev1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/loginrule/v1"
machineidv1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/machineid/v1"
mfav1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/mfa/v1"
@@ -119,6 +120,7 @@ import (
"github.com/gravitational/teleport/lib/auth/inventory/inventoryv1"
issuancev1 "github.com/gravitational/teleport/lib/auth/issuance/v1"
"github.com/gravitational/teleport/lib/auth/kubewaitingcontainer/kubewaitingcontainerv1"
"github.com/gravitational/teleport/lib/auth/linuxdesktop/linuxdesktopv1"
"github.com/gravitational/teleport/lib/auth/loginrule/loginrulev1"
"github.com/gravitational/teleport/lib/auth/machineid/machineidv1"
"github.com/gravitational/teleport/lib/auth/machineid/workloadidentityv1"
@@ -301,6 +303,7 @@ var connectedResourceGauges = map[string]prometheus.Gauge{
constants.KeepAliveDatabase: connectedResources.WithLabelValues(constants.KeepAliveDatabase),
constants.KeepAliveDatabaseService: connectedResources.WithLabelValues(constants.KeepAliveDatabaseService),
constants.KeepAliveWindowsDesktopService: connectedResources.WithLabelValues(constants.KeepAliveWindowsDesktopService),
constants.KeepAliveLinuxDesktop: connectedResources.WithLabelValues(constants.KeepAliveLinuxDesktop),
teleport.ComponentRelay: connectedResources.WithLabelValues(teleport.ComponentRelay),
}
@@ -776,6 +779,10 @@ func validateCertUsage(req *authpb.UserCertsRequest) error {
if req.RouteToWindowsDesktop.WindowsDesktop == "" {
return trace.BadParameter("missing WindowsDesktop field in a windows-desktop-only UserCertsRequest")
}
case authpb.UserCertsRequest_LinuxDesktop:
if req.RouteToLinuxDesktop.LinuxDesktop == "" {
return trace.BadParameter("missing LinuxDesktop field in a linux-desktop-only UserCertsRequest")
}
case authpb.UserCertsRequest_AccessGraphAPI:
if err := validateAccessGraphcertificateReq(req); err != nil {
return trace.Wrap(err)
@@ -882,10 +889,11 @@ func (g *GRPCServer) AssertSystemRole(ctx context.Context, req *authpb.SystemRol
// icsServicesToMetricName is a helper for translating service names to keepalive names for control-stream
// purposes. When new services switch to using control-stream based heartbeats, they should be added here.
var icsServiceToMetricName = map[types.SystemRole]string{
types.RoleApp: constants.KeepAliveApp,
types.RoleDatabase: constants.KeepAliveDatabase,
types.RoleKube: constants.KeepAliveKube,
types.RoleNode: constants.KeepAliveNode,
types.RoleApp: constants.KeepAliveApp,
types.RoleDatabase: constants.KeepAliveDatabase,
types.RoleKube: constants.KeepAliveKube,
types.RoleNode: constants.KeepAliveNode,
types.RoleLinuxDesktop: constants.KeepAliveLinuxDesktop,
}
func (g *GRPCServer) InventoryControlStream(stream authpb.AuthService_InventoryControlStreamServer) error {
@@ -2952,7 +2960,7 @@ func userSingleUseCertsGenerate(ctx context.Context, srv *ScopedServerWithRoles,
switch req.Usage {
case authpb.UserCertsRequest_SSH:
resp.SSH = certs.SSH
case authpb.UserCertsRequest_Kubernetes, authpb.UserCertsRequest_Database, authpb.UserCertsRequest_WindowsDesktop, authpb.UserCertsRequest_App, authpb.UserCertsRequest_AccessGraphAPI:
case authpb.UserCertsRequest_Kubernetes, authpb.UserCertsRequest_Database, authpb.UserCertsRequest_WindowsDesktop, authpb.UserCertsRequest_LinuxDesktop, authpb.UserCertsRequest_App, authpb.UserCertsRequest_AccessGraphAPI:
resp.TLS = certs.TLS
default:
return nil, trace.BadParameter("unknown certificate usage %q", req.Usage)
@@ -6384,6 +6392,17 @@ func NewGRPCServer(cfg GRPCServerConfig) (*GRPCServer, error) {
}
dynamicwindowsv1pb.RegisterDynamicWindowsServiceServer(server, dynamicWindows)
linuxDesktop, err := linuxdesktopv1.NewService(linuxdesktopv1.ServiceConfig{
Authorizer: cfg.Authorizer,
Backend: cfg.AuthServer.Services,
Reader: cfg.AuthServer.Cache,
Emitter: cfg.Emitter,
})
if err != nil {
return nil, trace.Wrap(err)
}
linuxdesktopv1pb.RegisterLinuxDesktopServiceServer(server, linuxDesktop)
trust, err := trustv1.NewService(&trustv1.ServiceConfig{
Authorizer: cfg.Authorizer,
ScopedAuthorizer: cfg.ScopedAuthorizer,
+4 -1
View File
@@ -251,9 +251,12 @@ type InitConfig struct {
// WindowsDesktops is a service that manages Windows desktop resources.
WindowsDesktops services.WindowsDesktops
// DynamicWindowsServices is a service that manages dynamic Windows desktop resources.
// DynamicWindowsDesktops is a service that manages dynamic Windows desktop resources.
DynamicWindowsDesktops services.DynamicWindowsDesktops
// LinuxDesktops is a service that manages Linux desktop resources.
LinuxDesktops services.LinuxDesktops
// SAMLIdPServiceProviders is a service that manages SAML IdP service providers.
SAMLIdPServiceProviders services.SAMLIdPServiceProviders
@@ -0,0 +1,57 @@
// Teleport
// Copyright (C) 2026 Gravitational, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package linuxdesktopv1
import (
"github.com/gravitational/trace"
headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
linuxdesktopv1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
"github.com/gravitational/teleport/api/types"
)
func NewLinuxDesktop(name string, spec *linuxdesktopv1pb.LinuxDesktopSpec) (*linuxdesktopv1pb.LinuxDesktop, error) {
d := &linuxdesktopv1pb.LinuxDesktop{}
d.SetKind(types.KindLinuxDesktop)
d.SetSubKind("")
d.SetVersion(types.V1)
d.SetMetadata(&headerv1.Metadata{
Name: name,
})
d.SetSpec(spec)
return d, nil
}
func ValidateLinuxDesktop(desktop *linuxdesktopv1pb.LinuxDesktop) error {
switch {
case desktop == nil:
return trace.BadParameter("linux desktop is required")
case desktop.GetMetadata() == nil:
return trace.BadParameter("metadata is required")
case desktop.GetMetadata().GetName() == "":
return trace.BadParameter("name is required")
case desktop.GetSpec() == nil:
return trace.BadParameter("spec is required")
case desktop.GetSpec().GetAddr() == "":
return trace.BadParameter("spec.addr is required")
case desktop.GetSpec().GetHostname() == "":
return trace.BadParameter("spec.hostname is required")
case desktop.GetKind() != types.KindLinuxDesktop:
return trace.BadParameter("kind must be %q", types.KindLinuxDesktop)
}
return nil
}
@@ -0,0 +1,151 @@
/*
* Teleport
* Copyright (C) 2026 Gravitational, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package linuxdesktopv1
import (
"testing"
"github.com/gravitational/trace"
"github.com/stretchr/testify/require"
headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
linuxdesktopv1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
"github.com/gravitational/teleport/api/types"
)
func TestNewLinuxDesktop(t *testing.T) {
t.Parallel()
spec := linuxdesktopv1pb.LinuxDesktopSpec_builder{
Addr: "127.0.0.1:22",
Hostname: "desktop-1",
}.Build()
desktop, err := NewLinuxDesktop("desktop-1", spec)
require.NoError(t, err)
require.Equal(t, types.KindLinuxDesktop, desktop.GetKind())
require.Equal(t, types.V1, desktop.GetVersion())
require.Equal(t, "desktop-1", desktop.GetMetadata().GetName())
require.Equal(t, spec, desktop.GetSpec())
}
func TestValidateLinuxDesktop(t *testing.T) {
t.Parallel()
valid := linuxdesktopv1pb.LinuxDesktop_builder{
Kind: types.KindLinuxDesktop,
Version: types.V1,
Metadata: &headerv1.Metadata{
Name: "desktop-1",
},
Spec: linuxdesktopv1pb.LinuxDesktopSpec_builder{
Addr: "127.0.0.1:22",
Hostname: "host",
}.Build(),
}.Build()
tests := []struct {
name string
desktop *linuxdesktopv1pb.LinuxDesktop
wantErr bool
}{
{
name: "valid",
desktop: valid,
},
{
name: "nil desktop",
desktop: nil,
wantErr: true,
},
{
name: "missing metadata",
desktop: linuxdesktopv1pb.LinuxDesktop_builder{
Spec: valid.GetSpec(),
}.Build(),
wantErr: true,
},
{
name: "missing name",
desktop: linuxdesktopv1pb.LinuxDesktop_builder{
Metadata: &headerv1.Metadata{},
Spec: valid.GetSpec(),
}.Build(),
wantErr: true,
},
{
name: "missing spec",
desktop: linuxdesktopv1pb.LinuxDesktop_builder{
Metadata: valid.GetMetadata(),
}.Build(),
wantErr: true,
},
{
name: "missing addr",
desktop: linuxdesktopv1pb.LinuxDesktop_builder{
Metadata: valid.GetMetadata(),
Spec: linuxdesktopv1pb.LinuxDesktopSpec_builder{
Hostname: "host",
}.Build(),
}.Build(),
wantErr: true,
},
{
name: "missing hostname",
desktop: linuxdesktopv1pb.LinuxDesktop_builder{
Metadata: valid.GetMetadata(),
Spec: linuxdesktopv1pb.LinuxDesktopSpec_builder{
Addr: "127.0.0.1:22",
}.Build(),
}.Build(),
wantErr: true,
},
{
name: "incorrect kind",
desktop: linuxdesktopv1pb.LinuxDesktop_builder{
Kind: "node",
Version: types.V1,
Metadata: valid.GetMetadata(),
Spec: valid.GetSpec(),
}.Build(),
wantErr: true,
},
{
name: "empty kind",
desktop: linuxdesktopv1pb.LinuxDesktop_builder{
Kind: "",
Version: types.V1,
Metadata: valid.GetMetadata(),
Spec: valid.GetSpec(),
}.Build(),
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := ValidateLinuxDesktop(tt.desktop)
if tt.wantErr {
require.Error(t, err)
require.True(t, trace.IsBadParameter(err))
return
}
require.NoError(t, err)
})
}
}
@@ -0,0 +1,282 @@
// Teleport
// Copyright (C) 2026 Gravitational, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package linuxdesktopv1
import (
"context"
"github.com/gravitational/trace"
"google.golang.org/protobuf/types/known/emptypb"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/api/types/events"
"github.com/gravitational/teleport/api/utils/clientutils"
"github.com/gravitational/teleport/lib/authz"
iterstream "github.com/gravitational/teleport/lib/itertools/stream"
"github.com/gravitational/teleport/lib/services"
"github.com/gravitational/teleport/lib/services/local/generic"
)
// ServiceConfig holds configuration options for the LinuxDesktop gRPC service.
type ServiceConfig struct {
// Authorizer is the authorizer to use.
Authorizer authz.Authorizer
// Backend is the backend for storing LinuxDesktop.
Backend services.LinuxDesktops
// Reader is the cache for looking up LinuxDesktops.
Reader Reader
// Emitter is the event emitter.
Emitter events.Emitter
}
type Reader interface {
ListLinuxDesktops(ctx context.Context, pageSize int, nextToken string) ([]*linuxdesktopv1.LinuxDesktop, string, error)
GetLinuxDesktop(ctx context.Context, name string) (*linuxdesktopv1.LinuxDesktop, error)
}
// Service implements the teleport.LinuxDesktop.v1.LinuxDesktopService RPC service.
type Service struct {
linuxdesktopv1.UnimplementedLinuxDesktopServiceServer
authorizer authz.Authorizer
backend services.LinuxDesktops
reader Reader
emitter events.Emitter
}
// NewService returns a new LinuxDesktop gRPC service.
func NewService(cfg ServiceConfig) (*Service, error) {
switch {
case cfg.Authorizer == nil:
return nil, trace.BadParameter("authorizer is required")
case cfg.Backend == nil:
return nil, trace.BadParameter("backend is required")
case cfg.Reader == nil:
return nil, trace.BadParameter("cache is required")
case cfg.Emitter == nil:
return nil, trace.BadParameter("emitter is required")
}
return &Service{
authorizer: cfg.Authorizer,
backend: cfg.Backend,
reader: cfg.Reader,
emitter: cfg.Emitter,
}, nil
}
func checkAccess(authCtx *authz.Context, desktop *linuxdesktopv1.LinuxDesktop) error {
return authCtx.Checker.CheckAccess(types.ProtoResource153ToLegacy(desktop), services.AccessState{MFAVerified: true})
}
// CreateLinuxDesktop creates Linux desktop resource.
func (s *Service) CreateLinuxDesktop(ctx context.Context, req *linuxdesktopv1.CreateLinuxDesktopRequest) (rec *linuxdesktopv1.LinuxDesktop, err error) {
authCtx, err := s.authorizer.Authorize(ctx)
if err != nil {
return nil, trace.Wrap(err)
}
if err := authCtx.CheckAccessToKind(types.KindLinuxDesktop, types.VerbCreate); err != nil {
return nil, trace.Wrap(err)
}
if err := authCtx.AuthorizeAdminActionAllowReusedMFA(); err != nil {
return nil, trace.Wrap(err)
}
desktop := req.GetLinuxDesktop()
if err := ValidateLinuxDesktop(desktop); err != nil {
return nil, trace.Wrap(err)
}
if err := checkAccess(authCtx, desktop); err != nil {
return nil, trace.Wrap(err)
}
rsp, err := s.backend.CreateLinuxDesktop(ctx, desktop)
return rsp, trace.Wrap(err)
}
// ListLinuxDesktops returns a list of Linux desktops.
func (s *Service) ListLinuxDesktops(ctx context.Context, req *linuxdesktopv1.ListLinuxDesktopsRequest) (*linuxdesktopv1.ListLinuxDesktopsResponse, error) {
authCtx, err := s.authorizer.Authorize(ctx)
if err != nil {
return nil, trace.Wrap(err)
}
if err := authCtx.CheckAccessToKind(types.KindLinuxDesktop, types.VerbRead, types.VerbList); err != nil {
return nil, trace.Wrap(err)
}
resources := clientutils.RangeResources(ctx, req.GetPageToken(), "", s.reader.ListLinuxDesktops, nil)
rsp, nextToken, err := generic.CollectPageAndCursor(
iterstream.FilterMap(resources, func(desktop *linuxdesktopv1.LinuxDesktop) (*linuxdesktopv1.LinuxDesktop, bool) {
if err := checkAccess(authCtx, desktop); err == nil {
return desktop, true
}
return nil, false
}),
int(req.GetPageSize()),
func(t *linuxdesktopv1.LinuxDesktop) string {
return t.GetMetadata().GetName()
})
if err != nil {
return nil, trace.Wrap(err)
}
res := &linuxdesktopv1.ListLinuxDesktopsResponse{}
res.SetLinuxDesktops(rsp)
res.SetNextPageToken(nextToken)
return res, nil
}
// GetLinuxDesktop returns Linux desktop resource.
func (s *Service) GetLinuxDesktop(ctx context.Context, req *linuxdesktopv1.GetLinuxDesktopRequest) (*linuxdesktopv1.LinuxDesktop, error) {
authCtx, err := s.authorizer.Authorize(ctx)
if err != nil {
return nil, trace.Wrap(err)
}
if err := authCtx.CheckAccessToKind(types.KindLinuxDesktop, types.VerbRead); err != nil {
return nil, trace.Wrap(err)
}
rsp, err := s.reader.GetLinuxDesktop(ctx, req.GetName())
if err != nil {
return nil, trace.Wrap(err)
}
if err := checkAccess(authCtx, rsp); err != nil {
return nil, trace.Wrap(err)
}
return rsp, nil
}
// UpdateLinuxDesktop updates Linux desktop resource.
func (s *Service) UpdateLinuxDesktop(ctx context.Context, req *linuxdesktopv1.UpdateLinuxDesktopRequest) (*linuxdesktopv1.LinuxDesktop, error) {
authCtx, err := s.authorizer.Authorize(ctx)
if err != nil {
return nil, trace.Wrap(err)
}
if err := authCtx.CheckAccessToKind(types.KindLinuxDesktop, types.VerbUpdate); err != nil {
return nil, trace.Wrap(err)
}
if err := authCtx.AuthorizeAdminActionAllowReusedMFA(); err != nil {
return nil, trace.Wrap(err)
}
desktop := req.GetLinuxDesktop()
if err := ValidateLinuxDesktop(desktop); err != nil {
return nil, trace.Wrap(err)
}
existing, err := s.reader.GetLinuxDesktop(ctx, desktop.GetMetadata().GetName())
if err != nil {
return nil, trace.Wrap(err)
}
if err := checkAccess(authCtx, existing); err != nil {
return nil, trace.Wrap(err)
}
if err := checkAccess(authCtx, desktop); err != nil {
return nil, trace.Wrap(err)
}
rsp, err := s.backend.UpdateLinuxDesktop(ctx, desktop)
return rsp, trace.Wrap(err)
}
// UpsertLinuxDesktop upserts Linux desktop resource.
func (s *Service) UpsertLinuxDesktop(ctx context.Context, req *linuxdesktopv1.UpsertLinuxDesktopRequest) (*linuxdesktopv1.LinuxDesktop, error) {
authCtx, err := s.authorizer.Authorize(ctx)
if err != nil {
return nil, trace.Wrap(err)
}
if err := authCtx.CheckAccessToKind(types.KindLinuxDesktop, types.VerbCreate, types.VerbUpdate); err != nil {
return nil, trace.Wrap(err)
}
if err := authCtx.AuthorizeAdminActionAllowReusedMFA(); err != nil {
return nil, trace.Wrap(err)
}
desktop := req.GetLinuxDesktop()
if err := ValidateLinuxDesktop(desktop); err != nil {
return nil, trace.Wrap(err)
}
existing, err := s.reader.GetLinuxDesktop(ctx, desktop.GetMetadata().GetName())
if !trace.IsNotFound(err) {
if err != nil {
return nil, trace.Wrap(err)
}
if err := checkAccess(authCtx, existing); err != nil {
return nil, trace.Wrap(err)
}
}
if err := checkAccess(authCtx, desktop); err != nil {
return nil, trace.Wrap(err)
}
rsp, err := s.backend.UpsertLinuxDesktop(ctx, desktop)
return rsp, trace.Wrap(err)
}
// DeleteLinuxDesktop deletes Linux desktop resource.
func (s *Service) DeleteLinuxDesktop(ctx context.Context, req *linuxdesktopv1.DeleteLinuxDesktopRequest) (*emptypb.Empty, error) {
authCtx, err := s.authorizer.Authorize(ctx)
if err != nil {
return nil, trace.Wrap(err)
}
if err := authCtx.CheckAccessToKind(types.KindLinuxDesktop, types.VerbDelete); err != nil {
return nil, trace.Wrap(err)
}
if err := authCtx.AuthorizeAdminActionAllowReusedMFA(); err != nil {
return nil, trace.Wrap(err)
}
existing, err := s.reader.GetLinuxDesktop(ctx, req.GetName())
if err != nil {
return nil, trace.Wrap(err)
}
if err := checkAccess(authCtx, existing); err != nil {
return nil, trace.Wrap(err)
}
if err = s.backend.DeleteLinuxDesktop(ctx, req.GetName()); err != nil {
return nil, trace.Wrap(err)
}
return &emptypb.Empty{}, nil
}
@@ -0,0 +1,528 @@
/*
* Teleport
* Copyright (C) 2026 Gravitational, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package linuxdesktopv1
import (
"context"
"fmt"
"testing"
"github.com/gravitational/trace"
"github.com/stretchr/testify/require"
"github.com/gravitational/teleport/api/defaults"
linuxdesktopv1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
"github.com/gravitational/teleport/api/mfa"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/lib/authz"
"github.com/gravitational/teleport/lib/events"
"github.com/gravitational/teleport/lib/services"
)
type check struct {
kind string
verb string
}
type fakeChecker struct {
services.AccessChecker
allow map[check]bool
checks []check
}
func (f *fakeChecker) CheckAccessToRule(_ services.RuleContext, _ string, kind string, verb string) error {
c := check{kind: kind, verb: verb}
f.checks = append(f.checks, c)
if f.allow[c] {
return nil
}
return trace.AccessDenied("access to %s with verb %s is not allowed", kind, verb)
}
func (f *fakeChecker) CheckAccess(services.AccessCheckable, services.AccessState, ...services.RoleMatcher) error {
return nil
}
type fakeAuthorizer struct {
checker *fakeChecker
adminState authz.AdminActionAuthState
}
func (f *fakeAuthorizer) Authorize(_ context.Context) (*authz.Context, error) {
return &authz.Context{
Checker: f.checker,
AdminActionAuthState: f.adminState,
}, nil
}
type fakeBackend struct {
createCalled bool
createReq *linuxdesktopv1pb.LinuxDesktop
createResp *linuxdesktopv1pb.LinuxDesktop
createErr error
updateCalled bool
updateReq *linuxdesktopv1pb.LinuxDesktop
updateResp *linuxdesktopv1pb.LinuxDesktop
updateErr error
upsertCalled bool
upsertReq *linuxdesktopv1pb.LinuxDesktop
upsertResp *linuxdesktopv1pb.LinuxDesktop
upsertErr error
deleteCalled bool
deleteName string
deleteErr error
}
func (f *fakeBackend) CreateLinuxDesktop(_ context.Context, desktop *linuxdesktopv1pb.LinuxDesktop) (*linuxdesktopv1pb.LinuxDesktop, error) {
f.createCalled = true
f.createReq = desktop
if f.createResp != nil {
return f.createResp, f.createErr
}
return desktop, f.createErr
}
func (f *fakeBackend) UpdateLinuxDesktop(_ context.Context, desktop *linuxdesktopv1pb.LinuxDesktop) (*linuxdesktopv1pb.LinuxDesktop, error) {
f.updateCalled = true
f.updateReq = desktop
if f.updateResp != nil {
return f.updateResp, f.updateErr
}
return desktop, f.updateErr
}
func (f *fakeBackend) UpsertLinuxDesktop(_ context.Context, desktop *linuxdesktopv1pb.LinuxDesktop) (*linuxdesktopv1pb.LinuxDesktop, error) {
f.upsertCalled = true
f.upsertReq = desktop
if f.upsertResp != nil {
return f.upsertResp, f.upsertErr
}
return desktop, f.upsertErr
}
func (f *fakeBackend) DeleteLinuxDesktop(_ context.Context, name string) error {
f.deleteCalled = true
f.deleteName = name
return f.deleteErr
}
func (f *fakeBackend) ListLinuxDesktops(context.Context, int, string) ([]*linuxdesktopv1pb.LinuxDesktop, string, error) {
return nil, "", nil
}
func (f *fakeBackend) GetLinuxDesktop(context.Context, string) (*linuxdesktopv1pb.LinuxDesktop, error) {
return nil, nil
}
type fakeReader struct {
listCalled bool
listPageSize int
listToken string
listResp []*linuxdesktopv1pb.LinuxDesktop
listNext string
listErr error
getCalled bool
getName string
getResp *linuxdesktopv1pb.LinuxDesktop
getErr error
}
func (f *fakeReader) ListLinuxDesktops(_ context.Context, pageSize int, nextToken string) ([]*linuxdesktopv1pb.LinuxDesktop, string, error) {
f.listCalled = true
f.listPageSize = pageSize
f.listToken = nextToken
return f.listResp, f.listNext, f.listErr
}
func (f *fakeReader) GetLinuxDesktop(_ context.Context, name string) (*linuxdesktopv1pb.LinuxDesktop, error) {
f.getCalled = true
f.getName = name
return f.getResp, f.getErr
}
func newTestService(t *testing.T, checker *fakeChecker, adminState authz.AdminActionAuthState, backend *fakeBackend, reader *fakeReader) *Service {
t.Helper()
svc, err := NewService(ServiceConfig{
Authorizer: &fakeAuthorizer{
checker: checker,
adminState: adminState,
},
Backend: backend,
Reader: reader,
Emitter: events.NewDiscardEmitter(),
})
require.NoError(t, err)
return svc
}
func allowChecks(checks ...check) map[check]bool {
allow := make(map[check]bool, len(checks))
for _, c := range checks {
allow[c] = true
}
return allow
}
func newTestDesktop(t *testing.T, name string) *linuxdesktopv1pb.LinuxDesktop {
t.Helper()
desktop, err := NewLinuxDesktop(name, linuxdesktopv1pb.LinuxDesktopSpec_builder{
Addr: "127.0.0.1:22",
Hostname: "desktop-host",
}.Build())
require.NoError(t, err)
return desktop
}
func TestServiceListLinuxDesktops(t *testing.T) {
t.Parallel()
ctx := t.Context()
var desktops []*linuxdesktopv1pb.LinuxDesktop
for i := 0; i < 10; i++ {
desktops = append(desktops, newTestDesktop(t, fmt.Sprintf("desktop-%d", i)))
}
reader := &fakeReader{
listResp: desktops,
listNext: "",
}
backend := &fakeBackend{}
checker := &fakeChecker{
allow: allowChecks(
check{kind: types.KindLinuxDesktop, verb: types.VerbList},
check{kind: types.KindLinuxDesktop, verb: types.VerbRead},
),
}
service := newTestService(t, checker, authz.AdminActionAuthNotRequired, backend, reader)
resp, err := service.ListLinuxDesktops(ctx, linuxdesktopv1pb.ListLinuxDesktopsRequest_builder{PageSize: 5}.Build())
require.NoError(t, err)
require.Equal(t, desktops[:5], resp.GetLinuxDesktops())
require.Equal(t, "desktop-5", resp.GetNextPageToken())
require.True(t, reader.listCalled)
require.Equal(t, defaults.DefaultChunkSize, reader.listPageSize)
require.Empty(t, reader.listToken)
require.Equal(t, []check{
{kind: types.KindLinuxDesktop, verb: types.VerbList},
{kind: types.KindLinuxDesktop, verb: types.VerbRead},
}, checker.checks)
reader.listToken = ""
reader.listPageSize = 0
reader.listCalled = false
reader.listResp = desktops[5:]
checker.checks = checker.checks[:0]
resp, err = service.ListLinuxDesktops(ctx, linuxdesktopv1pb.ListLinuxDesktopsRequest_builder{
PageSize: 5,
PageToken: "desktop-5",
}.Build())
require.NoError(t, err)
require.Equal(t, desktops[5:], resp.GetLinuxDesktops())
require.Empty(t, resp.GetNextPageToken())
require.True(t, reader.listCalled)
require.Equal(t, defaults.DefaultChunkSize, reader.listPageSize)
require.Equal(t, "desktop-5", reader.listToken)
require.Equal(t, []check{
{kind: types.KindLinuxDesktop, verb: types.VerbList},
{kind: types.KindLinuxDesktop, verb: types.VerbRead},
}, checker.checks)
}
func TestServiceGetLinuxDesktop(t *testing.T) {
t.Parallel()
ctx := t.Context()
desktop := newTestDesktop(t, "desktop-1")
reader := &fakeReader{
getResp: desktop,
}
backend := &fakeBackend{}
checker := &fakeChecker{
allow: allowChecks(
check{kind: types.KindLinuxDesktop, verb: types.VerbRead},
),
}
service := newTestService(t, checker, authz.AdminActionAuthNotRequired, backend, reader)
resp, err := service.GetLinuxDesktop(ctx, linuxdesktopv1pb.GetLinuxDesktopRequest_builder{
Name: "desktop-1",
}.Build())
require.NoError(t, err)
require.Equal(t, desktop, resp)
require.True(t, reader.getCalled)
require.Equal(t, "desktop-1", reader.getName)
require.Equal(t, []check{
{kind: types.KindLinuxDesktop, verb: types.VerbRead},
}, checker.checks)
}
func TestServiceCreateLinuxDesktop(t *testing.T) {
t.Parallel()
ctx := t.Context()
desktop := newTestDesktop(t, "desktop-1")
reader := &fakeReader{}
backend := &fakeBackend{createResp: desktop}
checker := &fakeChecker{
allow: allowChecks(
check{kind: types.KindLinuxDesktop, verb: types.VerbCreate},
),
}
service := newTestService(t, checker, authz.AdminActionAuthNotRequired, backend, reader)
resp, err := service.CreateLinuxDesktop(ctx, linuxdesktopv1pb.CreateLinuxDesktopRequest_builder{
LinuxDesktop: desktop,
}.Build())
require.NoError(t, err)
require.Equal(t, desktop, resp)
require.True(t, backend.createCalled)
require.Equal(t, desktop, backend.createReq)
require.Equal(t, []check{
{kind: types.KindLinuxDesktop, verb: types.VerbCreate},
}, checker.checks)
}
func TestServiceCreateLinuxDesktopMissingDesktop(t *testing.T) {
t.Parallel()
ctx := t.Context()
reader := &fakeReader{}
backend := &fakeBackend{}
checker := &fakeChecker{
allow: allowChecks(
check{kind: types.KindLinuxDesktop, verb: types.VerbCreate},
),
}
service := newTestService(t, checker, authz.AdminActionAuthNotRequired, backend, reader)
_, err := service.CreateLinuxDesktop(ctx, &linuxdesktopv1pb.CreateLinuxDesktopRequest{})
require.Error(t, err)
require.True(t, trace.IsBadParameter(err))
require.False(t, backend.createCalled)
}
func TestServiceUpdateLinuxDesktop(t *testing.T) {
t.Parallel()
ctx := t.Context()
desktop := newTestDesktop(t, "desktop-1")
reader := &fakeReader{getResp: desktop}
backend := &fakeBackend{updateResp: desktop}
checker := &fakeChecker{
allow: allowChecks(
check{kind: types.KindLinuxDesktop, verb: types.VerbUpdate},
),
}
service := newTestService(t, checker, authz.AdminActionAuthNotRequired, backend, reader)
resp, err := service.UpdateLinuxDesktop(ctx, linuxdesktopv1pb.UpdateLinuxDesktopRequest_builder{
LinuxDesktop: desktop,
}.Build())
require.NoError(t, err)
require.Equal(t, desktop, resp)
require.True(t, backend.updateCalled)
require.Equal(t, desktop, backend.updateReq)
require.Equal(t, []check{
{kind: types.KindLinuxDesktop, verb: types.VerbUpdate},
}, checker.checks)
}
func TestServiceUpdateLinuxDesktopMissingDesktop(t *testing.T) {
t.Parallel()
ctx := t.Context()
reader := &fakeReader{}
backend := &fakeBackend{}
checker := &fakeChecker{
allow: allowChecks(
check{kind: types.KindLinuxDesktop, verb: types.VerbUpdate},
),
}
service := newTestService(t, checker, authz.AdminActionAuthNotRequired, backend, reader)
_, err := service.UpdateLinuxDesktop(ctx, &linuxdesktopv1pb.UpdateLinuxDesktopRequest{})
require.Error(t, err)
require.True(t, trace.IsBadParameter(err))
require.False(t, backend.updateCalled)
}
func TestServiceUpsertLinuxDesktop(t *testing.T) {
t.Parallel()
ctx := t.Context()
desktop := newTestDesktop(t, "desktop-1")
reader := &fakeReader{getResp: desktop}
backend := &fakeBackend{upsertResp: desktop}
checker := &fakeChecker{
allow: allowChecks(
check{kind: types.KindLinuxDesktop, verb: types.VerbUpdate},
check{kind: types.KindLinuxDesktop, verb: types.VerbCreate},
),
}
service := newTestService(t, checker, authz.AdminActionAuthNotRequired, backend, reader)
resp, err := service.UpsertLinuxDesktop(ctx, linuxdesktopv1pb.UpsertLinuxDesktopRequest_builder{
LinuxDesktop: desktop,
}.Build())
require.NoError(t, err)
require.Equal(t, desktop, resp)
require.True(t, backend.upsertCalled)
require.Equal(t, desktop, backend.upsertReq)
require.Equal(t, []check{
{kind: types.KindLinuxDesktop, verb: types.VerbUpdate},
{kind: types.KindLinuxDesktop, verb: types.VerbCreate},
}, checker.checks)
}
func TestServiceUpsertLinuxDesktopMissingDesktop(t *testing.T) {
t.Parallel()
ctx := t.Context()
reader := &fakeReader{}
backend := &fakeBackend{}
checker := &fakeChecker{
allow: allowChecks(
check{kind: types.KindLinuxDesktop, verb: types.VerbUpdate},
check{kind: types.KindLinuxDesktop, verb: types.VerbCreate},
),
}
service := newTestService(t, checker, authz.AdminActionAuthNotRequired, backend, reader)
_, err := service.UpsertLinuxDesktop(ctx, &linuxdesktopv1pb.UpsertLinuxDesktopRequest{})
require.Error(t, err)
require.True(t, trace.IsBadParameter(err))
require.False(t, backend.upsertCalled)
}
func TestServiceDeleteLinuxDesktop(t *testing.T) {
t.Parallel()
ctx := t.Context()
reader := &fakeReader{getResp: newTestDesktop(t, "desktop-1")}
backend := &fakeBackend{}
checker := &fakeChecker{
allow: allowChecks(
check{kind: types.KindLinuxDesktop, verb: types.VerbDelete},
),
}
service := newTestService(t, checker, authz.AdminActionAuthNotRequired, backend, reader)
_, err := service.DeleteLinuxDesktop(ctx, linuxdesktopv1pb.DeleteLinuxDesktopRequest_builder{
Name: "desktop-1",
}.Build())
require.NoError(t, err)
require.True(t, backend.deleteCalled)
require.Equal(t, "desktop-1", backend.deleteName)
require.Equal(t, []check{
{kind: types.KindLinuxDesktop, verb: types.VerbDelete},
}, checker.checks)
}
func TestServiceAdminActionRequired(t *testing.T) {
t.Parallel()
ctx := t.Context()
desktop := newTestDesktop(t, "desktop-1")
tests := []struct {
name string
call func(ctx context.Context, svc *Service) error
backendCheck func(t *testing.T, backend *fakeBackend)
allowed []check
}{
{
name: "create",
call: func(ctx context.Context, svc *Service) error {
_, err := svc.CreateLinuxDesktop(ctx, linuxdesktopv1pb.CreateLinuxDesktopRequest_builder{
LinuxDesktop: desktop,
}.Build())
return err
},
backendCheck: func(t *testing.T, backend *fakeBackend) {
require.False(t, backend.createCalled)
},
allowed: []check{{kind: types.KindLinuxDesktop, verb: types.VerbCreate}},
},
{
name: "update",
call: func(ctx context.Context, svc *Service) error {
_, err := svc.UpdateLinuxDesktop(ctx, linuxdesktopv1pb.UpdateLinuxDesktopRequest_builder{
LinuxDesktop: desktop,
}.Build())
return err
},
backendCheck: func(t *testing.T, backend *fakeBackend) {
require.False(t, backend.updateCalled)
},
allowed: []check{{kind: types.KindLinuxDesktop, verb: types.VerbUpdate}},
},
{
name: "upsert",
call: func(ctx context.Context, svc *Service) error {
_, err := svc.UpsertLinuxDesktop(ctx, linuxdesktopv1pb.UpsertLinuxDesktopRequest_builder{
LinuxDesktop: desktop,
}.Build())
return err
},
backendCheck: func(t *testing.T, backend *fakeBackend) {
require.False(t, backend.upsertCalled)
},
allowed: []check{
{kind: types.KindLinuxDesktop, verb: types.VerbUpdate},
{kind: types.KindLinuxDesktop, verb: types.VerbCreate},
},
},
{
name: "delete",
call: func(ctx context.Context, svc *Service) error {
_, err := svc.DeleteLinuxDesktop(ctx, linuxdesktopv1pb.DeleteLinuxDesktopRequest_builder{
Name: "desktop-1",
}.Build())
return err
},
backendCheck: func(t *testing.T, backend *fakeBackend) {
require.False(t, backend.deleteCalled)
},
allowed: []check{{kind: types.KindLinuxDesktop, verb: types.VerbDelete}},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
checker := &fakeChecker{allow: allowChecks(tt.allowed...)}
backend := &fakeBackend{}
reader := &fakeReader{}
service := newTestService(t, checker, authz.AdminActionAuthUnauthorized, backend, reader)
err := tt.call(ctx, service)
require.ErrorIs(t, err, &mfa.ErrAdminActionMFARequired)
tt.backendCheck(t, backend)
})
}
}
+25
View File
@@ -953,6 +953,7 @@ func roleSpecForProxy(clusterName string) types.RoleSpecV6 {
types.NewRule(types.KindWindowsDesktopService, services.RO()),
types.NewRule(types.KindDatabaseCertificate, []string{types.VerbCreate}),
types.NewRule(types.KindWindowsDesktop, services.RO()),
types.NewRule(types.KindLinuxDesktop, services.RO()),
types.NewRule(types.KindInstaller, services.RO()),
types.NewRule(types.KindConnectionDiagnostic, services.RW()),
types.NewRule(types.KindDatabaseService, services.RO()),
@@ -1295,6 +1296,7 @@ func unscopedDefinitionForBuiltinRole(clusterName string, recConfig readonly.Ses
DatabaseServiceLabels: types.Labels{types.Wildcard: []string{types.Wildcard}},
ClusterLabels: types.Labels{types.Wildcard: []string{types.Wildcard}},
WindowsDesktopLabels: types.Labels{types.Wildcard: []string{types.Wildcard}},
LinuxDesktopLabels: types.Labels{types.Wildcard: []string{types.Wildcard}},
GitHubPermissions: []types.GitHubPermission{{
Organizations: []string{types.Wildcard},
}},
@@ -1357,6 +1359,29 @@ func unscopedDefinitionForBuiltinRole(clusterName string, recConfig readonly.Ses
},
},
})
case types.RoleLinuxDesktop:
return services.RoleFromSpec(
role.String(),
types.RoleSpecV6{
Allow: types.RoleConditions{
Namespaces: []string{types.Wildcard},
LinuxDesktopLabels: types.Labels{types.Wildcard: []string{types.Wildcard}},
Rules: []types.Rule{
types.NewRule(types.KindEvent, services.WO()),
types.NewRule(types.KindCertAuthority, services.ReadNoSecrets()),
types.NewRule(types.KindClusterName, services.RO()),
types.NewRule(types.KindClusterAuditConfig, services.RO()),
types.NewRule(types.KindClusterNetworkingConfig, services.RO()),
types.NewRule(types.KindSessionRecordingConfig, services.RO()),
types.NewRule(types.KindClusterAuthPreference, services.RO()),
types.NewRule(types.KindUser, services.RO()),
types.NewRule(types.KindRole, services.RO()),
types.NewRule(types.KindNamespace, services.RO()),
types.NewRule(types.KindLock, services.RO()),
types.NewRule(types.KindLinuxDesktop, services.RO()),
},
},
})
case types.RoleDiscovery:
return services.RoleFromSpec(
role.String(),
+34 -1
View File
@@ -181,6 +181,7 @@ func ForAuth(cfg Config) Config {
{Kind: types.KindWindowsDesktopService},
{Kind: types.KindWindowsDesktop},
{Kind: types.KindDynamicWindowsDesktop},
{Kind: types.KindLinuxDesktop},
{Kind: types.KindKubeServer, ScopeFilter: allScopes},
{Kind: types.KindInstaller},
{Kind: types.KindKubernetesCluster, ScopeFilter: allScopes},
@@ -274,6 +275,7 @@ func ForProxy(cfg Config) Config {
{Kind: types.KindWindowsDesktopService},
{Kind: types.KindWindowsDesktop},
{Kind: types.KindDynamicWindowsDesktop},
{Kind: types.KindLinuxDesktop},
{Kind: types.KindKubeServer, ScopeFilter: allScopes},
{Kind: types.KindKubernetesCluster, ScopeFilter: allScopes},
{Kind: types.KindSAMLIdPServiceProvider},
@@ -328,6 +330,7 @@ func ForRemoteProxy(cfg Config) Config {
{Kind: types.KindNode},
{Kind: types.KindWindowsDesktop},
{Kind: types.KindWindowsDesktopService},
{Kind: types.KindLinuxDesktop},
{Kind: types.KindProxy},
{Kind: types.KindAuthServer},
{Kind: types.KindReverseTunnel},
@@ -453,6 +456,34 @@ func ForWindowsDesktop(cfg Config) Config {
return cfg
}
// ForLinuxDesktop sets up watch configuration for a Linux desktop service.
func ForLinuxDesktop(cfg Config) Config {
var caFilter map[string]string
if cfg.ClusterConfig != nil {
clusterName, err := cfg.ClusterConfig.GetClusterName(context.TODO())
if err == nil {
caFilter = types.CertAuthorityFilter{
types.HostCA: clusterName.GetClusterName(),
types.UserCA: types.Wildcard,
}.IntoMap()
}
}
cfg.target = "linux_desktop"
cfg.Watches = []types.WatchKind{
{Kind: types.KindCertAuthority, LoadSecrets: false, Filter: caFilter},
{Kind: types.KindClusterName},
{Kind: types.KindClusterAuditConfig},
{Kind: types.KindClusterNetworkingConfig},
{Kind: types.KindClusterAuthPreference},
{Kind: types.KindSessionRecordingConfig},
{Kind: types.KindUser},
{Kind: types.KindRole},
{Kind: types.KindLinuxDesktop},
}
cfg.QueueSize = defaults.LinuxDesktopQueueSize
return cfg
}
// ForDiscovery sets up watch configuration for discovery servers.
func ForDiscovery(cfg Config) Config {
cfg.target = "discovery"
@@ -715,10 +746,12 @@ type Config struct {
WebSession types.WebSessionInterface
// WebToken holds web tokens.
WebToken services.WebToken
// WindowsDesktops is a windows desktop service.
// WindowsDesktops is a Windows desktop service.
WindowsDesktops services.WindowsDesktops
// DynamicWindowsDesktops is a dynamic Windows desktop service.
DynamicWindowsDesktops services.DynamicWindowsDesktops
// LinuxDesktops is a Linux desktop service.
LinuxDesktops services.LinuxDesktops
// SAMLIdPServiceProviders is a SAML IdP service providers service.
SAMLIdPServiceProviders services.SAMLIdPServiceProviders
// UserGroups is a user groups service.
+28
View File
@@ -53,6 +53,7 @@ import (
identitycenterv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/identitycenter/v1"
kubewaitingcontainerpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
labelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/label/v1"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
machineidv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/machineid/v1"
notificationsv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/notifications/v1"
presencev1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/presence/v1"
@@ -152,6 +153,7 @@ type testPack struct {
webTokenS *local.IdentityService
windowsDesktops *local.WindowsDesktopService
dynamicWindowsDesktops *local.DynamicWindowsDesktopService
linuxDesktops *local.LinuxDesktopService
samlIDPServiceProviders *local.SAMLIdPServiceProviderService
userGroups *local.UserGroupService
okta *local.OktaService
@@ -392,6 +394,10 @@ func newPackWithoutCache(dir string, opts ...packOption) (*testPack, error) {
p.databases = local.NewDatabasesService(p.backend)
p.databaseServices = local.NewDatabaseServicesService(p.backend)
p.windowsDesktops = local.NewWindowsDesktopService(p.backend)
p.linuxDesktops, err = local.NewLinuxDesktopService(p.backend)
if err != nil {
return nil, trace.Wrap(err)
}
p.dynamicWindowsDesktops = dynamicWindowsDesktopService
p.samlIDPServiceProviders, err = local.NewSAMLIdPServiceProviderService(p.backend)
if err != nil {
@@ -602,6 +608,7 @@ func newPack(t testing.TB, setupConfig func(c Config) Config, opts ...packOption
Databases: p.databases,
WindowsDesktops: p.windowsDesktops,
DynamicWindowsDesktops: p.dynamicWindowsDesktops,
LinuxDesktops: p.linuxDesktops,
SAMLIdPServiceProviders: p.samlIDPServiceProviders,
UserGroups: p.userGroups,
Okta: p.okta,
@@ -876,6 +883,7 @@ func TestCompletenessInit(t *testing.T) {
Databases: p.databases,
WindowsDesktops: p.windowsDesktops,
DynamicWindowsDesktops: p.dynamicWindowsDesktops,
LinuxDesktops: p.linuxDesktops,
SAMLIdPServiceProviders: p.samlIDPServiceProviders,
UserGroups: p.userGroups,
Okta: p.okta,
@@ -969,6 +977,7 @@ func TestCompletenessReset(t *testing.T) {
Databases: p.databases,
WindowsDesktops: p.windowsDesktops,
DynamicWindowsDesktops: p.dynamicWindowsDesktops,
LinuxDesktops: p.linuxDesktops,
SAMLIdPServiceProviders: p.samlIDPServiceProviders,
UserGroups: p.userGroups,
Okta: p.okta,
@@ -1137,6 +1146,7 @@ func TestListResources_NodesTTLVariant(t *testing.T) {
Databases: p.databases,
WindowsDesktops: p.windowsDesktops,
DynamicWindowsDesktops: p.dynamicWindowsDesktops,
LinuxDesktops: p.linuxDesktops,
SAMLIdPServiceProviders: p.samlIDPServiceProviders,
UserGroups: p.userGroups,
Okta: p.okta,
@@ -1242,6 +1252,7 @@ func initStrategy(t *testing.T) {
Databases: p.databases,
WindowsDesktops: p.windowsDesktops,
DynamicWindowsDesktops: p.dynamicWindowsDesktops,
LinuxDesktops: p.linuxDesktops,
SAMLIdPServiceProviders: p.samlIDPServiceProviders,
UserGroups: p.userGroups,
Okta: p.okta,
@@ -1972,6 +1983,7 @@ func TestCacheWatchKindExistsInEvents(t *testing.T) {
types.KindWindowsDesktopService: &types.WindowsDesktopServiceV3{},
types.KindWindowsDesktop: &types.WindowsDesktopV3{},
types.KindDynamicWindowsDesktop: &types.DynamicWindowsDesktopV1{},
types.KindLinuxDesktop: types.ProtoResource153ToLegacy(newLinuxDesktop("linux-desktop")),
types.KindInstaller: &types.InstallerV1{},
types.KindKubernetesCluster: &types.KubernetesClusterV3{},
types.KindSAMLIdPServiceProvider: &types.SAMLIdPServiceProviderV1{},
@@ -2046,6 +2058,8 @@ func TestCacheWatchKindExistsInEvents(t *testing.T) {
switch uw := event.Resource.(type) {
case types.Resource153UnwrapperT[*workloadidentityv1.WorkloadIdentity]:
require.Empty(t, cmp.Diff(resource.(types.Resource153UnwrapperT[*workloadidentityv1.WorkloadIdentity]).UnwrapT(), uw.UnwrapT(), protocmp.Transform()))
case types.Resource153UnwrapperT[*linuxdesktopv1.LinuxDesktop]:
require.Empty(t, cmp.Diff(resource.(types.Resource153UnwrapperT[*linuxdesktopv1.LinuxDesktop]).UnwrapT(), uw.UnwrapT(), protocmp.Transform()))
case types.Resource153UnwrapperT[*identitycenterv1.PrincipalAssignment]:
require.Empty(t, cmp.Diff(resource.(types.Resource153UnwrapperT[*identitycenterv1.PrincipalAssignment]).UnwrapT(), uw.UnwrapT(), protocmp.Transform()))
case types.Resource153UnwrapperT[*identitycenterv1.AccountAssignment]:
@@ -2562,6 +2576,20 @@ func newAccessGraphSettings(t *testing.T) *clusterconfigpb.AccessGraphSettings {
return r
}
func newLinuxDesktop(name string) *linuxdesktopv1.LinuxDesktop {
return linuxdesktopv1.LinuxDesktop_builder{
Kind: types.KindLinuxDesktop,
Version: types.V1,
Metadata: &headerv1.Metadata{
Name: name,
},
Spec: linuxdesktopv1.LinuxDesktopSpec_builder{
Addr: "127.0.0.1:22",
Hostname: "host",
}.Build(),
}.Build()
}
func newUserNotification(t *testing.T, name string) *notificationsv1.Notification {
t.Helper()
+10
View File
@@ -31,6 +31,7 @@ import (
healthcheckconfigv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/healthcheckconfig/v1"
identitycenterv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/identitycenter/v1"
kubewaitingcontainerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
machineidv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/machineid/v1"
notificationsv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/notifications/v1"
presencev1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/presence/v1"
@@ -96,6 +97,7 @@ type collections struct {
windowsDesktops *collection[types.WindowsDesktop, windowsDesktopIndex]
windowsDesktopServices *collection[types.WindowsDesktopService, windowsDesktopServiceIndex]
dynamicWindowsDesktops *collection[types.DynamicWindowsDesktop, dynamicWindowsDesktopIndex]
linuxDesktops *collection[*linuxdesktopv1.LinuxDesktop, linuxDesktopIndex]
userGroups *collection[types.UserGroup, userGroupIndex]
identityCenterAccounts *collection[*identitycenterv1.Account, identityCenterAccountIndex]
identityCenterAccountAssignments *collection[*identitycenterv1.AccountAssignment, identityCenterAccountAssignmentIndex]
@@ -373,6 +375,14 @@ func setupCollections(c Config) (*collections, error) {
out.dynamicWindowsDesktops = collect
out.byKind[resourceKind] = out.dynamicWindowsDesktops
case types.KindLinuxDesktop:
collect, err := newLinuxDesktopCollection(c.LinuxDesktops, watch)
if err != nil {
return nil, trace.Wrap(err)
}
out.linuxDesktops = collect
out.byKind[resourceKind] = out.linuxDesktops
case types.KindUserGroup:
collect, err := newUserGroupCollection(c.UserGroups, watch)
if err != nil {
+4
View File
@@ -129,6 +129,9 @@ func setupTestCache(t *testing.T, setupConfig cache.SetupConfigFn) (*testCache,
databaseServices := local.NewDatabaseServicesService(bkWrapper)
windowsDesktops := local.NewWindowsDesktopService(bkWrapper)
linuxDesktops, err := local.NewLinuxDesktopService(bkWrapper)
require.NoError(t, err)
samlIDPServiceProviders, err := local.NewSAMLIdPServiceProviderService(bkWrapper)
require.NoError(t, err)
@@ -250,6 +253,7 @@ func setupTestCache(t *testing.T, setupConfig cache.SetupConfigFn) (*testCache,
Databases: databases,
WindowsDesktops: windowsDesktops,
DynamicWindowsDesktops: dynamicWindowsDesktopService,
LinuxDesktops: linuxDesktops,
SAMLIdPServiceProviders: samlIDPServiceProviders,
UserGroups: userGroups,
Okta: oktaSvc,
+107
View File
@@ -0,0 +1,107 @@
// Teleport
// Copyright (C) 2026 Gravitational, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package cache
import (
"context"
"github.com/gravitational/trace"
"google.golang.org/protobuf/proto"
headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/api/utils/clientutils"
"github.com/gravitational/teleport/lib/services"
)
type linuxDesktopIndex string
const linuxDesktopNameIndex linuxDesktopIndex = "linux-desktop"
func newLinuxDesktopCollection(upstream services.LinuxDesktops, w types.WatchKind) (*collection[*linuxdesktopv1.LinuxDesktop, linuxDesktopIndex], error) {
if upstream == nil {
return nil, trace.BadParameter("missing parameter upstream")
}
s := newStore(
types.KindLinuxDesktop,
proto.CloneOf[*linuxdesktopv1.LinuxDesktop],
map[linuxDesktopIndex]func(*linuxdesktopv1.LinuxDesktop) string{
linuxDesktopNameIndex: func(r *linuxdesktopv1.LinuxDesktop) string {
return r.GetMetadata().GetName()
},
})
return &collection[*linuxdesktopv1.LinuxDesktop, linuxDesktopIndex]{
store: s,
fetcher: func(ctx context.Context, loadSecrets bool) ([]*linuxdesktopv1.LinuxDesktop, error) {
var out []*linuxdesktopv1.LinuxDesktop
for desktop, err := range clientutils.Resources(ctx, upstream.ListLinuxDesktops) {
if err != nil {
return nil, trace.Wrap(err)
}
out = append(out, desktop)
}
return out, nil
},
headerTransform: func(hdr *types.ResourceHeader) *linuxdesktopv1.LinuxDesktop {
d := &linuxdesktopv1.LinuxDesktop{}
d.SetKind(hdr.Kind)
d.SetVersion(hdr.Version)
d.SetMetadata(&headerv1.Metadata{
Name: hdr.Metadata.Name,
})
return d
},
watch: w,
}, nil
}
// ListLinuxDesktops lists linuxdesktops with pagination.
func (c *Cache) ListLinuxDesktops(ctx context.Context, pageSize int, nextToken string) ([]*linuxdesktopv1.LinuxDesktop, string, error) {
ctx, span := c.Tracer.Start(ctx, "cache/ListLinuxDesktops")
defer span.End()
lister := genericLister[*linuxdesktopv1.LinuxDesktop, linuxDesktopIndex]{
cache: c,
collection: c.collections.linuxDesktops,
index: linuxDesktopNameIndex,
upstreamList: c.Config.LinuxDesktops.ListLinuxDesktops,
nextToken: func(t *linuxdesktopv1.LinuxDesktop) string {
return t.GetMetadata().GetName()
},
}
out, next, err := lister.list(ctx, pageSize, nextToken)
return out, next, trace.Wrap(err)
}
// GetLinuxDesktop fetches a linuxdesktop by name.
func (c *Cache) GetLinuxDesktop(ctx context.Context, name string) (*linuxdesktopv1.LinuxDesktop, error) {
ctx, span := c.Tracer.Start(ctx, "cache/GetLinuxDesktop")
defer span.End()
getter := genericGetter[*linuxdesktopv1.LinuxDesktop, linuxDesktopIndex]{
cache: c,
collection: c.collections.linuxDesktops,
index: linuxDesktopNameIndex,
upstreamGet: c.Config.LinuxDesktops.GetLinuxDesktop,
}
out, err := getter.get(ctx, name)
return out, trace.Wrap(err)
}
+72
View File
@@ -0,0 +1,72 @@
// Teleport
// Copyright (C) 2026 Gravitational, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package cache
import (
"context"
"testing"
"github.com/gravitational/trace"
headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1"
linuxdesktopv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/linuxdesktop/v1"
"github.com/gravitational/teleport/api/types"
)
func TestLinuxDesktop(t *testing.T) {
t.Parallel()
p := newTestPack(t, ForAuth)
t.Cleanup(p.Close)
testResources153(t, p, testFuncs[*linuxdesktopv1.LinuxDesktop]{
newResource: func(name string) (*linuxdesktopv1.LinuxDesktop, error) {
return newLinuxDesktopResource(name), nil
},
create: func(ctx context.Context, desktop *linuxdesktopv1.LinuxDesktop) error {
_, err := p.linuxDesktops.CreateLinuxDesktop(ctx, desktop)
return trace.Wrap(err)
},
list: p.linuxDesktops.ListLinuxDesktops,
cacheGet: func(ctx context.Context, name string) (*linuxdesktopv1.LinuxDesktop, error) {
return p.cache.GetLinuxDesktop(ctx, name)
},
cacheList: p.cache.ListLinuxDesktops,
update: func(ctx context.Context, desktop *linuxdesktopv1.LinuxDesktop) error {
_, err := p.linuxDesktops.UpdateLinuxDesktop(ctx, desktop)
return trace.Wrap(err)
},
delete: func(ctx context.Context, name string) error {
return p.linuxDesktops.DeleteLinuxDesktop(ctx, name)
},
deleteAll: p.linuxDesktops.DeleteAllLinuxDesktops,
})
}
func newLinuxDesktopResource(name string) *linuxdesktopv1.LinuxDesktop {
return linuxdesktopv1.LinuxDesktop_builder{
Kind: types.KindLinuxDesktop,
Version: types.V1,
Metadata: &headerv1.Metadata{
Name: name,
},
Spec: linuxdesktopv1.LinuxDesktopSpec_builder{
Addr: "127.0.0.1:22",
Hostname: "host",
}.Build(),
}.Build()
}
+7
View File
@@ -134,6 +134,7 @@ type ReissueParams struct {
RouteToDatabase proto.RouteToDatabase
RouteToApp proto.RouteToApp
RouteToWindowsDesktop proto.RouteToWindowsDesktop
RouteToLinuxDesktop proto.RouteToLinuxDesktop
// ExistingCreds is a gross hack for lib/web/terminal.go to pass in
// existing user credentials. The TeleportClient in lib/web/terminal.go
@@ -185,6 +186,10 @@ func (p ReissueParams) usage() proto.UserCertsRequest_CertUsage {
// Windows desktop means a request for a TLS certificate for access to a specific
// desktop, as specified by RouteToWindowsDesktop.
return proto.UserCertsRequest_WindowsDesktop
case p.RouteToLinuxDesktop.LinuxDesktop != "":
// Linux desktop means a request for a TLS certificate for access to a specific
// desktop, as specified by RouteToLinuxDesktop.
return proto.UserCertsRequest_LinuxDesktop
default:
// All means a request for both SSH and TLS certificates for the
// overall user session. These certificates are not specific to any SSH
@@ -206,6 +211,8 @@ func (p ReissueParams) isMFARequiredRequest(sshLogin string) (*proto.IsMFARequir
req.Target = &proto.IsMFARequiredRequest_App{App: &p.RouteToApp}
case p.RouteToWindowsDesktop.WindowsDesktop != "":
req.Target = &proto.IsMFARequiredRequest_WindowsDesktop{WindowsDesktop: &p.RouteToWindowsDesktop}
case p.RouteToLinuxDesktop.LinuxDesktop != "":
req.Target = &proto.IsMFARequiredRequest_LinuxDesktop{LinuxDesktop: &p.RouteToLinuxDesktop}
default:
return nil, trace.BadParameter("reissue params have no valid MFA target")
}

Some files were not shown because too many files have changed in this diff Show More