2021-11-16 18:04:01 +00:00
|
|
|
//go:build !consulent
|
2020-01-29 22:30:38 +00:00
|
|
|
// +build !consulent
|
|
|
|
|
|
|
|
package connect
|
|
|
|
|
|
|
|
import (
|
2021-06-25 21:47:47 +00:00
|
|
|
"fmt"
|
|
|
|
|
2022-04-05 21:10:06 +00:00
|
|
|
"github.com/hashicorp/consul/acl"
|
2020-01-29 22:30:38 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// GetEnterpriseMeta will synthesize an EnterpriseMeta struct from the SpiffeIDService.
|
|
|
|
// in OSS this just returns an empty (but never nil) struct pointer
|
2022-04-05 21:10:06 +00:00
|
|
|
func (id SpiffeIDService) GetEnterpriseMeta() *acl.EnterpriseMeta {
|
|
|
|
return &acl.EnterpriseMeta{}
|
2020-01-29 22:30:38 +00:00
|
|
|
}
|
2021-06-25 21:47:47 +00:00
|
|
|
|
|
|
|
func (id SpiffeIDService) uriPath() string {
|
|
|
|
return fmt.Sprintf("/ns/%s/dc/%s/svc/%s",
|
|
|
|
id.NamespaceOrDefault(),
|
|
|
|
id.Datacenter,
|
|
|
|
id.Service,
|
|
|
|
)
|
|
|
|
}
|