Expand description
§adk-auth
Access control and authentication for ADK-Rust.
§Overview
This crate provides enterprise-grade access control:
Permission- Tool and agent permissionsRole- Role with allow/deny rulesAccessControl- Permission checkingAuditSink- Audit logging trait
§Features
sso- Enable SSO/OAuth/OIDC support
§Quick Start
ⓘ
use adk_auth::{Permission, Role, AccessControl};
let admin = Role::new("admin")
.allow(Permission::AllTools)
.allow(Permission::AllAgents);
let user = Role::new("user")
.allow(Permission::Tool("search".into()))
.deny(Permission::Tool("code_exec".into()));
let ac = AccessControl::builder()
.role(admin)
.role(user)
.assign("alice@example.com", "admin")
.build()?;
ac.check("alice@example.com", &Permission::AllTools)?;Structs§
- Access
Control - Access control for checking permissions.
- Access
Control Builder - Builder for AccessControl.
- Access
Denied - Error returned when access is denied.
- Audit
Event - An audit event.
- Auth
Middleware - A collection of auth utilities for integrating with ADK.
- File
Audit Sink - File-based audit sink that writes JSONL.
- Protected
Tool - A tool wrapper that enforces access control and optionally logs audit events.
- Protected
Tool Dyn - Dynamic version of
ProtectedToolforArc<dyn Tool>. - Role
- A role with a set of allowed and denied permissions.
Enums§
- Audit
Event Type - Type of audit event.
- Audit
Outcome - Outcome of an audit event.
- Auth
Error - General auth error.
- Permission
- Permission for accessing tools or agents.