Skip to main content

Module auth

Module auth 

Source
Available on crate feature auth only.
Expand description

Authentication and access control.

Manage agent permissions and identity:

Available with feature: auth

Modules§

scope
Scope-based access control for tools.

Structs§

AccessControl
Access control for checking permissions.
AccessControlBuilder
Builder for AccessControl.
AccessDenied
Error returned when access is denied.
AuditEvent
An audit event.
AuthMiddleware
A collection of auth utilities for integrating with ADK.
ContextScopeResolver
Resolves user scopes from the user_scopes() method on ToolContext.
FileAuditSink
File-based audit sink that writes JSONL.
ProtectedTool
A tool wrapper that enforces access control and optionally logs audit events.
ProtectedToolDyn
Dynamic version of ProtectedTool for Arc<dyn Tool>.
Role
A role with a set of allowed and denied permissions.
ScopeDenied
Error returned when a user lacks required scopes.
ScopeGuard
Declarative scope enforcement for tools.
ScopedTool
A tool wrapper that enforces scope requirements before execution.
ScopedToolDyn
Dynamic version of ScopedTool for Arc<dyn Tool>.
StaticScopeResolver
A static resolver that always returns a fixed set of scopes.

Enums§

AuditEventType
Type of audit event.
AuditOutcome
Outcome of an audit event.
AuthError
General auth error.
Permission
Permission for accessing tools or agents.

Traits§

AuditSink
Trait for audit sinks.
ScopeResolver
Resolves the set of scopes granted to the current user.
ScopeToolExt
Extension trait for easily wrapping tools with scope enforcement.
ToolExt
Extension trait for easily wrapping tools with access control.

Functions§

check_scopes
Checks whether a user’s scopes satisfy a tool’s requirements.