dify/api/tests/unit_tests/services/enterprise
GareArc 41af72449d
fix: address PR review feedback on enterprise license enforcement
- Cache invalid license statuses with 30s TTL to prevent DoS amplification
- Return LicenseStatus enum (not raw str) from get_cached_license_status
- Flatten nested try/except into _read_cached_license_status / _fetch_and_cache_license_status helpers
- Escalate log levels from debug to warning with exc_info for cache failures
- Switch before_request license check from fail-open to fail-closed
- Remove dead raise_for_status parameter from BaseRequest.send_request
- Gate license expired_at behind is_authenticated; only expose status to unauthenticated callers (CVE-2025-63387)
- Remove redundant 'not is_console_api' guard in before_request
- Add 8 unit tests for get_cached_license_status
2026-03-08 17:00:12 -07:00
..
__init__.py feat: inject traceparent in enterprise api (#30895) 2026-01-13 23:37:39 +09:00
test_account_deletion_sync.py feat: account delete cleanup (#31519) 2026-02-04 17:59:41 -08:00
test_enterprise_service.py fix: address PR review feedback on enterprise license enforcement 2026-03-08 17:00:12 -07:00
test_traceparent_propagation.py test(api): add autospec to MagicMock-based patch usage (#32752) 2026-03-01 04:30:45 +08:00