Documentation
¶
Overview ¶
Package authorization authorizes control operations and builds stable request hashes.
Index ¶
Constants ¶
const MaxIPPrefixes = 64
Variables ¶
Functions ¶
func CanonicalizeIPPrefixes ¶
CanonicalizeIPPrefixes parses, masks, rejects duplicates, and sorts an IP policy. It preserves nil so an omitted policy differs from an empty policy.
func ValidateRouteTarget ¶
ValidateRouteTarget accepts the local HTTP target format used by routes.
Types ¶
type Authorizer ¶
type CertificatePlan ¶
type Decision ¶
type Decision struct {
IdentityID string
TeamID string
ActingMembershipID string
ActingRole string
RouteMembershipID string
PolicyRevision uint64
DomainID string
CanonicalHostname string
RouteScope string
DNSAuthorityReference string
CertificatePlan *CertificatePlan
RetrySecret [32]byte
}
Decision contains current authority state accepted by control. RetrySecret is internal key material and is never part of the authority wire response.
type Digest ¶
func CanonicalRequestHash ¶
func CanonicalRequestHash(request OperationRequest) (Digest, error)
CanonicalRequestHash returns a stable hash for one authorized control change.
func IPPolicyHash ¶
IPPolicyHash hashes the normalized prefix list. A nil policy has no hash.
type OperationRequest ¶
type OperationRequest struct {
Operation Operation
TeamID string
MembershipID string
DomainID string
CanonicalHostname string
RouteScope string
RouteID string
RouteVersion uint64
RouteMutationRevision uint64
PolicyRevision uint64
Target string
AllowedIPPrefixes []string
Ephemeral bool
CertificatePlan *CertificatePlan
}
OperationRequest contains every value included in a mutation hash.
type Request ¶
type Request struct {
AccessToken string
Operation Operation
TeamID string
ActingMembershipID string
RouteMembershipID string
DomainID string
CanonicalHostname string
RouteScope string
Target string
AllowedIPPrefixes []string
Ephemeral bool
RouteID string
RouteVersion uint64
RouteMutationRevision uint64
}
Request contains the user credential and exact operation facts control asks the authority to authorize.