Versions in this module Expand all Collapse all v1 v1.0.0 Feb 18, 2022 GO-2022-0564 GO-2022-0564: Signature forgery in github.com/biscuit-auth/biscuit-go Changes in this version + const MaxSchemaVersion + const PolicyKindAllow + const PolicyKindDeny + var DefaultAllowPolicy = Policy + var DefaultDenyPolicy = Policy + var ErrDuplicateFact = errors.New("biscuit: fact already exists") + var ErrEmptyKeys = errors.New("biscuit: empty keys") + var ErrFactNotFound = errors.New("biscuit: fact not found") + var ErrInvalidAuthorityFact = errors.New("biscuit: invalid authority fact") + var ErrInvalidAuthorityIndex = errors.New("biscuit: invalid authority index") + var ErrInvalidBlockFact = errors.New("biscuit: invalid block fact") + var ErrInvalidBlockIndex = errors.New("biscuit: invalid block index") + var ErrInvalidBlockRule = errors.New("biscuit: invalid block rule") + var ErrInvalidKeySize = errors.New("biscuit: invalid key size") + var ErrInvalidSignature = errors.New("biscuit: invalid signature") + var ErrInvalidSignatureSize = errors.New("biscuit: invalid signature size") + var ErrMissingSymbols = errors.New("biscuit: missing symbols") + var ErrNoMatchingPolicy = errors.New("biscuit: denied by no matching policies") + var ErrPolicyDenied = errors.New("biscuit: denied by policy") + var ErrSymbolTableOverlap = errors.New("biscuit: symbol table overlap") + var ErrUnknownPublicKey = errors.New("biscuit: unknown public key") + var UnsupportedAlgorithm = errors.New("biscuit: unsupported signature algorithm") + func WihtRandom(rng io.Reader) builderOption + func WithSymbols(symbols *datalog.SymbolTable) builderOption + type Authorizer interface + AddCheck func(check Check) + AddFact func(fact Fact) + AddPolicy func(policy Policy) + AddRule func(rule Rule) + Authorize func() error + Biscuit func() *Biscuit + LoadPolicies func([]byte) error + PrintWorld func() string + Query func(rule Rule) (FactSet, error) + Reset func() + SerializePolicies func() ([]byte, error) + func NewVerifier(b *Biscuit) (Authorizer, error) + type BinaryOp binaryOpType + const BinaryAdd + const BinaryAnd + const BinaryContains + const BinaryDiv + const BinaryEqual + const BinaryGreaterOrEqual + const BinaryGreaterThan + const BinaryIntersection + const BinaryLessOrEqual + const BinaryLessThan + const BinaryMul + const BinaryOr + const BinaryPrefix + const BinaryRegex + const BinarySub + const BinarySuffix + const BinaryUndefined + const BinaryUnion + func (BinaryOp) Type() OpType + type Biscuit struct + func New(rng io.Reader, root ed25519.PrivateKey, baseSymbols *datalog.SymbolTable, ...) (*Biscuit, error) + func Unmarshal(serialized []byte) (*Biscuit, error) + func (b *Biscuit) Append(rng io.Reader, block *Block) (*Biscuit, error) + func (b *Biscuit) Authorizer(root ed25519.PublicKey) (Authorizer, error) + func (b *Biscuit) BlockCount() int + func (b *Biscuit) Checks() [][]datalog.Check + func (b *Biscuit) CreateBlock() BlockBuilder + func (b *Biscuit) GetBlockID(fact Fact) (int, error) + func (b *Biscuit) RevocationIds() [][]byte + func (b *Biscuit) Seal(rng io.Reader) (*Biscuit, error) + func (b *Biscuit) Serialize() ([]byte, error) + func (b *Biscuit) String() string + type Block struct + func (b *Block) String(symbols *datalog.SymbolTable) string + type BlockBuilder interface + AddCheck func(check Check) error + AddFact func(fact Fact) error + AddRule func(rule Rule) error + Build func() *Block + SetContext func(string) + func NewBlockBuilder(baseSymbols *datalog.SymbolTable) BlockBuilder + type Bool bool + func (b Bool) String() string + func (b Bool) Type() TermType + type Builder interface + AddAuthorityCheck func(check Check) error + AddAuthorityFact func(fact Fact) error + AddAuthorityRule func(rule Rule) error + Build func() (*Biscuit, error) + func NewBuilder(root ed25519.PrivateKey, opts ...builderOption) Builder + type Bytes []byte + func (a Bytes) String() string + func (a Bytes) Type() TermType + type Check struct + Queries []Rule + type Date time.Time + func (a Date) String() string + func (a Date) Type() TermType + type Expression []Op + type Fact struct + func (f Fact) String() string + type FactSet []Fact + func (fs FactSet) String() string + type Integer int64 + func (a Integer) String() string + func (a Integer) Type() TermType + type Op interface + Type func() OpType + type OpType byte + const OpTypeBinary + const OpTypeUnary + const OpTypeValue + type Policy struct + Kind PolicyKind + Queries []Rule + type PolicyKind byte + type Predicate struct + IDs []Term + Name string + func (p Predicate) String() string + type Rule struct + Body []Predicate + Expressions []Expression + Head Predicate + type Set []Term + func (a Set) String() string + func (a Set) Type() TermType + type String string + func (a String) String() string + func (a String) Type() TermType + type Term interface + String func() string + Type func() TermType + type TermType byte + const TermTypeBool + const TermTypeBytes + const TermTypeDate + const TermTypeInteger + const TermTypeSet + const TermTypeString + const TermTypeSymbol + const TermTypeVariable + type UnaryOp unaryOpType + const UnaryLength + const UnaryNegate + const UnaryParens + const UnaryUndefined + func (UnaryOp) Type() OpType + type Unmarshaler struct + Symbols *datalog.SymbolTable + func (u *Unmarshaler) Unmarshal(serialized []byte) (*Biscuit, error) + type Value struct + Term Term + func (v Value) Type() OpType + type Variable string + func (a Variable) String() string + func (a Variable) Type() TermType Other modules containing this package github.com/biscuit-auth/biscuit-go/v2