Files
Porsche Chen 360533393f feat: HR Portal - Complete Multi-Tenant System with Redis Session Storage
Major Features:
-  Multi-tenant architecture (tenant isolation)
-  Employee CRUD with lifecycle management (onboarding/offboarding)
-  Department tree structure with email domain management
-  Company info management (single-record editing)
-  System functions CRUD (permission management)
-  Email account management (multi-account per employee)
-  Keycloak SSO integration (auth.lab.taipei)
-  Redis session storage (10.1.0.254:6379)
  - Solves Cookie 4KB limitation
  - Cross-system session sharing
  - Sliding expiration (8 hours)
  - Automatic token refresh

Technical Stack:
Backend:
- FastAPI + SQLAlchemy
- PostgreSQL 16 (10.1.0.20:5433)
- Keycloak Admin API integration
- Docker Mailserver integration (SSH)
- Alembic migrations

Frontend:
- Next.js 14 (App Router)
- NextAuth 4 with Keycloak Provider
- Redis session storage (ioredis)
- Tailwind CSS

Infrastructure:
- Redis 7 (10.1.0.254:6379) - Session + Cache
- Keycloak 26.1.0 (auth.lab.taipei)
- Docker Mailserver (10.1.0.254)

Architecture Highlights:
- Session管理由 Keycloak + Redis 統一控制
- 支援多系統 (HR/WebMail/Calendar/Drive/Office) 共享 session
- Token 自動刷新,異質服務整合
- 未來可無縫遷移到雲端

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-23 20:12:43 +08:00
..

PyPI Changelog Build Status ppc64le Build Code Scan Documentation Status

JWCrypto

An implementation of the JOSE Working Group documents:

  • RFC 7515 - JSON Web Signature (JWS)
  • RFC 7516 - JSON Web Encryption (JWE)
  • RFC 7517 - JSON Web Key (JWK)
  • RFC 7518 - JSON Web Algorithms (JWA)
  • RFC 7519 - JSON Web Token (JWT)
  • RFC 7520 - Examples of Protecting Content Using JSON Object Signing and Encryption (JOSE)

Installation

pip install jwcrypto

Documentation

http://jwcrypto.readthedocs.org

Deprecation Notices

2020.12.11: The RSA1_5 algorithm is now considered deprecated due to numerous implementation issues that make it a very problematic tool to use safely. The algorithm can still be used but requires explicitly allowing it on object instantiation. If your application depends on it there are examples of how to re-enable RSA1_5 usage in the tests files.

Note: if you enable support for RSA1_5 and the attacker can send you chosen ciphertext and is able to measure the processing times of your application, then your application will be vulnerable to a Bleichenbacher RSA padding oracle, allowing the so-called "Million messages attack". That attack allows to decrypt intercepted messages (even if they were encrypted with RSA-OAEP) or forge signatures (both RSA-PKCS#1 v1.5 and RSASSA-PSS).

Given JWT is generally used in tokens to sign authorization assertions or to encrypt private key material, this is a particularly severe issue, and must not be underestimated.