Documentation
¶
Overview ¶
Package delegation verifies target-bound API Key stream tickets against the trusted Engine. It never accepts an introspection URL from a JWT.
Index ¶
Constants ¶
View Source
const Claim = "apiKeyDelegation"
View Source
const Interval = 5 * time.Second
View Source
const MaxTokenBytes = 16 << 10
Variables ¶
View Source
var ErrDenied = errors.New("delegated API key access denied")
Functions ¶
Types ¶
type FailureReporter ¶
FailureReporter proves both possession of a stream grant and the currently authenticated backend connection ticket. It cannot choose an outcome or exercise any general Agent API authority.
func NewFailureReporter ¶
func NewFailureReporter(engine string) *FailureReporter
func (*FailureReporter) Report ¶
func (reporter *FailureReporter) Report(token, backendToken string) bool
func (*FailureReporter) ReportExpired ¶
func (reporter *FailureReporter) ReportExpired(token, backendToken, attemptID string) bool
Engine independently requires a verified owned ticket that is truly expired.
func (*FailureReporter) ReportRouteDenied ¶
func (reporter *FailureReporter) ReportRouteDenied(token, backendToken, attemptID string) bool
ReportRouteDenied has one fixed meaning. A caller cannot choose an outcome, failure reason, Key identity, or target; Engine derives them from both tickets.
type Grant ¶
type Grant struct {
KeyID int64
Revision int64
TargetType string
TargetID string
Operation string
ExpiresAt int64
Payload map[string]interface{}
}
func (*Grant) AllowsPath ¶
Click to show internal directories.
Click to hide internal directories.