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
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user