fastapi-security
CommunitySecure your FastAPI applications.
AuthorRx-K8
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides a comprehensive guide and implementation patterns to secure FastAPI applications against common web vulnerabilities, ensuring robust authentication, authorization, and data protection.
Core Features & Use Cases
- Authentication: Implement secure user login using JWT and OAuth2.
- Authorization: Define role-based access control (RBAC) and resource ownership checks.
- Input Validation: Utilize Pydantic for strong request data validation and sanitization.
- Security Headers: Configure essential HTTP security headers to protect against attacks like clickjacking and XSS.
- Rate Limiting: Protect your API endpoints from abuse with rate limiting.
- SQL Injection Prevention: Leverage SQLAlchemy ORM to prevent SQL injection vulnerabilities.
- Secure File Uploads: Implement validation for file types and sizes.
- Logging: Set up structured logging for security events.
Quick Start
Implement secure FastAPI authentication and authorization by following the provided code examples for JWT, RBAC, and input validation.
Dependency Matrix
Required Modules
pydantic-settingspython-josepasslibslowapistarlette
Components
scriptsreferences
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: fastapi-security Download link: https://github.com/Rx-K8/my-claude-code/archive/main.zip#fastapi-security Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.