pub mod audit;
mod authn;
mod authz;
pub mod cedar_authz;
mod error;
mod jwt_authn;
mod middleware;
mod principal;
mod rate_limit;
pub mod routes;
mod store;
pub use authn::{
AllowAllAuthenticator, ApiKeyAuthenticator, Authenticator, ChainAuthenticator,
DenyAllAuthenticator, API_KEY_HEADER, AUTHORIZATION_HEADER,
};
pub use jwt_authn::{JwtAuthenticator, JwtConfig};
pub use authz::{
Action, AllowAllAuthorizer, Authorizer, AuthzContext, AuthzDecision, ChainAuthorizer,
DenyAllAuthorizer, RbacAuthorizer, Resource, ResourceType, TenantIsolationAuthorizer,
};
pub use cedar_authz::{
AddPolicyRequest, CedarAuthorizer, PolicyListResponse, PolicyResponse, PolicyStore,
};
pub use audit::{
log_auth_failure, log_auth_success, log_authz_denied, log_namespace_operation, log_rate_limit,
log_table_operation, AuditAction, AuditCategory, AuditEvent, AuditOutcome, AuditSeverity,
};
pub use error::{AuthError, AuthErrorBody, AuthErrorResponse, Result as AuthResult};
pub use middleware::{
auth_middleware, require_auth_middleware, AuthState, AuthenticatedPrincipal, OptionalPrincipal,
};
pub use principal::{AuthMethod, Principal, PrincipalBuilder, PrincipalType};
pub use rate_limit::{
LimitType, RateLimitConfig, RateLimitConfigBuilder, RateLimitErrorBody, RateLimitErrorResponse,
RateLimitExceeded, RateLimitInfo, RateLimiter,
};
pub use store::{
extract_key_prefix, hash_api_key, verify_api_key, ApiKey, ApiKeyBuilder, ApiKeyStore,
InMemoryApiKeyStore,
};