Documentation
¶
Index ¶
- Constants
- type Policy
- type PolicyEngine
- func (pe *PolicyEngine) AddPolicy(subject []byte, action, resource, effect string, conditions map[string]string) error
- func (pe *PolicyEngine) Evaluate(subject []byte, action, resource string, context map[string]string) bool
- func (pe *PolicyEngine) GrantPermission(subject []byte, permission string) error
- func (pe *PolicyEngine) HasPermission(subject []byte, permission string) bool
- func (pe *PolicyEngine) RemovePolicy(subject []byte, action, resource string) error
- func (pe *PolicyEngine) RestoreSubject(subject []byte) error
- func (pe *PolicyEngine) RevokeSubject(subject []byte) error
- type SessionManager
- func (sm *SessionManager) IssueCookieToken(subject []byte, ttl time.Duration) (string, string, error)
- func (sm *SessionManager) RevokeDevice(subject []byte) error
- func (sm *SessionManager) RevokeSession(jti string, expiry time.Duration) error
- func (sm *SessionManager) RevokeTokenString(tokenString string) error
- func (sm *SessionManager) ValidateCookieToken(tokenString string) (string, error)
Constants ¶
const PolicyPageID = ultimate_db.PageID(5)
const SessionPageID = ultimate_db.PageID(6)
SessionPageID is strictly reserved for JTI short-term token blacklists
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyEngine ¶
type PolicyEngine struct {
// contains filtered or unexported fields
}
func NewPolicyEngine ¶
func NewPolicyEngine(db *ultimate_db.DB) *PolicyEngine
func (*PolicyEngine) Evaluate ¶
func (pe *PolicyEngine) Evaluate(subject []byte, action, resource string, context map[string]string) bool
Evaluate runs a dual-stage PBAC/ABAC check with strict Deny-Override over unified transactional layers
func (*PolicyEngine) GrantPermission ¶
func (pe *PolicyEngine) GrantPermission(subject []byte, permission string) error
func (*PolicyEngine) HasPermission ¶
func (pe *PolicyEngine) HasPermission(subject []byte, permission string) bool
HasPermission executes an explicit permission lookup path optimized for real-time mesh routing loops
func (*PolicyEngine) RemovePolicy ¶
func (pe *PolicyEngine) RemovePolicy(subject []byte, action, resource string) error
func (*PolicyEngine) RestoreSubject ¶ added in v1.0.2
func (pe *PolicyEngine) RestoreSubject(subject []byte) error
func (*PolicyEngine) RevokeSubject ¶ added in v1.0.2
func (pe *PolicyEngine) RevokeSubject(subject []byte) error
type SessionManager ¶ added in v1.0.2
type SessionManager struct {
// contains filtered or unexported fields
}
func NewSessionManager ¶ added in v1.0.2
func NewSessionManager(db *ultimate_db.DB, key *rsa.PrivateKey) *SessionManager
func (*SessionManager) IssueCookieToken ¶ added in v1.0.2
func (sm *SessionManager) IssueCookieToken(subject []byte, ttl time.Duration) (string, string, error)
IssueCookieToken generates a JWT bound to the hardware subject
func (*SessionManager) RevokeDevice ¶ added in v1.0.2
func (sm *SessionManager) RevokeDevice(subject []byte) error
RevokeDevice permanently blacklists the hardware identity globally across page structures
func (*SessionManager) RevokeSession ¶ added in v1.0.2
func (sm *SessionManager) RevokeSession(jti string, expiry time.Duration) error
RevokeSession invalidates a specific JWT session token immediately across memory and disk
func (*SessionManager) RevokeTokenString ¶ added in v1.0.2
func (sm *SessionManager) RevokeTokenString(tokenString string) error
RevokeTokenString parses an unverified token to extract the JTI and revokes it.
func (*SessionManager) ValidateCookieToken ¶ added in v1.0.2
func (sm *SessionManager) ValidateCookieToken(tokenString string) (string, error)
ValidateCookieToken checks signature, expiration, and the dual-tier cache/DB blacklists