Documentation
¶
Overview ¶
Package inventoryserver serves CA-authenticated resolution reads. It exposes no administration or enrollment operations in the static implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
NewClient uses a separate transport for inventory so a Unix policy socket cannot accidentally receive inventory requests. Redirects are never followed.
func (*Client) FetchDiscovery ¶
FetchDiscovery reads inventory-owned login configuration using service authentication.
func (*Client) Resolve ¶
func (c *Client) Resolve(ctx context.Context, req inventoryapi.ResolveRequest) (*inventoryapi.Resolution, error)
type OIDCConfig ¶
type OIDCConfig struct {
IdentityMode oidc.IdentityMode `yaml:"identity_mode,omitempty" json:"identity_mode,omitempty"`
UserIDClaim string `yaml:"user_id_claim,omitempty" json:"user_id_claim,omitempty"`
Issuer string `yaml:"issuer" json:"issuer"`
ClientID string `yaml:"client_id" json:"client_id"`
ClientSecret string `yaml:"client_secret,omitempty" json:"client_secret,omitempty"` // Optional, for confidential clients
}
OIDCConfig represents OIDC configuration for token validation
type Resolver ¶
type Resolver struct {
Directory directory.Directory
Hosts inventory.Hosts
DirectoryRevision string
InventoryRevision string
}
Resolver combines independently owned directory and host snapshots. Static data is immutable for the lifetime of this resolver; future dynamic sources must supply coherent snapshot reads and explicit freshness semantics.
func (*Resolver) Resolve ¶
func (s *Resolver) Resolve(ctx context.Context, auth facts.Authentication, host string) (*inventoryapi.Resolution, error)
type ServerConfig ¶
type ServerConfig struct {
CAPublicKey string `yaml:"ca_pubkey" json:"ca_pubkey"`
OIDC OIDCConfig `yaml:"oidc" json:"oidc"`
}
ServerConfig contains inventory-owned authentication settings loaded at startup.
func (*ServerConfig) BootstrapAuth ¶
func (c *ServerConfig) BootstrapAuth() wire.AuthConfig
BootstrapAuth returns the auth configuration for the bootstrap endpoint.
func (*ServerConfig) Validate ¶
func (c *ServerConfig) Validate() error
Validate checks that the ServerConfig is valid.