Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Allow ¶
type Allow struct {
// URLPrefixes is the primary allowlist syntax: each entry is a URL prefix like:
// https://api.example.com/v1/resource
//
// The actual request must match at least one prefix by:
// - scheme
// - hostname
// - effective port (explicit or default 80/443)
// - path prefix (segment-safe)
URLPrefixes []string `mapstructure:"url_prefixes"`
// Methods is the allowed HTTP method set (GET/POST/PUT/DELETE).
Methods []string `mapstructure:"methods"`
FollowRedirects bool `mapstructure:"follow_redirects"`
AllowProxy bool `mapstructure:"allow_proxy"`
DenyPrivateIPs *bool `mapstructure:"deny_private_ips"`
ParsedURLPrefixes []URLPrefixRule `mapstructure:"-"`
}
type AuthProfile ¶
type AuthProfile struct {
ID string `mapstructure:"-"`
Credential Credential `mapstructure:"credential"`
Allow Allow `mapstructure:"allow"`
Bindings map[string]ToolBinding `mapstructure:"bindings"`
}
func (AuthProfile) DenyPrivateIPs ¶
func (p AuthProfile) DenyPrivateIPs() bool
func (AuthProfile) IsURLAllowed ¶
func (p AuthProfile) IsURLAllowed(u *url.URL, method string) error
func (*AuthProfile) Validate ¶
func (p *AuthProfile) Validate() error
type Credential ¶
type EnvResolver ¶
EnvResolver resolves secrets from environment variables.
The MVP behavior is fail-closed: - missing/unset env var => error - empty value => error
type ProfileStore ¶
type ProfileStore struct {
// contains filtered or unexported fields
}
func NewProfileStore ¶
func NewProfileStore(profiles map[string]AuthProfile) *ProfileStore
func (*ProfileStore) Get ¶
func (s *ProfileStore) Get(id string) (AuthProfile, bool)
type SkillAuthProfilePolicy ¶
func SkillAuthProfilePolicyFromContext ¶
func SkillAuthProfilePolicyFromContext(ctx context.Context) (SkillAuthProfilePolicy, bool)
type ToolBinding ¶
type ToolBinding struct {
Inject Inject `mapstructure:"inject"`
AllowUserHeaders bool `mapstructure:"allow_user_headers"`
UserHeaderAllowlist []string `mapstructure:"user_header_allowlist"`
}
func (ToolBinding) Validate ¶
func (b ToolBinding) Validate(toolName string) error
Click to show internal directories.
Click to hide internal directories.