web-token/jwt-encryption-algorithm-aeskw
AES Key Wrap (AES-KW) encryption algorithm support for the web-token JWT framework. Adds key wrapping/unwrapping utilities to enable JWE encryption workflows using AES-KW in PHP, integrating with existing web-token components and algorithm managers.
web-token/jwt-encryption-algorithm-aeskw package provides AES-KW (Key Wrapping) support for JWT encryption, enabling confidentiality (unlike plain JWTs, which are only signed). This fits architectures requiring secure key exchange (e.g., OAuth2 token encryption, API-to-API communication, or compliance-sensitive data transmission).firebase/php-jwt, lucadegasperi/oauth2-server) for signing/verification.web-token/jwt-framework (or similar) for JWE/JWT handling.defuse/php-encryption) be a simpler alternative?spomky-labs/uuid or firebase/php-jwt (with custom encryption) been considered?Illuminate\Http\Middleware.JWTEncrypter interface for dependency injection.typhonlabs/laravel-jwt-auth (may need forking or custom logic).JWE::serialize() calls needed.| Step | Task | Dependencies |
|---|---|---|
| 1 | Install package + dependencies | PHP 7.4+, OpenSSL |
| 2 | Configure key storage (env/KMS) | Secrets manager |
| 3 | Create middleware for request/response wrapping | Laravel middleware stack |
| 4 | Test with sample payloads | Postman/Pest |
| 5 | Roll out to staging | CI/CD pipeline |
| 6 | Monitor performance/errors | APM (e.g., New Relic) |
| 7 | Deprecate old endpoints | Feature flags |
web-token/jwt-framework for updates (security patches).| Scenario | Impact | Mitigation |
|---|---|---|
| Key leakage | Data exposure | Use hardware-backed keys (e.g., AWS CloudHSM) |
| Key rotation failure | Service outage | Dual-write keys during transition |
| OpenSSL disabled | Decryption failures | Enable OpenSSL in PHP config |
| Malformed JWE | DoS via CPU spikes | Validate token structure before processing |
| Package abandonment | Security risks | Fork or migrate to maintained alternative |
How can I help you explore Laravel packages today?