Documentation
¶
Index ¶
- Constants
- func AgentID(td spiffeid.TrustDomain, suffix string) (spiffeid.ID, error)
- func CheckAgentIDStringNormalization(agentID string) error
- func CheckIDProtoNormalization(in *types.SPIFFEID) error
- func CheckIDStringNormalization(id string) error
- func CheckIDURLNormalization(u *url.URL) error
- func EnsureLeadingSlashForBackcompat(path string) (string, bool)
- func IDFromProto(id *types.SPIFFEID) (spiffeid.ID, error)
- func IDProtoFromString(s string) (*types.SPIFFEID, error)
- func IDProtoString(id *types.SPIFFEID) (string, error)
- func IsAgentPath(path string) bool
- func IsReservedPath(path string) bool
- func MemberFromString(td spiffeid.TrustDomain, s string) (spiffeid.ID, error)
- func RequireAgentID(td spiffeid.TrustDomain, suffix string) spiffeid.ID
- func RequireIDFromProto(id *types.SPIFFEID) spiffeid.ID
- func RequireIDProtoString(id *types.SPIFFEID) string
- func RequireServerID(td spiffeid.TrustDomain) spiffeid.ID
- func ServerID(td spiffeid.TrustDomain) (spiffeid.ID, error)
Constants ¶
const (
ServerIDPath = "/spire/server"
)
Variables ¶
This section is empty.
Functions ¶
func AgentID ¶
AgentID creates an agent SPIFFE ID given a trust domain and a path suffix. The path suffix must be an absolute path. The /spire/agent prefix is prefixed to the suffix to form the path.
func CheckAgentIDStringNormalization ¶ added in v0.11.3
CheckAgentIDStringNormalization ensures the provided agent ID string is properly normalized. It also ensures it is not a server ID.
func CheckIDProtoNormalization ¶ added in v0.11.3
CheckIDProtoNormalization ensures the the provided ID is properly normalized.
func CheckIDStringNormalization ¶ added in v0.11.3
CheckIDStringNormalization ensures the the provided ID is properly normalized.
func CheckIDURLNormalization ¶ added in v0.11.3
CheckIDURLNormalization returns if a URL is normalized or not. It relies on behavior and fields populated by url.Parse(). DO NOT call it with a URL that has not gone through url.Parse().
func EnsureLeadingSlashForBackcompat ¶ added in v1.2.0
EnsureLeadingSlashForBackcompat is for backcompat only. It adds a leading slash to a path, if necessary. It is not expected to receive more callers. Deprecated: remove in SPIRE 1.3
func IDFromProto ¶ added in v0.11.3
IDFromProto returns SPIFFE ID from the proto representation
func IDProtoFromString ¶ added in v0.11.3
IDProtoFromString parses a SPIFFE ID string into the raw ID proto components. It does not attempt to escape/unescape any portion of the ID.
func IDProtoString ¶ added in v0.11.3
IDProtoString constructs a SPIFFE ID string for the given ID protobuf.
func IsAgentPath ¶ added in v0.11.0
IsAgentPath returns true if the given string is an SPIRE agent ID path. SPIRE agent IDs are prefixed with "/spire/agent/".
func IsReservedPath ¶ added in v0.11.0
func MemberFromString ¶ added in v1.2.0
func RequireAgentID ¶ added in v1.2.0
func RequireAgentID(td spiffeid.TrustDomain, suffix string) spiffeid.ID
RequireAgentID creates an agent SPIFFE ID given a trust domain and a path suffix. The path suffix must be an absolute path. The /spire/agent prefix is prefixed to the suffix to form the path. It panics if the given trust domain isn't valid.
func RequireIDFromProto ¶ added in v1.2.0
RequireIDFromProto returns a SPIFFE ID from the proto representation. It panics if the proto is not well formed.
func RequireIDProtoString ¶ added in v1.2.0
RequireIDProtoString constructs a SPIFFE ID string for the given ID proto. It panics if the proto is not well formed.
func RequireServerID ¶ added in v1.2.0
func RequireServerID(td spiffeid.TrustDomain) spiffeid.ID
RequireServerID returns the server SPIFFE ID for the given trust domain. It panics if the given trust domain isn't valid.
Types ¶
This section is empty.