๐ Cybersecurity Knowledge Blog [API] with Flask, JWT Auth, and Docker support
225
A RESTful Flask API for managing cybersecurity entries โ built with JWT authentication, admin role, SQLite, and ready for deployment on Kubernetes, Docker Compose, or standalone.
| Feature | Description |
|---|---|
| ๐ REST API | /api/login, /api/entries, /api/entries/<id> |
| ๐ JWT Authentication | Secure login and token-based access |
| ๐ค Admin Role | Protect entry creation/editing/deletion |
| ๐พ SQLite DB | Auto-created on startup |
| ๐งฑ Docker Ready | Use with Docker, Minikube, or Compose |
docker pull onyxwizard/flask-api-blog
docker run -p 5000:5000 onyxwizard/flask-api-blog
Then visit:
curl -X POST http://localhost:5000/api/login \
-H "Content-Type: application/json" \
-d '{"username":"admin", "password":"admin123"}'
Use the token from above:
curl -X POST http://localhost:5000/api/entries \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"XSS", "category":"Vulnerabilities", "content":"Cross-site scripting attack.", "user_id":1}'
For live-reload during development:
docker run -p 5000:5000 -v $(pwd):/app onyxwizard/flask-api-blog
Feel free to fork this project and improve it!
๐ GitHubโ
Content type
Image
Digest
sha256:9d94eeff4โฆ
Size
124.5 MB
Last updated
over 1 year ago
docker pull onyxwizard/flask-api-blog