API-Key-Authentifizierung: Implementation Ready (Config Prepared) #47

Closed
opened 2025-06-11 20:02:04 +02:00 by Michael · 0 comments
Michael commented 2025-06-11 20:02:04 +02:00 (Migrated from gitea.dragons-at-work.de)

🔄 STATUS: PREPARED FOR ACTIVATION

API-Key-System ist in config/server.lua vorbereitet!

Current Status

  • Config-Structure ready - api_keys in server.lua
  • Header-Detection prepared - X-API-Key parsing ready
  • Permission-System designed - granular permissions
  • 🔄 Middleware-Activation - Currently disabled for testing
  • 📋 Rate-Limiting - Spam protection
  • 📋 Hugo-Integration - API-Key injection

Prepared Configuration

-- config/server.lua (already exists)
api_keys = {
    ["hugo-frontend-key"] = {
        name = "Hugo Frontend",
        permissions = {"mail:send"},
        allowed_ips = {"127.0.0.1", "10.0.0.0/8"}
    }
}

Implementation Plan (Quick Activation)

  1. Middleware-Function - auth_check() in main.lua
  2. Header-Validation - X-API-Key extraction
  3. Permission-Check - Route-specific permissions
  4. IP-Validation - allowed_ips checking
  5. Error-Responses - 401/403 with proper messages

Ready for Activation

Backend-Infrastructure: COMPLETE
Config-System: PREPARED
Next Step: Middleware-Activation (1-2h implementation)

Note: Currently disabled to allow unrestricted testing

## 🔄 STATUS: PREPARED FOR ACTIVATION **API-Key-System ist in config/server.lua vorbereitet!** ## Current Status - [x] ✅ **Config-Structure ready** - api_keys in server.lua - [x] ✅ **Header-Detection prepared** - X-API-Key parsing ready - [x] ✅ **Permission-System designed** - granular permissions - [ ] 🔄 **Middleware-Activation** - Currently disabled for testing - [ ] 📋 **Rate-Limiting** - Spam protection - [ ] 📋 **Hugo-Integration** - API-Key injection ## Prepared Configuration ```lua -- config/server.lua (already exists) api_keys = { ["hugo-frontend-key"] = { name = "Hugo Frontend", permissions = {"mail:send"}, allowed_ips = {"127.0.0.1", "10.0.0.0/8"} } } ``` ## Implementation Plan (Quick Activation) 1. **Middleware-Function** - auth_check() in main.lua 2. **Header-Validation** - X-API-Key extraction 3. **Permission-Check** - Route-specific permissions 4. **IP-Validation** - allowed_ips checking 5. **Error-Responses** - 401/403 with proper messages ## Ready for Activation **Backend-Infrastructure**: COMPLETE ✅ **Config-System**: PREPARED ✅ **Next Step**: Middleware-Activation (1-2h implementation) **Note**: Currently disabled to allow unrestricted testing
michael added
status
done
and removed
status
to-go
labels 2025-08-14 07:23:17 +02:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: DAW/furt#47
No description provided.