Skip to content

Commit

Permalink
Merge branch 'branch/v15' into bot/backport-35799-branch/v15
Browse files Browse the repository at this point in the history
  • Loading branch information
mdwn authored Mar 28, 2024
2 parents c2ee484 + aa2b1e2 commit c70079b
Show file tree
Hide file tree
Showing 137 changed files with 9,713 additions and 2,362 deletions.
361 changes: 287 additions & 74 deletions api/client/client.go

Large diffs are not rendered by default.

1,928 changes: 1,050 additions & 878 deletions api/client/proto/authservice.pb.go

Large diffs are not rendered by default.

243 changes: 127 additions & 116 deletions api/gen/proto/go/teleport/notifications/v1/notifications.pb.go

Large diffs are not rendered by default.

54 changes: 45 additions & 9 deletions api/proto/teleport/legacy/client/proto/authservice.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1956,6 +1956,9 @@ message PaginatedResource {
types.AppServerOrSAMLIdPServiceProviderV1 AppServerOrSAMLIdPServiceProvider = 11;
}

// Logins allowed for the included resource. Only to be populated for SSH and Desktops.
repeated string Logins = 13 [(gogoproto.jsontag) = "logins,omitempty"];

reserved 4;
reserved "KubeService";
}
Expand Down Expand Up @@ -1996,6 +1999,9 @@ message ListUnifiedResourcesRequest {
// PinnedOnly indicates that the request will pull only the pinned resources
// of the requesting user
bool PinnedOnly = 11 [(gogoproto.jsontag) = "pinned_only,omitempty"];
// IncludeLogins indicates that the response should include a users allowed logins
// for all returned resources.
bool IncludeLogins = 12 [(gogoproto.jsontag) = "include_logins,omitempty"];
}

// ListUnifiedResourceResponse response of ListUnifiedResources.
Expand Down Expand Up @@ -2055,6 +2061,9 @@ message ListResourcesRequest {
// UsePreviewAsRoles indicates that the response should include all resources
// the caller would be able to access with their preview_as_roles
bool UsePreviewAsRoles = 12 [(gogoproto.jsontag) = "use_preview_as_roles,omitempty"];
// IncludeLogins indicates that the response should include a users allowed logins
// for all returned resources.
bool IncludeLogins = 13 [(gogoproto.jsontag) = "include_logins,omitempty"];
}

// GetSSHTargetsRequest gets all servers that might match an equivalent ssh dial request.
Expand Down Expand Up @@ -3065,25 +3074,52 @@ service AuthService {
rpc GetClusterAuditConfig(google.protobuf.Empty) returns (types.ClusterAuditConfigV2);

// GetClusterNetworkingConfig gets cluster networking configuration.
rpc GetClusterNetworkingConfig(google.protobuf.Empty) returns (types.ClusterNetworkingConfigV2);
// Deprecated: Use clusterconfigv1.Service.GetClusterNetworkingConfig instead.
rpc GetClusterNetworkingConfig(google.protobuf.Empty) returns (types.ClusterNetworkingConfigV2) {
option deprecated = true;
}
// SetClusterNetworkingConfig sets cluster networking configuration.
rpc SetClusterNetworkingConfig(types.ClusterNetworkingConfigV2) returns (google.protobuf.Empty);
// Deprecated: Use clusterconfigv1.Service.Update/UpsertClusterNetworkingConfig instead.
rpc SetClusterNetworkingConfig(types.ClusterNetworkingConfigV2) returns (google.protobuf.Empty) {
option deprecated = true;
}
// ResetClusterNetworkingConfig resets cluster networking configuration to defaults.
rpc ResetClusterNetworkingConfig(google.protobuf.Empty) returns (google.protobuf.Empty);
// Deprecated: Use clusterconfigv1.Service.ResetClusterNetworkingConfig instead.
rpc ResetClusterNetworkingConfig(google.protobuf.Empty) returns (google.protobuf.Empty) {
option deprecated = true;
}

// GetSessionRecordingConfig gets session recording configuration.
rpc GetSessionRecordingConfig(google.protobuf.Empty) returns (types.SessionRecordingConfigV2);
// Deprecated: Use clusterconfigv1.Service.GetSessionRecordingConfig instead.
rpc GetSessionRecordingConfig(google.protobuf.Empty) returns (types.SessionRecordingConfigV2) {
option deprecated = true;
}
// SetSessionRecordingConfig sets session recording configuration.
rpc SetSessionRecordingConfig(types.SessionRecordingConfigV2) returns (google.protobuf.Empty);
// Deprecated: Use clusterconfigv1.Service.Upsert/UpdateSessionRecordingConfig instead.
rpc SetSessionRecordingConfig(types.SessionRecordingConfigV2) returns (google.protobuf.Empty) {
option deprecated = true;
}
// ResetSessionRecordingConfig resets session recording configuration to defaults.
rpc ResetSessionRecordingConfig(google.protobuf.Empty) returns (google.protobuf.Empty);
// Deprecated: Use clusterconfigv1.Service.ResetSessionRecordingConfig instead.
rpc ResetSessionRecordingConfig(google.protobuf.Empty) returns (google.protobuf.Empty) {
option deprecated = true;
}

// GetAuthPreference gets cluster auth preference.
rpc GetAuthPreference(google.protobuf.Empty) returns (types.AuthPreferenceV2);
// Deprecated: Use clusterconfigv1.Service.GetAuthPreference instead.
rpc GetAuthPreference(google.protobuf.Empty) returns (types.AuthPreferenceV2) {
option deprecated = true;
}
// SetAuthPreference sets cluster auth preference.
rpc SetAuthPreference(types.AuthPreferenceV2) returns (google.protobuf.Empty);
// Deprecated: Use clusterconfigv1.Service.Create/Update/UpsertAuthPreference instead.
rpc SetAuthPreference(types.AuthPreferenceV2) returns (google.protobuf.Empty) {
option deprecated = true;
}
// ResetAuthPreference resets cluster auth preference to defaults.
rpc ResetAuthPreference(google.protobuf.Empty) returns (google.protobuf.Empty);
// Deprecated: Use clusterconfigv1.Service.ResetAuthPreference instead.
rpc ResetAuthPreference(google.protobuf.Empty) returns (google.protobuf.Empty) {
option deprecated = true;
}

// GetUIConfig gets the configuration for the UI served by the proxy service
rpc GetUIConfig(google.protobuf.Empty) returns (types.UIConfigV1);
Expand Down
3 changes: 3 additions & 0 deletions api/proto/teleport/legacy/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6479,6 +6479,9 @@ message JamfInventoryEntry {
// Must be either "NOOP" or "DELETE".
// Defaults to "NOOP".
string on_missing = 4 [(gogoproto.jsontag) = "on_missing,omitempty"];
// Custom page size for inventory queries.
// A server default is used if zeroed or negative.
int32 page_size = 5 [(gogoproto.jsontag) = "page_size,omitempty"];
}

// MessageWithHeader is a message with a resource header. This is used primarily
Expand Down
2 changes: 2 additions & 0 deletions api/proto/teleport/notifications/v1/notifications.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ message NotificationSpec {
google.protobuf.Timestamp created = 2;
// unscoped is whether the notification shouldn't be restricted to a specific audience. This is to prevent the potential future possibility that a user-specific notification contains information that the user should no longer be allowed to see. Default is true.
bool unscoped = 3;
// username is the username of the target user if this is a user-specific notification. Requests for global notifications with a username will be rejected.
string username = 4;
}

// GlobalNotification represents a global notification.
Expand Down
9 changes: 9 additions & 0 deletions api/types/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@ type ResourceWithLabels interface {
MatchSearch(searchValues []string) bool
}

// EnrichedResource is a [ResourceWithLabels] wrapped with
// additional user-specific information.
type EnrichedResource struct {
// ResourceWithLabels is the underlying resource.
ResourceWithLabels
// Logins that the user is allowed to access the above resource with.
Logins []string
}

// ResourcesWithLabels is a list of labeled resources.
type ResourcesWithLabels []ResourceWithLabels

Expand Down
Loading

0 comments on commit c70079b

Please sign in to comment.