|
|
|
|
@ -40,6 +40,7 @@ import (
|
|
|
|
|
"github.com/hashicorp/boundary/internal/types/subtypes"
|
|
|
|
|
"github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/scopes"
|
|
|
|
|
pb "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/targets"
|
|
|
|
|
fm "github.com/hashicorp/boundary/version"
|
|
|
|
|
"github.com/hashicorp/go-bexpr"
|
|
|
|
|
"github.com/hashicorp/go-secure-stdlib/strutil"
|
|
|
|
|
"github.com/mr-tron/base58"
|
|
|
|
|
@ -984,6 +985,13 @@ func (s Service) AuthorizeSession(ctx context.Context, req *pbs.AuthorizeSession
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// this is an edge case issue where the hostId cannot be empty when trying to execute an ssh connection
|
|
|
|
|
// on a tcp target type. By setting the hostId to the targetId value, this will enable support of previous
|
|
|
|
|
// boundary cli versions.
|
|
|
|
|
if fm.SupportsFeature(fm.Binary, fm.UseTargetIdForHostId) && t.GetAddress() != "" {
|
|
|
|
|
hostId = t.GetPublicId()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sad := &pb.SessionAuthorizationData{
|
|
|
|
|
SessionId: sess.PublicId,
|
|
|
|
|
TargetId: t.GetPublicId(),
|
|
|
|
|
|