diff --git a/vault/logical_system.go b/vault/logical_system.go index e98dfae91f94..b1fef7011a58 100644 --- a/vault/logical_system.go +++ b/vault/logical_system.go @@ -18,17 +18,16 @@ import ( "sync" "time" - multierror "github.com/hashicorp/go-multierror" - "github.com/hashicorp/vault/physical/raft" - "github.com/hashicorp/errwrap" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" + multierror "github.com/hashicorp/go-multierror" uuid "github.com/hashicorp/go-uuid" "github.com/hashicorp/vault/helper/hostutil" "github.com/hashicorp/vault/helper/identity" "github.com/hashicorp/vault/helper/metricsutil" "github.com/hashicorp/vault/helper/namespace" + "github.com/hashicorp/vault/physical/raft" "github.com/hashicorp/vault/sdk/framework" "github.com/hashicorp/vault/sdk/helper/consts" "github.com/hashicorp/vault/sdk/helper/jsonutil" @@ -3037,13 +3036,15 @@ func (b *SystemBackend) pathInternalUIMountRead(ctx context.Context, req *logica if filtered { return errResp, logical.ErrPermissionDenied } - resp := &logical.Response{ Data: mountInfo(me), } resp.Data["path"] = me.Path + + fullMountPath := ns.Path + me.Path if ns.ID != me.Namespace().ID { resp.Data["path"] = me.Namespace().Path + me.Path + fullMountPath = ns.Path + me.Namespace().Path + me.Path } // Load the ACL policies so we can walk the prefix for this mount @@ -3060,7 +3061,7 @@ func (b *SystemBackend) pathInternalUIMountRead(ctx context.Context, req *logica return nil, logical.ErrPermissionDenied } - if !hasMountAccess(ctx, acl, ns.Path+me.Path) { + if !hasMountAccess(ctx, acl, fullMountPath) { return errResp, logical.ErrPermissionDenied }