Documentation
¶
Overview ¶
Package facts defines normalized authentication, user, and host data shared by inventory resolution and policy evaluation, without transport metadata.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
Authentication contains inventory's verified identity and session bound. It deliberately contains no bearer credentials or provider-specific claims.
func (Authentication) Validate ¶
func (a Authentication) Validate() error
Validate checks the verified identity and its absolute lifetime bound.
type HostResource ¶
type HostResource struct {
Names []string `json:"names"`
Labels map[string]string `json:"labels"`
// Nil means ungrounded; a non-nil slice restricts accounts to its members.
// An empty slice permits no accounts. JSON decoding rejects omission.
Accounts []string `json:"accounts"`
}
func (*HostResource) UnmarshalJSON ¶ added in v0.31.0
func (h *HostResource) UnmarshalJSON(data []byte) error
UnmarshalJSON requires an explicit account restriction and decodes it before exposing host facts. Keep strict decoding for policy requests, whose outer decoder cannot enforce unknown-field checks inside a custom unmarshaler.
func (HostResource) Validate ¶
func (h HostResource) Validate() error
Validate checks host fields whose omission could broaden authorization.
type User ¶
type User struct {
ID string `json:"id"`
UserName string `json:"userName"`
Active *bool `json:"active"`
Groups []string `json:"groups"`
UserType string `json:"userType,omitempty"`
Department string `json:"department,omitempty"`
Organization string `json:"organization,omitempty"`
}
User contains the directory attributes used by policy. External directory protocols are translated into these facts at the inventory boundary.