feat(api): Add RDP target attributes
This commit is contained in:
1 parent
0d15330ac4
commit
f5cdf2a354
7 files changed
+288
-73
No files matched your search
@@ -1099,6 +1099,15 @@ var inputStructs = []*structInfo{
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
inProto: &targets.RdpTargetAttributes{},
|
||||
outFile: "targets/rdp_target_attributes.gen.go",
|
||||
subtypeName: "RdpTarget",
|
||||
parentTypeName: "Target",
|
||||
templates: []*template.Template{
|
||||
mapstructureConversionTemplate,
|
||||
},
|
||||
},
|
||||
{
|
||||
inProto: &targets.Target{},
|
||||
outFile: "targets/target.gen.go",
|
||||
|
||||
@@ -589,7 +589,7 @@ func validateCreateRequest(req *pbs.CreateAliasRequest) error {
|
||||
badFields[globals.TypeField] = "This field is required. Current supported values are 'target'."
|
||||
}
|
||||
if req.GetItem().GetDestinationId().GetValue() != "" &&
|
||||
!handlers.ValidId(handlers.Id(req.GetItem().GetDestinationId().GetValue()), globals.TcpTargetPrefix, globals.SshTargetPrefix) {
|
||||
!handlers.ValidId(handlers.Id(req.GetItem().GetDestinationId().GetValue()), globals.TcpTargetPrefix, globals.SshTargetPrefix, globals.RdpTargetPrefix) {
|
||||
badFields[globals.DestinationIdField] = "Incorrectly formatted identifier."
|
||||
}
|
||||
if req.GetItem().GetTargetAliasAttributes().GetAuthorizeSessionArguments().GetHostId() != "" {
|
||||
@@ -611,7 +611,7 @@ func validateUpdateRequest(req *pbs.UpdateAliasRequest) error {
|
||||
badFields["value"] = "This field is required."
|
||||
}
|
||||
if req.GetItem().GetDestinationId().GetValue() != "" &&
|
||||
!handlers.ValidId(handlers.Id(req.GetItem().GetDestinationId().GetValue()), globals.TcpTargetPrefix, globals.SshTargetPrefix) {
|
||||
!handlers.ValidId(handlers.Id(req.GetItem().GetDestinationId().GetValue()), globals.TcpTargetPrefix, globals.SshTargetPrefix, globals.RdpTargetPrefix) {
|
||||
badFields[globals.DestinationIdField] = "Incorrectly formatted identifier."
|
||||
}
|
||||
if req.GetItem().GetTargetAliasAttributes().GetAuthorizeSessionArguments().GetHostId() != "" &&
|
||||
|
||||
@@ -2061,6 +2061,7 @@ func validateAddCredentialSourcesRequest(req *pbs.AddTargetCredentialSourcesRequ
|
||||
globals.VaultSshCertificateCredentialLibraryPrefix,
|
||||
globals.UsernamePasswordCredentialPrefix,
|
||||
globals.UsernamePasswordCredentialPreviousPrefix,
|
||||
globals.UsernamePasswordDomainCredentialPrefix,
|
||||
globals.SshPrivateKeyCredentialPrefix) {
|
||||
badFields[globals.InjectedApplicationCredentialSourceIdsField] = fmt.Sprintf("Incorrectly formatted credential source identifier %q.", cl)
|
||||
break
|
||||
@@ -2098,6 +2099,7 @@ func validateSetCredentialSourcesRequest(req *pbs.SetTargetCredentialSourcesRequ
|
||||
globals.VaultSshCertificateCredentialLibraryPrefix,
|
||||
globals.UsernamePasswordCredentialPrefix,
|
||||
globals.UsernamePasswordCredentialPreviousPrefix,
|
||||
globals.UsernamePasswordDomainCredentialPrefix,
|
||||
globals.SshPrivateKeyCredentialPrefix) {
|
||||
badFields[globals.InjectedApplicationCredentialSourceIdsField] = fmt.Sprintf("Incorrectly formatted credential source identifier %q.", cl)
|
||||
break
|
||||
@@ -2139,6 +2141,7 @@ func validateRemoveCredentialSourcesRequest(req *pbs.RemoveTargetCredentialSourc
|
||||
globals.VaultSshCertificateCredentialLibraryPrefix,
|
||||
globals.UsernamePasswordCredentialPrefix,
|
||||
globals.UsernamePasswordCredentialPreviousPrefix,
|
||||
globals.UsernamePasswordDomainCredentialPrefix,
|
||||
globals.SshPrivateKeyCredentialPrefix,
|
||||
globals.JsonCredentialPrefix) {
|
||||
badFields[globals.InjectedApplicationCredentialSourceIdsField] = fmt.Sprintf("Incorrectly formatted credential source identifier %q.", cl)
|
||||
|
||||
@@ -223,6 +223,11 @@ message Target {
|
||||
(custom_options.v1.generate_sdk_option) = true,
|
||||
(custom_options.v1.subtype) = "ssh"
|
||||
];
|
||||
RdpTargetAttributes rdp_target_attributes = 203 [
|
||||
(google.api.field_visibility).restriction = "INTERNAL",
|
||||
(custom_options.v1.generate_sdk_option) = true,
|
||||
(custom_options.v1.subtype) = "rdp"
|
||||
];
|
||||
}
|
||||
|
||||
// Output only. The available actions on this resource for this user.
|
||||
@@ -323,6 +328,30 @@ message SshTargetAttributes {
|
||||
]; // @gotags: `class:"public" eventstream:"observation"`
|
||||
}
|
||||
|
||||
// RdpTargetAttributes contains attributes relevant to Targets of type "rdp"
|
||||
message RdpTargetAttributes {
|
||||
// The default RDP port that will be used when connecting to the endpoint unless overridden by a Host Set or Host.
|
||||
// If this is not specified the DefaultPort will be 3389.
|
||||
google.protobuf.UInt32Value default_port = 10 [
|
||||
json_name = "default_port",
|
||||
(custom_options.v1.generate_sdk_option) = true,
|
||||
(custom_options.v1.mask_mapping) = {
|
||||
this: "attributes.default_port"
|
||||
that: "DefaultPort"
|
||||
}
|
||||
]; // @gotags: `class:"public"`
|
||||
|
||||
// The default RDP port that will be listened on by the client's local proxy.
|
||||
google.protobuf.UInt32Value default_client_port = 20 [
|
||||
json_name = "default_client_port",
|
||||
(custom_options.v1.generate_sdk_option) = true,
|
||||
(custom_options.v1.mask_mapping) = {
|
||||
this: "attributes.default_client_port"
|
||||
that: "DefaultClientPort"
|
||||
}
|
||||
]; // @gotags: `class:"public"`
|
||||
}
|
||||
|
||||
// WorkerInfo contains information about workers, returned in to the client in SessionAuthorization
|
||||
message WorkerInfo {
|
||||
// Output only. The address of the worker.
|
||||
|
||||
Reference in new issue
Block a user