@colveor/core 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +6 -0
- package/dist/bootstrap/bootstrap-colveor-app.d.ts.map +1 -1
- package/dist/bootstrap/bootstrap-colveor-app.js +22 -3
- package/dist/bootstrap/bootstrap-colveor-app.js.map +1 -1
- package/dist/common/decorators/index.d.ts +6 -0
- package/dist/common/decorators/index.d.ts.map +1 -1
- package/dist/common/decorators/index.js +8 -1
- package/dist/common/decorators/index.js.map +1 -1
- package/dist/common/decorators/ip-rate-limit-bucket.decorator.d.ts +9 -0
- package/dist/common/decorators/ip-rate-limit-bucket.decorator.d.ts.map +1 -0
- package/dist/common/decorators/ip-rate-limit-bucket.decorator.js +12 -0
- package/dist/common/decorators/ip-rate-limit-bucket.decorator.js.map +1 -0
- package/dist/common/guards/login-ip-rate-limit.guard.d.ts +12 -6
- package/dist/common/guards/login-ip-rate-limit.guard.d.ts.map +1 -1
- package/dist/common/guards/login-ip-rate-limit.guard.js +65 -21
- package/dist/common/guards/login-ip-rate-limit.guard.js.map +1 -1
- package/dist/common/guards/otp-ip-rate-limit.guard.d.ts +3 -2
- package/dist/common/guards/otp-ip-rate-limit.guard.d.ts.map +1 -1
- package/dist/common/guards/otp-ip-rate-limit.guard.js +17 -15
- package/dist/common/guards/otp-ip-rate-limit.guard.js.map +1 -1
- package/dist/common/guards/permissions.guard.d.ts.map +1 -1
- package/dist/common/guards/permissions.guard.js +12 -2
- package/dist/common/guards/permissions.guard.js.map +1 -1
- package/dist/common/interceptors/timeout.interceptor.d.ts +1 -1
- package/dist/common/interceptors/timeout.interceptor.d.ts.map +1 -1
- package/dist/common/interceptors/timeout.interceptor.js +5 -1
- package/dist/common/interceptors/timeout.interceptor.js.map +1 -1
- package/dist/common/interfaces/request-user.d.ts +4 -3
- package/dist/common/interfaces/request-user.d.ts.map +1 -1
- package/dist/common/utils/cache-version.util.d.ts +12 -0
- package/dist/common/utils/cache-version.util.d.ts.map +1 -0
- package/dist/common/utils/cache-version.util.js +34 -0
- package/dist/common/utils/cache-version.util.js.map +1 -0
- package/dist/common/utils/postgres-error.util.d.ts +5 -0
- package/dist/common/utils/postgres-error.util.d.ts.map +1 -0
- package/dist/common/utils/postgres-error.util.js +13 -0
- package/dist/common/utils/postgres-error.util.js.map +1 -0
- package/dist/common/utils/singleflight.util.d.ts +6 -0
- package/dist/common/utils/singleflight.util.d.ts.map +1 -0
- package/dist/common/utils/singleflight.util.js +21 -0
- package/dist/common/utils/singleflight.util.js.map +1 -0
- package/dist/common/validators/is-exclusive-auth-params.validator.js +1 -1
- package/dist/common/validators/is-exclusive-auth-params.validator.js.map +1 -1
- package/dist/common/validators/is-exclusive-delete-confirm-params.validator.js +1 -1
- package/dist/common/validators/is-exclusive-delete-confirm-params.validator.js.map +1 -1
- package/dist/config/app.config.d.ts +38 -0
- package/dist/config/app.config.d.ts.map +1 -1
- package/dist/config/app.config.js +24 -0
- package/dist/config/app.config.js.map +1 -1
- package/dist/config/database.config.d.ts +6 -0
- package/dist/config/database.config.d.ts.map +1 -1
- package/dist/config/database.config.js +3 -0
- package/dist/config/database.config.js.map +1 -1
- package/dist/config/env-flags.util.d.ts +4 -0
- package/dist/config/env-flags.util.d.ts.map +1 -1
- package/dist/config/env-flags.util.js +7 -0
- package/dist/config/env-flags.util.js.map +1 -1
- package/dist/config/env.validation.d.ts +24 -1
- package/dist/config/env.validation.d.ts.map +1 -1
- package/dist/config/env.validation.js +92 -2
- package/dist/config/env.validation.js.map +1 -1
- package/dist/config/in-memory-redis.client.d.ts +23 -4
- package/dist/config/in-memory-redis.client.d.ts.map +1 -1
- package/dist/config/in-memory-redis.client.js +148 -4
- package/dist/config/in-memory-redis.client.js.map +1 -1
- package/dist/config/redis.module.d.ts.map +1 -1
- package/dist/config/redis.module.js +5 -0
- package/dist/config/redis.module.js.map +1 -1
- package/dist/core.module.d.ts +5 -0
- package/dist/core.module.d.ts.map +1 -1
- package/dist/core.module.js +5 -0
- package/dist/core.module.js.map +1 -1
- package/dist/database/migrations/1784284557959-full-schema.d.ts.map +1 -1
- package/dist/database/migrations/1784284557959-full-schema.js +48 -14
- package/dist/database/migrations/1784284557959-full-schema.js.map +1 -1
- package/dist/database/migrations/1784284557960-audit-partitioning.d.ts +17 -0
- package/dist/database/migrations/1784284557960-audit-partitioning.d.ts.map +1 -0
- package/dist/database/migrations/1784284557960-audit-partitioning.js +384 -0
- package/dist/database/migrations/1784284557960-audit-partitioning.js.map +1 -0
- package/dist/database/seeds/roles.seed.d.ts +6 -0
- package/dist/database/seeds/roles.seed.d.ts.map +1 -1
- package/dist/database/seeds/roles.seed.js +22 -5
- package/dist/database/seeds/roles.seed.js.map +1 -1
- package/dist/database/seeds/settings.seed.d.ts +5 -0
- package/dist/database/seeds/settings.seed.d.ts.map +1 -1
- package/dist/database/seeds/settings.seed.js +500 -25
- package/dist/database/seeds/settings.seed.js.map +1 -1
- package/dist/database/seeds/templates/html-template.reader.d.ts +1 -0
- package/dist/database/seeds/templates/html-template.reader.d.ts.map +1 -1
- package/dist/database/seeds/templates/html-template.reader.js +3 -1
- package/dist/database/seeds/templates/html-template.reader.js.map +1 -1
- package/dist/database/seeds/templates/html-template.reader.ts +5 -1
- package/dist/database/typeorm.util.d.ts.map +1 -1
- package/dist/database/typeorm.util.js +6 -0
- package/dist/database/typeorm.util.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -4
- package/dist/index.js.map +1 -1
- package/dist/modules/admin/controllers/admin.controller.d.ts +15 -7
- package/dist/modules/admin/controllers/admin.controller.d.ts.map +1 -1
- package/dist/modules/admin/controllers/admin.controller.js +74 -17
- package/dist/modules/admin/controllers/admin.controller.js.map +1 -1
- package/dist/modules/admin/services/admin-log.service.d.ts +14 -7
- package/dist/modules/admin/services/admin-log.service.d.ts.map +1 -1
- package/dist/modules/admin/services/admin-log.service.js +41 -38
- package/dist/modules/admin/services/admin-log.service.js.map +1 -1
- package/dist/modules/audit/audit.manifest.d.ts +8 -0
- package/dist/modules/audit/audit.manifest.d.ts.map +1 -0
- package/dist/modules/audit/audit.manifest.js +31 -0
- package/dist/modules/audit/audit.manifest.js.map +1 -0
- package/dist/modules/audit/audit.module.d.ts +8 -0
- package/dist/modules/audit/audit.module.d.ts.map +1 -0
- package/dist/modules/audit/audit.module.js +57 -0
- package/dist/modules/audit/audit.module.js.map +1 -0
- package/dist/modules/audit/constants/audit-actions.d.ts +79 -0
- package/dist/modules/audit/constants/audit-actions.d.ts.map +1 -0
- package/dist/modules/audit/constants/audit-actions.js +89 -0
- package/dist/modules/audit/constants/audit-actions.js.map +1 -0
- package/dist/modules/audit/constants/audit-mutation.d.ts +10 -0
- package/dist/modules/audit/constants/audit-mutation.d.ts.map +1 -0
- package/dist/modules/audit/constants/audit-mutation.js +13 -0
- package/dist/modules/audit/constants/audit-mutation.js.map +1 -0
- package/dist/modules/audit/controllers/audit.controller.d.ts +13 -0
- package/dist/modules/audit/controllers/audit.controller.d.ts.map +1 -0
- package/dist/modules/audit/controllers/audit.controller.js +149 -0
- package/dist/modules/audit/controllers/audit.controller.js.map +1 -0
- package/dist/modules/audit/decorators/audit.decorator.d.ts +27 -0
- package/dist/modules/audit/decorators/audit.decorator.d.ts.map +1 -0
- package/dist/modules/audit/decorators/audit.decorator.js +18 -0
- package/dist/modules/audit/decorators/audit.decorator.js.map +1 -0
- package/dist/modules/audit/dto/audit.dto.d.ts +54 -0
- package/dist/modules/audit/dto/audit.dto.d.ts.map +1 -0
- package/dist/modules/audit/dto/audit.dto.js +129 -0
- package/dist/modules/audit/dto/audit.dto.js.map +1 -0
- package/dist/modules/audit/entities/audit-event.entity.d.ts +33 -0
- package/dist/modules/audit/entities/audit-event.entity.d.ts.map +1 -0
- package/dist/modules/audit/entities/audit-event.entity.js +125 -0
- package/dist/modules/audit/entities/audit-event.entity.js.map +1 -0
- package/dist/modules/audit/entities/audit-outbox.entity.d.ts +16 -0
- package/dist/modules/audit/entities/audit-outbox.entity.d.ts.map +1 -0
- package/dist/modules/audit/entities/audit-outbox.entity.js +65 -0
- package/dist/modules/audit/entities/audit-outbox.entity.js.map +1 -0
- package/dist/modules/audit/index.d.ts +13 -0
- package/dist/modules/audit/index.d.ts.map +1 -0
- package/dist/modules/audit/index.js +23 -0
- package/dist/modules/audit/index.js.map +1 -0
- package/dist/modules/audit/interceptors/audit.interceptor.d.ts +11 -0
- package/dist/modules/audit/interceptors/audit.interceptor.d.ts.map +1 -0
- package/dist/modules/audit/interceptors/audit.interceptor.js +75 -0
- package/dist/modules/audit/interceptors/audit.interceptor.js.map +1 -0
- package/dist/modules/audit/listeners/auth-audit.listener.d.ts +31 -0
- package/dist/modules/audit/listeners/auth-audit.listener.d.ts.map +1 -0
- package/dist/modules/audit/listeners/auth-audit.listener.js +338 -0
- package/dist/modules/audit/listeners/auth-audit.listener.js.map +1 -0
- package/dist/modules/audit/services/audit-archive.service.d.ts +28 -0
- package/dist/modules/audit/services/audit-archive.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-archive.service.js +132 -0
- package/dist/modules/audit/services/audit-archive.service.js.map +1 -0
- package/dist/modules/audit/services/audit-hash-backfill.service.d.ts +22 -0
- package/dist/modules/audit/services/audit-hash-backfill.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-hash-backfill.service.js +79 -0
- package/dist/modules/audit/services/audit-hash-backfill.service.js.map +1 -0
- package/dist/modules/audit/services/audit-leader.service.d.ts +28 -0
- package/dist/modules/audit/services/audit-leader.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-leader.service.js +99 -0
- package/dist/modules/audit/services/audit-leader.service.js.map +1 -0
- package/dist/modules/audit/services/audit-outbox.worker.d.ts +29 -0
- package/dist/modules/audit/services/audit-outbox.worker.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-outbox.worker.js +144 -0
- package/dist/modules/audit/services/audit-outbox.worker.js.map +1 -0
- package/dist/modules/audit/services/audit-partition.service.d.ts +18 -0
- package/dist/modules/audit/services/audit-partition.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-partition.service.js +70 -0
- package/dist/modules/audit/services/audit-partition.service.js.map +1 -0
- package/dist/modules/audit/services/audit-write.service.d.ts +60 -0
- package/dist/modules/audit/services/audit-write.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-write.service.js +463 -0
- package/dist/modules/audit/services/audit-write.service.js.map +1 -0
- package/dist/modules/audit/services/audit.service.d.ts +60 -0
- package/dist/modules/audit/services/audit.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit.service.js +373 -0
- package/dist/modules/audit/services/audit.service.js.map +1 -0
- package/dist/modules/audit/utils/audit-hash.util.d.ts +20 -0
- package/dist/modules/audit/utils/audit-hash.util.d.ts.map +1 -0
- package/dist/modules/audit/utils/audit-hash.util.js +44 -0
- package/dist/modules/audit/utils/audit-hash.util.js.map +1 -0
- package/dist/modules/auth/auth-core/auth-core.module.d.ts.map +1 -1
- package/dist/modules/auth/auth-core/auth-core.module.js +16 -4
- package/dist/modules/auth/auth-core/auth-core.module.js.map +1 -1
- package/dist/modules/auth/auth-core/constants/jwt-redis.keys.d.ts +22 -0
- package/dist/modules/auth/auth-core/constants/jwt-redis.keys.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/constants/jwt-redis.keys.js +25 -0
- package/dist/modules/auth/auth-core/constants/jwt-redis.keys.js.map +1 -0
- package/dist/modules/auth/auth-core/services/access-token.validator.d.ts +19 -0
- package/dist/modules/auth/auth-core/services/access-token.validator.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/services/access-token.validator.js +110 -0
- package/dist/modules/auth/auth-core/services/access-token.validator.js.map +1 -0
- package/dist/modules/auth/auth-core/services/family-denylist.reader.d.ts +10 -0
- package/dist/modules/auth/auth-core/services/family-denylist.reader.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/services/family-denylist.reader.js +44 -0
- package/dist/modules/auth/auth-core/services/family-denylist.reader.js.map +1 -0
- package/dist/modules/auth/auth-core/services/session-epoch.reader.d.ts +10 -0
- package/dist/modules/auth/auth-core/services/session-epoch.reader.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/services/session-epoch.reader.js +44 -0
- package/dist/modules/auth/auth-core/services/session-epoch.reader.js.map +1 -0
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts +7 -8
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts.map +1 -1
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.js +34 -34
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.js.map +1 -1
- package/dist/modules/auth/auth.manifest.d.ts +6 -0
- package/dist/modules/auth/auth.manifest.d.ts.map +1 -1
- package/dist/modules/auth/auth.manifest.js +38 -2
- package/dist/modules/auth/auth.manifest.js.map +1 -1
- package/dist/modules/auth/auth.module.d.ts.map +1 -1
- package/dist/modules/auth/auth.module.js +39 -4
- package/dist/modules/auth/auth.module.js.map +1 -1
- package/dist/modules/auth/controllers/account.controller.d.ts +15 -1
- package/dist/modules/auth/controllers/account.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/account.controller.js +65 -7
- package/dist/modules/auth/controllers/account.controller.js.map +1 -1
- package/dist/modules/auth/controllers/auth.controller.d.ts +7 -3
- package/dist/modules/auth/controllers/auth.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/auth.controller.js +76 -16
- package/dist/modules/auth/controllers/auth.controller.js.map +1 -1
- package/dist/modules/auth/controllers/forgot-password.controller.d.ts +4 -2
- package/dist/modules/auth/controllers/forgot-password.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/forgot-password.controller.js +32 -11
- package/dist/modules/auth/controllers/forgot-password.controller.js.map +1 -1
- package/dist/modules/auth/controllers/mfa.controller.d.ts +18 -0
- package/dist/modules/auth/controllers/mfa.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/mfa.controller.js +192 -0
- package/dist/modules/auth/controllers/mfa.controller.js.map +1 -0
- package/dist/modules/auth/controllers/oauth.controller.d.ts +22 -0
- package/dist/modules/auth/controllers/oauth.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/oauth.controller.js +192 -0
- package/dist/modules/auth/controllers/oauth.controller.js.map +1 -0
- package/dist/modules/auth/controllers/otp.controller.d.ts +6 -3
- package/dist/modules/auth/controllers/otp.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/otp.controller.js +32 -33
- package/dist/modules/auth/controllers/otp.controller.js.map +1 -1
- package/dist/modules/auth/controllers/pin.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/pin.controller.js +10 -2
- package/dist/modules/auth/controllers/pin.controller.js.map +1 -1
- package/dist/modules/auth/controllers/session.controller.d.ts +12 -4
- package/dist/modules/auth/controllers/session.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/session.controller.js +130 -31
- package/dist/modules/auth/controllers/session.controller.js.map +1 -1
- package/dist/modules/auth/dto/auth-config.dto.d.ts +11 -2
- package/dist/modules/auth/dto/auth-config.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/auth-config.dto.js +78 -3
- package/dist/modules/auth/dto/auth-config.dto.js.map +1 -1
- package/dist/modules/auth/dto/index.d.ts +2 -0
- package/dist/modules/auth/dto/index.d.ts.map +1 -1
- package/dist/modules/auth/dto/index.js +2 -0
- package/dist/modules/auth/dto/index.js.map +1 -1
- package/dist/modules/auth/dto/login.dto.d.ts +8 -1
- package/dist/modules/auth/dto/login.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/login.dto.js +48 -3
- package/dist/modules/auth/dto/login.dto.js.map +1 -1
- package/dist/modules/auth/dto/mfa.dto.d.ts +61 -0
- package/dist/modules/auth/dto/mfa.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/mfa.dto.js +326 -0
- package/dist/modules/auth/dto/mfa.dto.js.map +1 -0
- package/dist/modules/auth/dto/oauth.dto.d.ts +45 -0
- package/dist/modules/auth/dto/oauth.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/oauth.dto.js +249 -0
- package/dist/modules/auth/dto/oauth.dto.js.map +1 -0
- package/dist/modules/auth/dto/otp.dto.d.ts +3 -1
- package/dist/modules/auth/dto/otp.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/otp.dto.js +19 -0
- package/dist/modules/auth/dto/otp.dto.js.map +1 -1
- package/dist/modules/auth/dto/password.dto.d.ts +28 -0
- package/dist/modules/auth/dto/password.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/password.dto.js +191 -5
- package/dist/modules/auth/dto/password.dto.js.map +1 -1
- package/dist/modules/auth/dto/register.dto.d.ts +1 -0
- package/dist/modules/auth/dto/register.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/register.dto.js +1 -0
- package/dist/modules/auth/dto/register.dto.js.map +1 -1
- package/dist/modules/auth/dto/session.dto.d.ts +20 -0
- package/dist/modules/auth/dto/session.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/session.dto.js +98 -0
- package/dist/modules/auth/dto/session.dto.js.map +1 -0
- package/dist/modules/auth/dto/token.dto.d.ts +38 -1
- package/dist/modules/auth/dto/token.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/token.dto.js +21 -1
- package/dist/modules/auth/dto/token.dto.js.map +1 -1
- package/dist/modules/auth/entities/index.d.ts +2 -0
- package/dist/modules/auth/entities/index.d.ts.map +1 -1
- package/dist/modules/auth/entities/index.js +2 -0
- package/dist/modules/auth/entities/index.js.map +1 -1
- package/dist/modules/auth/entities/password-reset-token.entity.d.ts +2 -0
- package/dist/modules/auth/entities/password-reset-token.entity.d.ts.map +1 -1
- package/dist/modules/auth/entities/password-reset-token.entity.js +6 -0
- package/dist/modules/auth/entities/password-reset-token.entity.js.map +1 -1
- package/dist/modules/auth/entities/user-mfa.entity.d.ts +19 -0
- package/dist/modules/auth/entities/user-mfa.entity.d.ts.map +1 -0
- package/dist/modules/auth/entities/user-mfa.entity.js +73 -0
- package/dist/modules/auth/entities/user-mfa.entity.js.map +1 -0
- package/dist/modules/auth/entities/user-oauth-identity.entity.d.ts +24 -0
- package/dist/modules/auth/entities/user-oauth-identity.entity.d.ts.map +1 -0
- package/dist/modules/auth/entities/user-oauth-identity.entity.js +84 -0
- package/dist/modules/auth/entities/user-oauth-identity.entity.js.map +1 -0
- package/dist/modules/auth/events/auth.events.d.ts +84 -19
- package/dist/modules/auth/events/auth.events.d.ts.map +1 -1
- package/dist/modules/auth/events/auth.events.js +17 -9
- package/dist/modules/auth/events/auth.events.js.map +1 -1
- package/dist/modules/auth/services/account.service.d.ts +74 -14
- package/dist/modules/auth/services/account.service.d.ts.map +1 -1
- package/dist/modules/auth/services/account.service.js +247 -31
- package/dist/modules/auth/services/account.service.js.map +1 -1
- package/dist/modules/auth/services/dpop.service.d.ts +41 -0
- package/dist/modules/auth/services/dpop.service.d.ts.map +1 -0
- package/dist/modules/auth/services/dpop.service.js +159 -0
- package/dist/modules/auth/services/dpop.service.js.map +1 -0
- package/dist/modules/auth/services/index.d.ts +2 -0
- package/dist/modules/auth/services/index.d.ts.map +1 -1
- package/dist/modules/auth/services/index.js +2 -0
- package/dist/modules/auth/services/index.js.map +1 -1
- package/dist/modules/auth/services/legacy-hash-cleanup.service.d.ts +28 -0
- package/dist/modules/auth/services/legacy-hash-cleanup.service.d.ts.map +1 -0
- package/dist/modules/auth/services/legacy-hash-cleanup.service.js +163 -0
- package/dist/modules/auth/services/legacy-hash-cleanup.service.js.map +1 -0
- package/dist/modules/auth/services/login.service.d.ts +29 -34
- package/dist/modules/auth/services/login.service.d.ts.map +1 -1
- package/dist/modules/auth/services/login.service.js +173 -61
- package/dist/modules/auth/services/login.service.js.map +1 -1
- package/dist/modules/auth/services/mfa.service.d.ts +111 -0
- package/dist/modules/auth/services/mfa.service.d.ts.map +1 -0
- package/dist/modules/auth/services/mfa.service.js +662 -0
- package/dist/modules/auth/services/mfa.service.js.map +1 -0
- package/dist/modules/auth/services/oauth/apple-id-token.verifier.d.ts +11 -0
- package/dist/modules/auth/services/oauth/apple-id-token.verifier.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/apple-id-token.verifier.js +56 -0
- package/dist/modules/auth/services/oauth/apple-id-token.verifier.js.map +1 -0
- package/dist/modules/auth/services/oauth/google-id-token.verifier.d.ts +12 -0
- package/dist/modules/auth/services/oauth/google-id-token.verifier.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/google-id-token.verifier.js +64 -0
- package/dist/modules/auth/services/oauth/google-id-token.verifier.js.map +1 -0
- package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.d.ts +11 -0
- package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.js +76 -0
- package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.js.map +1 -0
- package/dist/modules/auth/services/oauth/oidc-id-token.verifier.d.ts +16 -0
- package/dist/modules/auth/services/oauth/oidc-id-token.verifier.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/oidc-id-token.verifier.js +92 -0
- package/dist/modules/auth/services/oauth/oidc-id-token.verifier.js.map +1 -0
- package/dist/modules/auth/services/oauth/verified-oauth-identity.d.ts +9 -0
- package/dist/modules/auth/services/oauth/verified-oauth-identity.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/verified-oauth-identity.js +3 -0
- package/dist/modules/auth/services/oauth/verified-oauth-identity.js.map +1 -0
- package/dist/modules/auth/services/oauth.service.d.ts +83 -0
- package/dist/modules/auth/services/oauth.service.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth.service.js +471 -0
- package/dist/modules/auth/services/oauth.service.js.map +1 -0
- package/dist/modules/auth/services/otp-auth.service.d.ts +13 -3
- package/dist/modules/auth/services/otp-auth.service.d.ts.map +1 -1
- package/dist/modules/auth/services/otp-auth.service.js +41 -7
- package/dist/modules/auth/services/otp-auth.service.js.map +1 -1
- package/dist/modules/auth/services/password-reset-audit-retention.service.d.ts +22 -0
- package/dist/modules/auth/services/password-reset-audit-retention.service.d.ts.map +1 -0
- package/dist/modules/auth/services/password-reset-audit-retention.service.js +117 -0
- package/dist/modules/auth/services/password-reset-audit-retention.service.js.map +1 -0
- package/dist/modules/auth/services/password.service.d.ts +25 -5
- package/dist/modules/auth/services/password.service.d.ts.map +1 -1
- package/dist/modules/auth/services/password.service.js +154 -20
- package/dist/modules/auth/services/password.service.js.map +1 -1
- package/dist/modules/auth/services/pin-auth.service.d.ts +10 -3
- package/dist/modules/auth/services/pin-auth.service.d.ts.map +1 -1
- package/dist/modules/auth/services/pin-auth.service.js +110 -13
- package/dist/modules/auth/services/pin-auth.service.js.map +1 -1
- package/dist/modules/auth/services/registration.service.d.ts +10 -2
- package/dist/modules/auth/services/registration.service.d.ts.map +1 -1
- package/dist/modules/auth/services/registration.service.js +113 -25
- package/dist/modules/auth/services/registration.service.js.map +1 -1
- package/dist/modules/auth/services/turnstile.service.d.ts +17 -0
- package/dist/modules/auth/services/turnstile.service.d.ts.map +1 -0
- package/dist/modules/auth/services/turnstile.service.js +94 -0
- package/dist/modules/auth/services/turnstile.service.js.map +1 -0
- package/dist/modules/auth/utils/auth-params.util.d.ts +13 -6
- package/dist/modules/auth/utils/auth-params.util.d.ts.map +1 -1
- package/dist/modules/auth/utils/auth-params.util.js +27 -4
- package/dist/modules/auth/utils/auth-params.util.js.map +1 -1
- package/dist/modules/auth/utils/auth-supported.util.d.ts +12 -1
- package/dist/modules/auth/utils/auth-supported.util.d.ts.map +1 -1
- package/dist/modules/auth/utils/auth-supported.util.js +36 -4
- package/dist/modules/auth/utils/auth-supported.util.js.map +1 -1
- package/dist/modules/auth/utils/backup-code-hash.util.d.ts +10 -0
- package/dist/modules/auth/utils/backup-code-hash.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/backup-code-hash.util.js +31 -0
- package/dist/modules/auth/utils/backup-code-hash.util.js.map +1 -0
- package/dist/modules/auth/utils/backup-codes.util.d.ts +5 -0
- package/dist/modules/auth/utils/backup-codes.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/backup-codes.util.js +22 -0
- package/dist/modules/auth/utils/backup-codes.util.js.map +1 -0
- package/dist/modules/auth/utils/dpop.util.d.ts +22 -0
- package/dist/modules/auth/utils/dpop.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/dpop.util.js +73 -0
- package/dist/modules/auth/utils/dpop.util.js.map +1 -0
- package/dist/modules/auth/utils/mfa-secret.util.d.ts +22 -0
- package/dist/modules/auth/utils/mfa-secret.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/mfa-secret.util.js +59 -0
- package/dist/modules/auth/utils/mfa-secret.util.js.map +1 -0
- package/dist/modules/auth/utils/mfa-verify-params.util.d.ts +26 -0
- package/dist/modules/auth/utils/mfa-verify-params.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/mfa-verify-params.util.js +49 -0
- package/dist/modules/auth/utils/mfa-verify-params.util.js.map +1 -0
- package/dist/modules/auth/utils/step-up-purpose.util.d.ts +5 -0
- package/dist/modules/auth/utils/step-up-purpose.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/step-up-purpose.util.js +18 -0
- package/dist/modules/auth/utils/step-up-purpose.util.js.map +1 -0
- package/dist/modules/auth/utils/totp.util.d.ts +16 -0
- package/dist/modules/auth/utils/totp.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/totp.util.js +88 -0
- package/dist/modules/auth/utils/totp.util.js.map +1 -0
- package/dist/modules/delivery/composers/otp-delivery.composer.d.ts +28 -1
- package/dist/modules/delivery/composers/otp-delivery.composer.d.ts.map +1 -1
- package/dist/modules/delivery/composers/otp-delivery.composer.js +48 -2
- package/dist/modules/delivery/composers/otp-delivery.composer.js.map +1 -1
- package/dist/modules/delivery/constants/delivery-worker.constants.d.ts +29 -0
- package/dist/modules/delivery/constants/delivery-worker.constants.d.ts.map +1 -0
- package/dist/modules/delivery/constants/delivery-worker.constants.js +51 -0
- package/dist/modules/delivery/constants/delivery-worker.constants.js.map +1 -0
- package/dist/modules/delivery/delivery.module.d.ts.map +1 -1
- package/dist/modules/delivery/delivery.module.js +1 -15
- package/dist/modules/delivery/delivery.module.js.map +1 -1
- package/dist/modules/delivery/entities/notification-delivery-log.entity.d.ts.map +1 -1
- package/dist/modules/delivery/entities/notification-delivery-log.entity.js +3 -1
- package/dist/modules/delivery/entities/notification-delivery-log.entity.js.map +1 -1
- package/dist/modules/delivery/notification-delivery.service.d.ts +12 -1
- package/dist/modules/delivery/notification-delivery.service.d.ts.map +1 -1
- package/dist/modules/delivery/notification-delivery.service.js +121 -40
- package/dist/modules/delivery/notification-delivery.service.js.map +1 -1
- package/dist/modules/delivery/processors/delivery-job.runner.d.ts +22 -1
- package/dist/modules/delivery/processors/delivery-job.runner.d.ts.map +1 -1
- package/dist/modules/delivery/processors/delivery-job.runner.js +144 -42
- package/dist/modules/delivery/processors/delivery-job.runner.js.map +1 -1
- package/dist/modules/delivery/processors/delivery.processor.d.ts.map +1 -1
- package/dist/modules/delivery/processors/delivery.processor.js +6 -1
- package/dist/modules/delivery/processors/delivery.processor.js.map +1 -1
- package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts +11 -0
- package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts.map +1 -1
- package/dist/modules/delivery/processors/otp-delivery-job.runner.js +90 -16
- package/dist/modules/delivery/processors/otp-delivery-job.runner.js.map +1 -1
- package/dist/modules/delivery/processors/otp-delivery.processor.d.ts.map +1 -1
- package/dist/modules/delivery/processors/otp-delivery.processor.js +6 -1
- package/dist/modules/delivery/processors/otp-delivery.processor.js.map +1 -1
- package/dist/modules/delivery/queues/sync-jobs.queue.d.ts +7 -1
- package/dist/modules/delivery/queues/sync-jobs.queue.d.ts.map +1 -1
- package/dist/modules/delivery/queues/sync-jobs.queue.js +11 -2
- package/dist/modules/delivery/queues/sync-jobs.queue.js.map +1 -1
- package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts +7 -3
- package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts.map +1 -1
- package/dist/modules/delivery/services/delivery-audit-retention.service.js +33 -10
- package/dist/modules/delivery/services/delivery-audit-retention.service.js.map +1 -1
- package/dist/modules/delivery/services/notification-audit.service.d.ts +7 -4
- package/dist/modules/delivery/services/notification-audit.service.d.ts.map +1 -1
- package/dist/modules/delivery/services/notification-audit.service.js +83 -26
- package/dist/modules/delivery/services/notification-audit.service.js.map +1 -1
- package/dist/modules/delivery/utils/payload-snapshot.util.d.ts +2 -0
- package/dist/modules/delivery/utils/payload-snapshot.util.d.ts.map +1 -1
- package/dist/modules/delivery/utils/payload-snapshot.util.js +22 -3
- package/dist/modules/delivery/utils/payload-snapshot.util.js.map +1 -1
- package/dist/modules/file-upload/controllers/file-upload.controller.d.ts +7 -1
- package/dist/modules/file-upload/controllers/file-upload.controller.d.ts.map +1 -1
- package/dist/modules/file-upload/controllers/file-upload.controller.js +5 -7
- package/dist/modules/file-upload/controllers/file-upload.controller.js.map +1 -1
- package/dist/modules/file-upload/dto/file-upload.dto.d.ts +2 -0
- package/dist/modules/file-upload/dto/file-upload.dto.d.ts.map +1 -1
- package/dist/modules/file-upload/dto/file-upload.dto.js +20 -0
- package/dist/modules/file-upload/dto/file-upload.dto.js.map +1 -1
- package/dist/modules/file-upload/file-upload.module.d.ts.map +1 -1
- package/dist/modules/file-upload/file-upload.module.js +12 -2
- package/dist/modules/file-upload/file-upload.module.js.map +1 -1
- package/dist/modules/file-upload/services/file-upload.service.d.ts +24 -6
- package/dist/modules/file-upload/services/file-upload.service.d.ts.map +1 -1
- package/dist/modules/file-upload/services/file-upload.service.js +164 -36
- package/dist/modules/file-upload/services/file-upload.service.js.map +1 -1
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts +4 -2
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts.map +1 -1
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js +30 -5
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js.map +1 -1
- package/dist/modules/file-upload/utils/image-optimize.util.d.ts.map +1 -1
- package/dist/modules/file-upload/utils/image-optimize.util.js +7 -1
- package/dist/modules/file-upload/utils/image-optimize.util.js.map +1 -1
- package/dist/modules/health/health.controller.d.ts +5 -1
- package/dist/modules/health/health.controller.d.ts.map +1 -1
- package/dist/modules/health/health.controller.js +57 -3
- package/dist/modules/health/health.controller.js.map +1 -1
- package/dist/modules/invitations/controllers/invitations.controller.d.ts +19 -4
- package/dist/modules/invitations/controllers/invitations.controller.d.ts.map +1 -1
- package/dist/modules/invitations/controllers/invitations.controller.js +19 -10
- package/dist/modules/invitations/controllers/invitations.controller.js.map +1 -1
- package/dist/modules/invitations/dto/invitation.dto.d.ts +13 -0
- package/dist/modules/invitations/dto/invitation.dto.d.ts.map +1 -1
- package/dist/modules/invitations/dto/invitation.dto.js +69 -2
- package/dist/modules/invitations/dto/invitation.dto.js.map +1 -1
- package/dist/modules/invitations/services/invitations.service.d.ts +24 -6
- package/dist/modules/invitations/services/invitations.service.d.ts.map +1 -1
- package/dist/modules/invitations/services/invitations.service.js +96 -20
- package/dist/modules/invitations/services/invitations.service.js.map +1 -1
- package/dist/modules/jobs/queues/jobs.queue.d.ts +7 -2
- package/dist/modules/jobs/queues/jobs.queue.d.ts.map +1 -1
- package/dist/modules/jobs/queues/jobs.queue.js +25 -10
- package/dist/modules/jobs/queues/jobs.queue.js.map +1 -1
- package/dist/modules/notifications/controllers/notifications.controller.d.ts +3 -1
- package/dist/modules/notifications/controllers/notifications.controller.d.ts.map +1 -1
- package/dist/modules/notifications/controllers/notifications.controller.js +25 -2
- package/dist/modules/notifications/controllers/notifications.controller.js.map +1 -1
- package/dist/modules/notifications/dto/notification-query.dto.d.ts.map +1 -1
- package/dist/modules/notifications/dto/notification-query.dto.js +1 -0
- package/dist/modules/notifications/dto/notification-query.dto.js.map +1 -1
- package/dist/modules/notifications/entities/device-token.entity.d.ts.map +1 -1
- package/dist/modules/notifications/entities/device-token.entity.js +3 -1
- package/dist/modules/notifications/entities/device-token.entity.js.map +1 -1
- package/dist/modules/notifications/services/fcm.service.d.ts +2 -0
- package/dist/modules/notifications/services/fcm.service.d.ts.map +1 -1
- package/dist/modules/notifications/services/fcm.service.js +28 -7
- package/dist/modules/notifications/services/fcm.service.js.map +1 -1
- package/dist/modules/notifications/services/notifications.service.d.ts +16 -3
- package/dist/modules/notifications/services/notifications.service.d.ts.map +1 -1
- package/dist/modules/notifications/services/notifications.service.js +95 -24
- package/dist/modules/notifications/services/notifications.service.js.map +1 -1
- package/dist/modules/observability/metrics/metrics.service.d.ts +2 -0
- package/dist/modules/observability/metrics/metrics.service.d.ts.map +1 -1
- package/dist/modules/observability/metrics/metrics.service.js +11 -0
- package/dist/modules/observability/metrics/metrics.service.js.map +1 -1
- package/dist/modules/otp/constants/otp.constants.d.ts +7 -5
- package/dist/modules/otp/constants/otp.constants.d.ts.map +1 -1
- package/dist/modules/otp/constants/otp.constants.js +11 -8
- package/dist/modules/otp/constants/otp.constants.js.map +1 -1
- package/dist/modules/otp/interfaces/otp.service.interface.d.ts +1 -1
- package/dist/modules/otp/interfaces/otp.service.interface.d.ts.map +1 -1
- package/dist/modules/otp/otp.service.d.ts +10 -2
- package/dist/modules/otp/otp.service.d.ts.map +1 -1
- package/dist/modules/otp/otp.service.js +48 -4
- package/dist/modules/otp/otp.service.js.map +1 -1
- package/dist/modules/otp/services/otp.rate-limiter.d.ts +2 -0
- package/dist/modules/otp/services/otp.rate-limiter.d.ts.map +1 -1
- package/dist/modules/otp/services/otp.rate-limiter.js +19 -0
- package/dist/modules/otp/services/otp.rate-limiter.js.map +1 -1
- package/dist/modules/otp/services/otp.session.store.d.ts +9 -3
- package/dist/modules/otp/services/otp.session.store.d.ts.map +1 -1
- package/dist/modules/otp/services/otp.session.store.js +34 -42
- package/dist/modules/otp/services/otp.session.store.js.map +1 -1
- package/dist/modules/otp/utils/otp-code-hash.util.d.ts +11 -0
- package/dist/modules/otp/utils/otp-code-hash.util.d.ts.map +1 -0
- package/dist/modules/otp/utils/otp-code-hash.util.js +68 -0
- package/dist/modules/otp/utils/otp-code-hash.util.js.map +1 -0
- package/dist/modules/profile/controllers/profile.controller.d.ts +9 -3
- package/dist/modules/profile/controllers/profile.controller.d.ts.map +1 -1
- package/dist/modules/profile/controllers/profile.controller.js +140 -8
- package/dist/modules/profile/controllers/profile.controller.js.map +1 -1
- package/dist/modules/profile/dto/create-user-profile.dto.d.ts +10 -0
- package/dist/modules/profile/dto/create-user-profile.dto.d.ts.map +1 -1
- package/dist/modules/profile/dto/create-user-profile.dto.js +43 -1
- package/dist/modules/profile/dto/create-user-profile.dto.js.map +1 -1
- package/dist/modules/profile/dto/public-user-profile.dto.d.ts +24 -0
- package/dist/modules/profile/dto/public-user-profile.dto.d.ts.map +1 -0
- package/dist/modules/profile/dto/public-user-profile.dto.js +115 -0
- package/dist/modules/profile/dto/public-user-profile.dto.js.map +1 -0
- package/dist/modules/profile/dto/user-profile-response.dto.d.ts +4 -0
- package/dist/modules/profile/dto/user-profile-response.dto.d.ts.map +1 -1
- package/dist/modules/profile/dto/user-profile-response.dto.js +4 -0
- package/dist/modules/profile/dto/user-profile-response.dto.js.map +1 -1
- package/dist/modules/profile/dto/username-available.dto.d.ts +6 -0
- package/dist/modules/profile/dto/username-available.dto.d.ts.map +1 -0
- package/dist/modules/profile/dto/username-available.dto.js +31 -0
- package/dist/modules/profile/dto/username-available.dto.js.map +1 -0
- package/dist/modules/profile/entities/user-profiles.entity.d.ts +10 -0
- package/dist/modules/profile/entities/user-profiles.entity.d.ts.map +1 -1
- package/dist/modules/profile/entities/user-profiles.entity.js +29 -1
- package/dist/modules/profile/entities/user-profiles.entity.js.map +1 -1
- package/dist/modules/profile/index.d.ts +1 -0
- package/dist/modules/profile/index.d.ts.map +1 -1
- package/dist/modules/profile/index.js +1 -0
- package/dist/modules/profile/index.js.map +1 -1
- package/dist/modules/profile/profile.manifest.d.ts +2 -2
- package/dist/modules/profile/profile.manifest.js +2 -2
- package/dist/modules/profile/profile.manifest.js.map +1 -1
- package/dist/modules/profile/profile.module.d.ts.map +1 -1
- package/dist/modules/profile/profile.module.js +7 -2
- package/dist/modules/profile/profile.module.js.map +1 -1
- package/dist/modules/profile/services/profile.service.d.ts +56 -4
- package/dist/modules/profile/services/profile.service.d.ts.map +1 -1
- package/dist/modules/profile/services/profile.service.js +247 -20
- package/dist/modules/profile/services/profile.service.js.map +1 -1
- package/dist/modules/realtime/adapters/redis-io.adapter.d.ts +26 -0
- package/dist/modules/realtime/adapters/redis-io.adapter.d.ts.map +1 -0
- package/dist/modules/realtime/adapters/redis-io.adapter.js +124 -0
- package/dist/modules/realtime/adapters/redis-io.adapter.js.map +1 -0
- package/dist/modules/realtime/constants/realtime.constants.d.ts +36 -0
- package/dist/modules/realtime/constants/realtime.constants.d.ts.map +1 -0
- package/dist/modules/realtime/constants/realtime.constants.js +42 -0
- package/dist/modules/realtime/constants/realtime.constants.js.map +1 -0
- package/dist/modules/realtime/controllers/realtime.controller.d.ts +21 -0
- package/dist/modules/realtime/controllers/realtime.controller.d.ts.map +1 -0
- package/dist/modules/realtime/controllers/realtime.controller.js +113 -0
- package/dist/modules/realtime/controllers/realtime.controller.js.map +1 -0
- package/dist/modules/realtime/gateway/realtime.gateway.d.ts +42 -0
- package/dist/modules/realtime/gateway/realtime.gateway.d.ts.map +1 -0
- package/dist/modules/realtime/gateway/realtime.gateway.js +289 -0
- package/dist/modules/realtime/gateway/realtime.gateway.js.map +1 -0
- package/dist/modules/realtime/index.d.ts +12 -0
- package/dist/modules/realtime/index.d.ts.map +1 -0
- package/dist/modules/realtime/index.js +35 -0
- package/dist/modules/realtime/index.js.map +1 -0
- package/dist/modules/realtime/realtime.manifest.d.ts +8 -0
- package/dist/modules/realtime/realtime.manifest.d.ts.map +1 -0
- package/dist/modules/realtime/realtime.manifest.js +31 -0
- package/dist/modules/realtime/realtime.manifest.js.map +1 -0
- package/dist/modules/realtime/realtime.module.d.ts +14 -0
- package/dist/modules/realtime/realtime.module.d.ts.map +1 -0
- package/dist/modules/realtime/realtime.module.js +126 -0
- package/dist/modules/realtime/realtime.module.js.map +1 -0
- package/dist/modules/realtime/services/realtime-handler.registry.d.ts +16 -0
- package/dist/modules/realtime/services/realtime-handler.registry.d.ts.map +1 -0
- package/dist/modules/realtime/services/realtime-handler.registry.js +55 -0
- package/dist/modules/realtime/services/realtime-handler.registry.js.map +1 -0
- package/dist/modules/realtime/services/realtime-presence.service.d.ts +15 -0
- package/dist/modules/realtime/services/realtime-presence.service.d.ts.map +1 -0
- package/dist/modules/realtime/services/realtime-presence.service.js +86 -0
- package/dist/modules/realtime/services/realtime-presence.service.js.map +1 -0
- package/dist/modules/realtime/services/realtime-rate-limiter.service.d.ts +12 -0
- package/dist/modules/realtime/services/realtime-rate-limiter.service.d.ts.map +1 -0
- package/dist/modules/realtime/services/realtime-rate-limiter.service.js +63 -0
- package/dist/modules/realtime/services/realtime-rate-limiter.service.js.map +1 -0
- package/dist/modules/realtime/services/realtime.service.d.ts +88 -0
- package/dist/modules/realtime/services/realtime.service.d.ts.map +1 -0
- package/dist/modules/realtime/services/realtime.service.js +343 -0
- package/dist/modules/realtime/services/realtime.service.js.map +1 -0
- package/dist/modules/realtime/types/realtime.types.d.ts +50 -0
- package/dist/modules/realtime/types/realtime.types.d.ts.map +1 -0
- package/dist/modules/realtime/types/realtime.types.js +14 -0
- package/dist/modules/realtime/types/realtime.types.js.map +1 -0
- package/dist/modules/realtime/utils/handshake-error.util.d.ts +5 -0
- package/dist/modules/realtime/utils/handshake-error.util.d.ts.map +1 -0
- package/dist/modules/realtime/utils/handshake-error.util.js +45 -0
- package/dist/modules/realtime/utils/handshake-error.util.js.map +1 -0
- package/dist/modules/roles/controllers/modules.controller.d.ts +4 -3
- package/dist/modules/roles/controllers/modules.controller.d.ts.map +1 -1
- package/dist/modules/roles/controllers/modules.controller.js +21 -10
- package/dist/modules/roles/controllers/modules.controller.js.map +1 -1
- package/dist/modules/roles/controllers/permissions.controller.d.ts +4 -3
- package/dist/modules/roles/controllers/permissions.controller.d.ts.map +1 -1
- package/dist/modules/roles/controllers/permissions.controller.js +21 -10
- package/dist/modules/roles/controllers/permissions.controller.js.map +1 -1
- package/dist/modules/roles/controllers/roles.controller.d.ts +5 -4
- package/dist/modules/roles/controllers/roles.controller.d.ts.map +1 -1
- package/dist/modules/roles/controllers/roles.controller.js +26 -13
- package/dist/modules/roles/controllers/roles.controller.js.map +1 -1
- package/dist/modules/roles/controllers/user-roles.controller.d.ts +3 -2
- package/dist/modules/roles/controllers/user-roles.controller.d.ts.map +1 -1
- package/dist/modules/roles/controllers/user-roles.controller.js +14 -6
- package/dist/modules/roles/controllers/user-roles.controller.js.map +1 -1
- package/dist/modules/roles/services/modules.service.d.ts +8 -5
- package/dist/modules/roles/services/modules.service.d.ts.map +1 -1
- package/dist/modules/roles/services/modules.service.js +58 -12
- package/dist/modules/roles/services/modules.service.js.map +1 -1
- package/dist/modules/roles/services/permissions.service.d.ts +8 -5
- package/dist/modules/roles/services/permissions.service.d.ts.map +1 -1
- package/dist/modules/roles/services/permissions.service.js +61 -12
- package/dist/modules/roles/services/permissions.service.js.map +1 -1
- package/dist/modules/roles/services/roles.service.d.ts +19 -9
- package/dist/modules/roles/services/roles.service.d.ts.map +1 -1
- package/dist/modules/roles/services/roles.service.js +137 -47
- package/dist/modules/roles/services/roles.service.js.map +1 -1
- package/dist/modules/roles/services/user-roles.service.d.ts +12 -4
- package/dist/modules/roles/services/user-roles.service.d.ts.map +1 -1
- package/dist/modules/roles/services/user-roles.service.js +58 -26
- package/dist/modules/roles/services/user-roles.service.js.map +1 -1
- package/dist/modules/sessions/entities/refresh-token.entity.d.ts +7 -1
- package/dist/modules/sessions/entities/refresh-token.entity.d.ts.map +1 -1
- package/dist/modules/sessions/entities/refresh-token.entity.js +10 -0
- package/dist/modules/sessions/entities/refresh-token.entity.js.map +1 -1
- package/dist/modules/sessions/entities/revoked-refresh-family.entity.d.ts +12 -0
- package/dist/modules/sessions/entities/revoked-refresh-family.entity.d.ts.map +1 -0
- package/dist/modules/sessions/entities/revoked-refresh-family.entity.js +46 -0
- package/dist/modules/sessions/entities/revoked-refresh-family.entity.js.map +1 -0
- package/dist/modules/sessions/services/refresh-token-retention.service.d.ts +20 -0
- package/dist/modules/sessions/services/refresh-token-retention.service.d.ts.map +1 -0
- package/dist/modules/sessions/services/refresh-token-retention.service.js +97 -0
- package/dist/modules/sessions/services/refresh-token-retention.service.js.map +1 -0
- package/dist/modules/sessions/services/token.service.d.ts +150 -16
- package/dist/modules/sessions/services/token.service.d.ts.map +1 -1
- package/dist/modules/sessions/services/token.service.js +505 -74
- package/dist/modules/sessions/services/token.service.js.map +1 -1
- package/dist/modules/sessions/sessions.module.d.ts.map +1 -1
- package/dist/modules/sessions/sessions.module.js +4 -2
- package/dist/modules/sessions/sessions.module.js.map +1 -1
- package/dist/modules/sessions/utils/refresh-token-hash.util.d.ts +13 -0
- package/dist/modules/sessions/utils/refresh-token-hash.util.d.ts.map +1 -0
- package/dist/modules/sessions/utils/refresh-token-hash.util.js +37 -0
- package/dist/modules/sessions/utils/refresh-token-hash.util.js.map +1 -0
- package/dist/modules/settings/constants/settings.defaults.d.ts +57 -3
- package/dist/modules/settings/constants/settings.defaults.d.ts.map +1 -1
- package/dist/modules/settings/constants/settings.defaults.js +58 -3
- package/dist/modules/settings/constants/settings.defaults.js.map +1 -1
- package/dist/modules/settings/constants/settings.keys.d.ts +138 -2
- package/dist/modules/settings/constants/settings.keys.d.ts.map +1 -1
- package/dist/modules/settings/constants/settings.keys.js +140 -2
- package/dist/modules/settings/constants/settings.keys.js.map +1 -1
- package/dist/modules/settings/controllers/settings.controller.d.ts +5 -1
- package/dist/modules/settings/controllers/settings.controller.d.ts.map +1 -1
- package/dist/modules/settings/controllers/settings.controller.js +134 -5
- package/dist/modules/settings/controllers/settings.controller.js.map +1 -1
- package/dist/modules/settings/services/settings.service.d.ts +17 -7
- package/dist/modules/settings/services/settings.service.d.ts.map +1 -1
- package/dist/modules/settings/services/settings.service.js +80 -14
- package/dist/modules/settings/services/settings.service.js.map +1 -1
- package/dist/modules/settings/utils/settings-secret.util.d.ts +13 -0
- package/dist/modules/settings/utils/settings-secret.util.d.ts.map +1 -0
- package/dist/modules/settings/utils/settings-secret.util.js +80 -0
- package/dist/modules/settings/utils/settings-secret.util.js.map +1 -0
- package/dist/modules/users/controllers/users.controller.d.ts +4 -2
- package/dist/modules/users/controllers/users.controller.d.ts.map +1 -1
- package/dist/modules/users/controllers/users.controller.js +89 -10
- package/dist/modules/users/controllers/users.controller.js.map +1 -1
- package/dist/modules/users/dto/user.dto.d.ts +3 -0
- package/dist/modules/users/dto/user.dto.d.ts.map +1 -1
- package/dist/modules/users/dto/user.dto.js +27 -4
- package/dist/modules/users/dto/user.dto.js.map +1 -1
- package/dist/modules/users/entities/user.entity.d.ts +7 -1
- package/dist/modules/users/entities/user.entity.d.ts.map +1 -1
- package/dist/modules/users/entities/user.entity.js +10 -0
- package/dist/modules/users/entities/user.entity.js.map +1 -1
- package/dist/modules/users/services/users.service.d.ts +15 -2
- package/dist/modules/users/services/users.service.d.ts.map +1 -1
- package/dist/modules/users/services/users.service.js +152 -37
- package/dist/modules/users/services/users.service.js.map +1 -1
- package/dist/modules/users/users.module.d.ts.map +1 -1
- package/dist/modules/users/users.module.js +1 -2
- package/dist/modules/users/users.module.js.map +1 -1
- package/package.json +19 -7
- package/dist/modules/admin/entities/admin-log.entity.d.ts +0 -20
- package/dist/modules/admin/entities/admin-log.entity.d.ts.map +0 -1
- package/dist/modules/admin/entities/admin-log.entity.js +0 -65
- package/dist/modules/admin/entities/admin-log.entity.js.map +0 -1
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AuditService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const redis_module_1 = require("../../../config/redis.module");
|
|
20
|
+
const structured_logger_service_1 = require("../../observability/logging/structured-logger.service");
|
|
21
|
+
const settings_keys_1 = require("../../settings/constants/settings.keys");
|
|
22
|
+
const settings_service_1 = require("../../settings/services/settings.service");
|
|
23
|
+
const audit_event_entity_1 = require("../entities/audit-event.entity");
|
|
24
|
+
const audit_hash_util_1 = require("../utils/audit-hash.util");
|
|
25
|
+
const audit_outbox_worker_1 = require("./audit-outbox.worker");
|
|
26
|
+
const audit_write_service_1 = require("./audit-write.service");
|
|
27
|
+
/** Deep offset pages become expensive — prefer cursor beyond this page. */
|
|
28
|
+
const MAX_OFFSET_PAGE = 50;
|
|
29
|
+
const VERIFY_LOCK_KEY = 'audit:verify:lock';
|
|
30
|
+
const VERIFY_LOCK_TTL_SEC = 120;
|
|
31
|
+
const VERIFY_DEFAULT_LIMIT = 2_000;
|
|
32
|
+
let AuditService = class AuditService {
|
|
33
|
+
repo;
|
|
34
|
+
write;
|
|
35
|
+
outboxWorker;
|
|
36
|
+
settingsService;
|
|
37
|
+
logger;
|
|
38
|
+
redis;
|
|
39
|
+
constructor(repo, write, outboxWorker, settingsService, logger, redis) {
|
|
40
|
+
this.repo = repo;
|
|
41
|
+
this.write = write;
|
|
42
|
+
this.outboxWorker = outboxWorker;
|
|
43
|
+
this.settingsService = settingsService;
|
|
44
|
+
this.logger = logger;
|
|
45
|
+
this.redis = redis;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Fire-and-forget durable append (outbox → sealed event).
|
|
49
|
+
* Never throws to the caller — audit must not break the primary action.
|
|
50
|
+
*/
|
|
51
|
+
record(input) {
|
|
52
|
+
void this.enqueueAndKick(input);
|
|
53
|
+
}
|
|
54
|
+
/** Awaitable write for tests / critical paths that need confirmation. */
|
|
55
|
+
async recordAsync(input) {
|
|
56
|
+
try {
|
|
57
|
+
const outboxId = await this.write.enqueue(input);
|
|
58
|
+
return await this.write.flushOne(outboxId);
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Critical-path atomic audit: seals the event inside the caller's transaction
|
|
66
|
+
* so domain mutation + audit commit together.
|
|
67
|
+
*/
|
|
68
|
+
async recordInTransaction(manager, input) {
|
|
69
|
+
return this.write.recordInTransaction(manager, input);
|
|
70
|
+
}
|
|
71
|
+
/** Transactional outbox only (seal happens after commit via worker). */
|
|
72
|
+
async enqueueInTransaction(manager, input) {
|
|
73
|
+
return this.write.enqueueInTransaction(manager, input);
|
|
74
|
+
}
|
|
75
|
+
/** Kick outbox drain after a committed transactional enqueue. */
|
|
76
|
+
kickOutbox() {
|
|
77
|
+
this.outboxWorker.kick();
|
|
78
|
+
}
|
|
79
|
+
async findAll(filter) {
|
|
80
|
+
const limit = filter.limit ?? 20;
|
|
81
|
+
const qb = this.baseFilterQb(filter).orderBy('event.chainSeq', 'DESC').take(limit);
|
|
82
|
+
if (filter.cursor) {
|
|
83
|
+
qb.andWhere('event.chainSeq < :cursor', { cursor: filter.cursor });
|
|
84
|
+
const data = await qb.getMany();
|
|
85
|
+
const nextCursor = data.length === limit ? String(data[data.length - 1].chainSeq) : null;
|
|
86
|
+
return { data, limit, nextCursor };
|
|
87
|
+
}
|
|
88
|
+
const page = filter.page ?? 1;
|
|
89
|
+
if (page > MAX_OFFSET_PAGE) {
|
|
90
|
+
throw new common_1.BadRequestException(`Offset page > ${MAX_OFFSET_PAGE} is not supported. Pass cursor=${filter.cursor ?? '<last nextCursor>'} for deep scans.`);
|
|
91
|
+
}
|
|
92
|
+
const skip = (page - 1) * limit;
|
|
93
|
+
qb.skip(skip);
|
|
94
|
+
const [data, total] = await qb.getManyAndCount();
|
|
95
|
+
const nextCursor = data.length === limit ? String(data[data.length - 1].chainSeq) : null;
|
|
96
|
+
return {
|
|
97
|
+
data,
|
|
98
|
+
total,
|
|
99
|
+
page,
|
|
100
|
+
limit,
|
|
101
|
+
totalPages: Math.ceil(total / limit),
|
|
102
|
+
nextCursor,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Buffered export for tests/tools only — prefer {@link streamExport} for HTTP.
|
|
107
|
+
* Hard-capped at 2k rows to avoid heap spikes.
|
|
108
|
+
*/
|
|
109
|
+
async export(filter) {
|
|
110
|
+
const format = filter.format ?? 'json';
|
|
111
|
+
const chunks = [];
|
|
112
|
+
await this.streamExportBounded(filter, Math.min(this.exportMaxRows(), 2_000), (chunk) => {
|
|
113
|
+
chunks.push(chunk);
|
|
114
|
+
});
|
|
115
|
+
return {
|
|
116
|
+
format,
|
|
117
|
+
body: chunks.join(''),
|
|
118
|
+
contentType: format === 'csv' ? 'text/csv; charset=utf-8' : 'application/json; charset=utf-8',
|
|
119
|
+
filename: `audit-export-${Date.now()}.${format === 'csv' ? 'csv' : 'json'}`,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Stream export body in chain_seq batches (caller sets response headers first).
|
|
124
|
+
*/
|
|
125
|
+
async streamExport(filter, write) {
|
|
126
|
+
await this.streamExportBounded(filter, this.exportMaxRows(), write);
|
|
127
|
+
}
|
|
128
|
+
async streamExportBounded(filter, maxRows, write) {
|
|
129
|
+
const format = filter.format ?? 'json';
|
|
130
|
+
const batchSize = 500;
|
|
131
|
+
if (format === 'csv') {
|
|
132
|
+
write(`${this.csvHeader()}\n`);
|
|
133
|
+
let written = 0;
|
|
134
|
+
let afterSeq;
|
|
135
|
+
while (written < maxRows) {
|
|
136
|
+
const take = Math.min(batchSize, maxRows - written);
|
|
137
|
+
const batch = await this.fetchExportBatch(filter, afterSeq, take);
|
|
138
|
+
if (batch.length === 0)
|
|
139
|
+
break;
|
|
140
|
+
for (const row of batch) {
|
|
141
|
+
write(`${this.csvLine(row)}\n`);
|
|
142
|
+
}
|
|
143
|
+
written += batch.length;
|
|
144
|
+
afterSeq = batch[batch.length - 1].chainSeq;
|
|
145
|
+
if (batch.length < take)
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
write('[\n');
|
|
151
|
+
let written = 0;
|
|
152
|
+
let afterSeq;
|
|
153
|
+
let first = true;
|
|
154
|
+
while (written < maxRows) {
|
|
155
|
+
const take = Math.min(batchSize, maxRows - written);
|
|
156
|
+
const batch = await this.fetchExportBatch(filter, afterSeq, take);
|
|
157
|
+
if (batch.length === 0)
|
|
158
|
+
break;
|
|
159
|
+
for (const row of batch) {
|
|
160
|
+
if (!first)
|
|
161
|
+
write(',\n');
|
|
162
|
+
write(JSON.stringify(row));
|
|
163
|
+
first = false;
|
|
164
|
+
}
|
|
165
|
+
written += batch.length;
|
|
166
|
+
afterSeq = batch[batch.length - 1].chainSeq;
|
|
167
|
+
if (batch.length < take)
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
write('\n]');
|
|
171
|
+
}
|
|
172
|
+
exportMaxRows() {
|
|
173
|
+
const configured = this.settingsService.get(settings_keys_1.SETTING_KEYS.AUDIT_EXPORT_MAX_ROWS) ?? 10_000;
|
|
174
|
+
return Math.min(configured, 100_000);
|
|
175
|
+
}
|
|
176
|
+
async fetchExportBatch(filter, afterChainSeq, take) {
|
|
177
|
+
const qb = this.baseFilterQb(filter).orderBy('event.chainSeq', 'ASC').take(take);
|
|
178
|
+
if (afterChainSeq != null) {
|
|
179
|
+
qb.andWhere('event.chainSeq > :afterChainSeq', { afterChainSeq });
|
|
180
|
+
}
|
|
181
|
+
return qb.getMany();
|
|
182
|
+
}
|
|
183
|
+
async setLegalHold(id, legalHold) {
|
|
184
|
+
return this.write.setLegalHold(id, legalHold);
|
|
185
|
+
}
|
|
186
|
+
async verifyChain(limit = VERIFY_DEFAULT_LIMIT) {
|
|
187
|
+
const acquired = await this.redis
|
|
188
|
+
.set(VERIFY_LOCK_KEY, '1', 'EX', VERIFY_LOCK_TTL_SEC, 'NX')
|
|
189
|
+
.catch(() => 'OK');
|
|
190
|
+
if (acquired !== 'OK') {
|
|
191
|
+
throw new common_1.HttpException({ message: 'Audit chain verify already in progress. Retry shortly.' }, common_1.HttpStatus.TOO_MANY_REQUESTS);
|
|
192
|
+
}
|
|
193
|
+
try {
|
|
194
|
+
const rows = await this.repo.find({
|
|
195
|
+
order: { chainSeq: 'ASC' },
|
|
196
|
+
take: Math.min(limit, VERIFY_DEFAULT_LIMIT),
|
|
197
|
+
where: undefined,
|
|
198
|
+
});
|
|
199
|
+
let checked = 0;
|
|
200
|
+
let expectedPrev = null;
|
|
201
|
+
let hashingStarted = false;
|
|
202
|
+
for (const row of rows) {
|
|
203
|
+
if (!row.eventHash) {
|
|
204
|
+
// Pre-enterprise backfill rows — skip until first hashed event.
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
hashingStarted = true;
|
|
208
|
+
checked += 1;
|
|
209
|
+
if ((row.prevHash ?? null) !== expectedPrev) {
|
|
210
|
+
return {
|
|
211
|
+
valid: false,
|
|
212
|
+
checked,
|
|
213
|
+
firstBreakChainSeq: String(row.chainSeq),
|
|
214
|
+
firstBreakId: row.id,
|
|
215
|
+
message: 'prev_hash mismatch',
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
const recomputed = (0, audit_hash_util_1.computeAuditEventHash)(row.prevHash ?? null, {
|
|
219
|
+
chainSeq: row.chainSeq,
|
|
220
|
+
action: row.action,
|
|
221
|
+
actorType: row.actorType,
|
|
222
|
+
actorId: row.actorId ?? null,
|
|
223
|
+
resourceType: row.resourceType ?? null,
|
|
224
|
+
resourceId: row.resourceId ?? null,
|
|
225
|
+
status: row.status,
|
|
226
|
+
metadata: row.metadata ?? null,
|
|
227
|
+
requestId: row.requestId ?? null,
|
|
228
|
+
correlationId: row.correlationId ?? null,
|
|
229
|
+
traceId: row.traceId ?? null,
|
|
230
|
+
});
|
|
231
|
+
if (recomputed !== row.eventHash) {
|
|
232
|
+
return {
|
|
233
|
+
valid: false,
|
|
234
|
+
checked,
|
|
235
|
+
firstBreakChainSeq: String(row.chainSeq),
|
|
236
|
+
firstBreakId: row.id,
|
|
237
|
+
message: 'event_hash mismatch',
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
expectedPrev = row.eventHash;
|
|
241
|
+
}
|
|
242
|
+
return {
|
|
243
|
+
valid: true,
|
|
244
|
+
checked,
|
|
245
|
+
message: hashingStarted
|
|
246
|
+
? `Verified ${checked} sealed events`
|
|
247
|
+
: 'No sealed events yet (chain empty or pre-hash only)',
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
finally {
|
|
251
|
+
await this.redis.del(VERIFY_LOCK_KEY).catch(() => undefined);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
async enqueueAndKick(input) {
|
|
255
|
+
try {
|
|
256
|
+
await this.write.enqueue(input);
|
|
257
|
+
this.outboxWorker.kick();
|
|
258
|
+
}
|
|
259
|
+
catch (err) {
|
|
260
|
+
this.logger.error('Audit outbox enqueue failed', {
|
|
261
|
+
event: 'audit.persist_failed',
|
|
262
|
+
metadata: { action: input.action, actorId: input.actorId ?? null },
|
|
263
|
+
err: err instanceof Error ? err : undefined,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
baseFilterQb(filter) {
|
|
268
|
+
const qb = this.repo.createQueryBuilder('event');
|
|
269
|
+
if (filter.actorId) {
|
|
270
|
+
qb.andWhere('event.actorId = :actorId', { actorId: filter.actorId });
|
|
271
|
+
}
|
|
272
|
+
if (filter.actorType) {
|
|
273
|
+
qb.andWhere('event.actorType = :actorType', { actorType: filter.actorType });
|
|
274
|
+
}
|
|
275
|
+
if (filter.action) {
|
|
276
|
+
// Prefix match keeps IDX_audit_events_action usable; leading % would seq-scan.
|
|
277
|
+
const action = filter.action.replace(/[%_]/g, '\\$&');
|
|
278
|
+
qb.andWhere('event.action LIKE :action ESCAPE :esc', {
|
|
279
|
+
action: `${action}%`,
|
|
280
|
+
esc: '\\',
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
if (filter.resourceType) {
|
|
284
|
+
qb.andWhere('event.resourceType = :resourceType', {
|
|
285
|
+
resourceType: filter.resourceType,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
if (filter.resourceId) {
|
|
289
|
+
qb.andWhere('event.resourceId = :resourceId', { resourceId: filter.resourceId });
|
|
290
|
+
}
|
|
291
|
+
if (filter.from) {
|
|
292
|
+
qb.andWhere('event.createdAt >= :from', { from: new Date(filter.from) });
|
|
293
|
+
}
|
|
294
|
+
if (filter.to) {
|
|
295
|
+
qb.andWhere('event.createdAt <= :to', { to: new Date(filter.to) });
|
|
296
|
+
}
|
|
297
|
+
if (filter.correlationId) {
|
|
298
|
+
qb.andWhere('event.correlationId = :correlationId', {
|
|
299
|
+
correlationId: filter.correlationId,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
return qb;
|
|
303
|
+
}
|
|
304
|
+
csvHeader() {
|
|
305
|
+
return [
|
|
306
|
+
'id',
|
|
307
|
+
'chain_seq',
|
|
308
|
+
'created_at',
|
|
309
|
+
'actor_type',
|
|
310
|
+
'actor_id',
|
|
311
|
+
'action',
|
|
312
|
+
'resource_type',
|
|
313
|
+
'resource_id',
|
|
314
|
+
'status',
|
|
315
|
+
'ip_address',
|
|
316
|
+
'request_id',
|
|
317
|
+
'correlation_id',
|
|
318
|
+
'trace_id',
|
|
319
|
+
'event_hash',
|
|
320
|
+
'prev_hash',
|
|
321
|
+
'legal_hold',
|
|
322
|
+
'metadata',
|
|
323
|
+
].join(',');
|
|
324
|
+
}
|
|
325
|
+
csvEscape(v) {
|
|
326
|
+
if (v == null)
|
|
327
|
+
return '';
|
|
328
|
+
const s = typeof v === 'string' ? v : JSON.stringify(v);
|
|
329
|
+
return `"${s.replace(/"/g, '""')}"`;
|
|
330
|
+
}
|
|
331
|
+
csvLine(r) {
|
|
332
|
+
return [
|
|
333
|
+
r.id,
|
|
334
|
+
r.chainSeq,
|
|
335
|
+
r.createdAt.toISOString(),
|
|
336
|
+
r.actorType,
|
|
337
|
+
r.actorId,
|
|
338
|
+
r.action,
|
|
339
|
+
r.resourceType,
|
|
340
|
+
r.resourceId,
|
|
341
|
+
r.status,
|
|
342
|
+
r.ipAddress,
|
|
343
|
+
r.requestId,
|
|
344
|
+
r.correlationId,
|
|
345
|
+
r.traceId,
|
|
346
|
+
r.eventHash,
|
|
347
|
+
r.prevHash,
|
|
348
|
+
r.legalHold,
|
|
349
|
+
r.metadata,
|
|
350
|
+
]
|
|
351
|
+
.map((v) => this.csvEscape(v))
|
|
352
|
+
.join(',');
|
|
353
|
+
}
|
|
354
|
+
toCsv(rows) {
|
|
355
|
+
const lines = [this.csvHeader()];
|
|
356
|
+
for (const r of rows) {
|
|
357
|
+
lines.push(this.csvLine(r));
|
|
358
|
+
}
|
|
359
|
+
return lines.join('\n');
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
exports.AuditService = AuditService;
|
|
363
|
+
exports.AuditService = AuditService = __decorate([
|
|
364
|
+
(0, common_1.Injectable)(),
|
|
365
|
+
__param(0, (0, typeorm_1.InjectRepository)(audit_event_entity_1.AuditEvent)),
|
|
366
|
+
__param(5, (0, common_1.Inject)(redis_module_1.REDIS_CLIENT)),
|
|
367
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
368
|
+
audit_write_service_1.AuditWriteService,
|
|
369
|
+
audit_outbox_worker_1.AuditOutboxWorker,
|
|
370
|
+
settings_service_1.SettingsService,
|
|
371
|
+
structured_logger_service_1.StructuredLoggerService, Function])
|
|
372
|
+
], AuditService);
|
|
373
|
+
//# sourceMappingURL=audit.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.service.js","sourceRoot":"","sources":["../../../../src/modules/audit/services/audit.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoG;AACpG,6CAAmD;AAEnD,qCAAwE;AAExE,+DAA4D;AAC5D,qGAAgG;AAChG,0EAAsE;AACtE,+EAA2E;AAQ3E,uEAA4D;AAC5D,8DAAiE;AACjE,+DAA0D;AAC1D,+DAA0D;AAE1D,2EAA2E;AAC3E,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAC5C,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAG5B,IAAM,YAAY,GAAlB,MAAM,YAAY;IAGN;IACA;IACA;IACA;IACA;IAEA;IARlB,YAEkB,IAA4B,EAC5B,KAAwB,EACxB,YAA+B,EAC/B,eAAgC,EAChC,MAA+B,EAE/B,KAAc;QANd,SAAI,GAAJ,IAAI,CAAwB;QAC5B,UAAK,GAAL,KAAK,CAAmB;QACxB,iBAAY,GAAZ,YAAY,CAAmB;QAC/B,oBAAe,GAAf,eAAe,CAAiB;QAChC,WAAM,GAAN,MAAM,CAAyB;QAE/B,UAAK,GAAL,KAAK,CAAS;IAC7B,CAAC;IAEJ;;;OAGG;IACH,MAAM,CAAC,KAA4B;QAClC,KAAK,IAAI,CAAC,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ACX,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,QAAQ;YACV,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,QAAQ;SACV;aACC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;aAC7B,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAEO,KAAK,CAAC,IAAkB;QAC/B,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;QACjC,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CACD,CAAA;AAzXY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;IAGV,WAAA,IAAA,0BAAgB,EAAC,+BAAU,CAAC,CAAA;IAM5B,WAAA,IAAA,eAAM,EAAC,2BAAY,CAAC,CAAA;qCALE,oBAAU;QACT,uCAAiB;QACV,uCAAiB;QACd,kCAAe;QACxB,mDAAuB;GAPrC,YAAY,CAyXxB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AuditActorType, AuditStatus } from '../entities/audit-event.entity';
|
|
2
|
+
export interface AuditHashPayload {
|
|
3
|
+
chainSeq: string | number;
|
|
4
|
+
action: string;
|
|
5
|
+
actorType: AuditActorType;
|
|
6
|
+
actorId: string | null;
|
|
7
|
+
resourceType: string | null;
|
|
8
|
+
resourceId: string | null;
|
|
9
|
+
status: AuditStatus;
|
|
10
|
+
metadata: Record<string, unknown> | null;
|
|
11
|
+
requestId: string | null;
|
|
12
|
+
correlationId: string | null;
|
|
13
|
+
traceId: string | null;
|
|
14
|
+
}
|
|
15
|
+
/** Deep-sort object keys so jsonb round-trips stay hash-stable. */
|
|
16
|
+
export declare function stableJsonValue(value: unknown): unknown;
|
|
17
|
+
/** Stable JSON for tamper-evident hashing (explicit key order; no wall-clock). */
|
|
18
|
+
export declare function canonicalizeAuditPayload(payload: AuditHashPayload): string;
|
|
19
|
+
export declare function computeAuditEventHash(prevHash: string | null, payload: AuditHashPayload): string;
|
|
20
|
+
//# sourceMappingURL=audit-hash.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-hash.util.d.ts","sourceRoot":"","sources":["../../../../src/modules/audit/utils/audit-hash.util.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElF,MAAM,WAAW,gBAAgB;IAChC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,cAAc,CAAC;IAC1B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACzC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,mEAAmE;AACnE,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAavD;AAED,kFAAkF;AAClF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAc1E;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAKhG"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stableJsonValue = stableJsonValue;
|
|
4
|
+
exports.canonicalizeAuditPayload = canonicalizeAuditPayload;
|
|
5
|
+
exports.computeAuditEventHash = computeAuditEventHash;
|
|
6
|
+
const crypto_1 = require("crypto");
|
|
7
|
+
/** Deep-sort object keys so jsonb round-trips stay hash-stable. */
|
|
8
|
+
function stableJsonValue(value) {
|
|
9
|
+
if (Array.isArray(value)) {
|
|
10
|
+
return value.map(stableJsonValue);
|
|
11
|
+
}
|
|
12
|
+
if (value && typeof value === 'object') {
|
|
13
|
+
const obj = value;
|
|
14
|
+
const sorted = {};
|
|
15
|
+
for (const key of Object.keys(obj).sort()) {
|
|
16
|
+
sorted[key] = stableJsonValue(obj[key]);
|
|
17
|
+
}
|
|
18
|
+
return sorted;
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
/** Stable JSON for tamper-evident hashing (explicit key order; no wall-clock). */
|
|
23
|
+
function canonicalizeAuditPayload(payload) {
|
|
24
|
+
return JSON.stringify({
|
|
25
|
+
chainSeq: String(payload.chainSeq),
|
|
26
|
+
action: payload.action,
|
|
27
|
+
actorType: payload.actorType,
|
|
28
|
+
actorId: payload.actorId,
|
|
29
|
+
resourceType: payload.resourceType,
|
|
30
|
+
resourceId: payload.resourceId,
|
|
31
|
+
status: payload.status,
|
|
32
|
+
metadata: stableJsonValue(payload.metadata),
|
|
33
|
+
requestId: payload.requestId,
|
|
34
|
+
correlationId: payload.correlationId,
|
|
35
|
+
traceId: payload.traceId,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function computeAuditEventHash(prevHash, payload) {
|
|
39
|
+
const body = canonicalizeAuditPayload(payload);
|
|
40
|
+
return (0, crypto_1.createHash)('sha256')
|
|
41
|
+
.update(`${prevHash ?? 'GENESIS'}\n${body}`)
|
|
42
|
+
.digest('hex');
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=audit-hash.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-hash.util.js","sourceRoot":"","sources":["../../../../src/modules/audit/utils/audit-hash.util.ts"],"names":[],"mappings":";;AAmBA,0CAaC;AAGD,4DAcC;AAED,sDAKC;AAxDD,mCAAoC;AAkBpC,mEAAmE;AACnE,SAAgB,eAAe,CAAC,KAAc;IAC7C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACnC,CAAC;IACD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,MAAM,GAAG,GAAG,KAAgC,CAAC;QAC7C,MAAM,MAAM,GAA4B,EAAE,CAAC;QAC3C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;YAC3C,MAAM,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAED,kFAAkF;AAClF,SAAgB,wBAAwB,CAAC,OAAyB;IACjE,OAAO,IAAI,CAAC,SAAS,CAAC;QACrB,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;QAClC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,QAAQ,EAAE,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC;QAC3C,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,OAAO,EAAE,OAAO,CAAC,OAAO;KACxB,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,qBAAqB,CAAC,QAAuB,EAAE,OAAyB;IACvF,MAAM,IAAI,GAAG,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAC/C,OAAO,IAAA,mBAAU,EAAC,QAAQ,CAAC;SACzB,MAAM,CAAC,GAAG,QAAQ,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;SAC3C,MAAM,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-core.module.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/auth-core/auth-core.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth-core.module.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/auth-core/auth-core.module.ts"],"names":[],"mappings":"AAcA,qBAyBa,cAAc;CAAG"}
|
|
@@ -11,6 +11,13 @@ const common_1 = require("@nestjs/common");
|
|
|
11
11
|
const config_1 = require("@nestjs/config");
|
|
12
12
|
const jwt_1 = require("@nestjs/jwt");
|
|
13
13
|
const passport_1 = require("@nestjs/passport");
|
|
14
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
15
|
+
const revoked_refresh_family_entity_1 = require("../../sessions/entities/revoked-refresh-family.entity");
|
|
16
|
+
const user_entity_1 = require("../../users/entities/user.entity");
|
|
17
|
+
const dpop_service_1 = require("../services/dpop.service");
|
|
18
|
+
const access_token_validator_1 = require("./services/access-token.validator");
|
|
19
|
+
const family_denylist_reader_1 = require("./services/family-denylist.reader");
|
|
20
|
+
const session_epoch_reader_1 = require("./services/session-epoch.reader");
|
|
14
21
|
const jwt_strategy_1 = require("./strategies/jwt.strategy");
|
|
15
22
|
let AuthCoreModule = class AuthCoreModule {
|
|
16
23
|
};
|
|
@@ -19,22 +26,27 @@ exports.AuthCoreModule = AuthCoreModule = __decorate([
|
|
|
19
26
|
(0, common_1.Module)({
|
|
20
27
|
imports: [
|
|
21
28
|
config_1.ConfigModule,
|
|
29
|
+
typeorm_1.TypeOrmModule.forFeature([user_entity_1.User, revoked_refresh_family_entity_1.RevokedRefreshFamily]),
|
|
22
30
|
passport_1.PassportModule.register({ defaultStrategy: 'jwt' }),
|
|
23
31
|
jwt_1.JwtModule.registerAsync({
|
|
24
32
|
imports: [config_1.ConfigModule],
|
|
25
33
|
useFactory: (configService) => ({
|
|
26
|
-
// Align with app.config — no placeholder; host must use ConfigModule validate: envValidation (JWT_SECRET required).
|
|
27
34
|
secret: configService.get('app.jwt.secret', ''),
|
|
28
35
|
signOptions: {
|
|
29
|
-
// TokenService.signAsync() overrides per request via tokens.access_expires_in.
|
|
30
36
|
expiresIn: configService.get('app.jwt.expiresIn', '15m'),
|
|
31
37
|
},
|
|
32
38
|
}),
|
|
33
39
|
inject: [config_1.ConfigService],
|
|
34
40
|
}),
|
|
35
41
|
],
|
|
36
|
-
providers: [
|
|
37
|
-
|
|
42
|
+
providers: [
|
|
43
|
+
session_epoch_reader_1.SessionEpochReader,
|
|
44
|
+
family_denylist_reader_1.FamilyDenylistReader,
|
|
45
|
+
dpop_service_1.DpopService,
|
|
46
|
+
access_token_validator_1.AccessTokenValidator,
|
|
47
|
+
jwt_strategy_1.JwtStrategy,
|
|
48
|
+
],
|
|
49
|
+
exports: [jwt_1.JwtModule, passport_1.PassportModule, dpop_service_1.DpopService, access_token_validator_1.AccessTokenValidator],
|
|
38
50
|
})
|
|
39
51
|
], AuthCoreModule);
|
|
40
52
|
//# sourceMappingURL=auth-core.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-core.module.js","sourceRoot":"","sources":["../../../../src/modules/auth/auth-core/auth-core.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA6D;AAC7D,qCAAwC;AACxC,+CAAkD;
|
|
1
|
+
{"version":3,"file":"auth-core.module.js","sourceRoot":"","sources":["../../../../src/modules/auth/auth-core/auth-core.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA6D;AAC7D,qCAAwC;AACxC,+CAAkD;AAClD,6CAAgD;AAEhD,yGAA6F;AAC7F,kEAAwD;AACxD,2DAAuD;AACvD,8EAAyE;AACzE,8EAAyE;AACzE,0EAAqE;AACrE,4DAAwD;AA2BjD,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAzB1B,IAAA,eAAM,EAAC;QACP,OAAO,EAAE;YACR,qBAAY;YACZ,uBAAa,CAAC,UAAU,CAAC,CAAC,kBAAI,EAAE,oDAAoB,CAAC,CAAC;YACtD,yBAAc,CAAC,QAAQ,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;YACnD,eAAS,CAAC,aAAa,CAAC;gBACvB,OAAO,EAAE,CAAC,qBAAY,CAAC;gBACvB,UAAU,EAAE,CAAC,aAA4B,EAAE,EAAE,CAAC,CAAC;oBAC9C,MAAM,EAAE,aAAa,CAAC,GAAG,CAAS,gBAAgB,EAAE,EAAE,CAAC;oBACvD,WAAW,EAAE;wBACZ,SAAS,EAAE,aAAa,CAAC,GAAG,CAAS,mBAAmB,EAAE,KAAK,CAAU;qBACzE;iBACD,CAAC;gBACF,MAAM,EAAE,CAAC,sBAAa,CAAC;aACvB,CAAC;SACF;QACD,SAAS,EAAE;YACV,yCAAkB;YAClB,6CAAoB;YACpB,0BAAW;YACX,6CAAoB;YACpB,0BAAW;SACX;QACD,OAAO,EAAE,CAAC,eAAS,EAAE,yBAAc,EAAE,0BAAW,EAAE,6CAAoB,CAAC;KACvE,CAAC;GACW,cAAc,CAAG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Redis key prefix for per-access-token (`jti`) revocation blocklist. */
|
|
2
|
+
export declare const JWT_BLOCKLIST_PREFIX = "jwt:revoked:";
|
|
3
|
+
/**
|
|
4
|
+
* Per-user session epoch. Bumped on logout-all / password change / admin revoke
|
|
5
|
+
* so every access JWT with a lower `sev` claim is rejected immediately.
|
|
6
|
+
*/
|
|
7
|
+
export declare const USER_SESSION_EPOCH_PREFIX = "user:sessionEpoch:";
|
|
8
|
+
/**
|
|
9
|
+
* Per-family access revocation cache.
|
|
10
|
+
* Values: `1` = revoked, `0` = negative cache (not revoked; avoids DB on every request).
|
|
11
|
+
* Revoke writes `1` (overwrites); JWT strategy writes `0` with NX after a clear DB miss
|
|
12
|
+
* so a concurrent revoke cannot be clobbered by negative cache.
|
|
13
|
+
* After Redis flush both are gone → one DB check per family, then re-cached.
|
|
14
|
+
*/
|
|
15
|
+
export declare const JWT_REVOKED_FAMILY_PREFIX = "jwt:revokedFamily:";
|
|
16
|
+
/**
|
|
17
|
+
* TTL for negative family-denylist cache (`0`).
|
|
18
|
+
* Revoke always overwrites with `1`, so a longer TTL is safe and cuts DB
|
|
19
|
+
* re-checks under steady authenticated QPS.
|
|
20
|
+
*/
|
|
21
|
+
export declare const JWT_FAMILY_NEGATIVE_CACHE_TTL_SECONDS = 300;
|
|
22
|
+
//# sourceMappingURL=jwt-redis.keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt-redis.keys.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/auth-core/constants/jwt-redis.keys.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,uBAAuB,CAAC;AAE9D;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,uBAAuB,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,MAAM,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JWT_FAMILY_NEGATIVE_CACHE_TTL_SECONDS = exports.JWT_REVOKED_FAMILY_PREFIX = exports.USER_SESSION_EPOCH_PREFIX = exports.JWT_BLOCKLIST_PREFIX = void 0;
|
|
4
|
+
/** Redis key prefix for per-access-token (`jti`) revocation blocklist. */
|
|
5
|
+
exports.JWT_BLOCKLIST_PREFIX = 'jwt:revoked:';
|
|
6
|
+
/**
|
|
7
|
+
* Per-user session epoch. Bumped on logout-all / password change / admin revoke
|
|
8
|
+
* so every access JWT with a lower `sev` claim is rejected immediately.
|
|
9
|
+
*/
|
|
10
|
+
exports.USER_SESSION_EPOCH_PREFIX = 'user:sessionEpoch:';
|
|
11
|
+
/**
|
|
12
|
+
* Per-family access revocation cache.
|
|
13
|
+
* Values: `1` = revoked, `0` = negative cache (not revoked; avoids DB on every request).
|
|
14
|
+
* Revoke writes `1` (overwrites); JWT strategy writes `0` with NX after a clear DB miss
|
|
15
|
+
* so a concurrent revoke cannot be clobbered by negative cache.
|
|
16
|
+
* After Redis flush both are gone → one DB check per family, then re-cached.
|
|
17
|
+
*/
|
|
18
|
+
exports.JWT_REVOKED_FAMILY_PREFIX = 'jwt:revokedFamily:';
|
|
19
|
+
/**
|
|
20
|
+
* TTL for negative family-denylist cache (`0`).
|
|
21
|
+
* Revoke always overwrites with `1`, so a longer TTL is safe and cuts DB
|
|
22
|
+
* re-checks under steady authenticated QPS.
|
|
23
|
+
*/
|
|
24
|
+
exports.JWT_FAMILY_NEGATIVE_CACHE_TTL_SECONDS = 300;
|
|
25
|
+
//# sourceMappingURL=jwt-redis.keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt-redis.keys.js","sourceRoot":"","sources":["../../../../../src/modules/auth/auth-core/constants/jwt-redis.keys.ts"],"names":[],"mappings":";;;AAAA,0EAA0E;AAC7D,QAAA,oBAAoB,GAAG,cAAc,CAAC;AAEnD;;;GAGG;AACU,QAAA,yBAAyB,GAAG,oBAAoB,CAAC;AAE9D;;;;;;GAMG;AACU,QAAA,yBAAyB,GAAG,oBAAoB,CAAC;AAE9D;;;;GAIG;AACU,QAAA,qCAAqC,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import IORedis from 'ioredis';
|
|
2
|
+
import { RequestUser } from '../../../../common/interfaces/request-user';
|
|
3
|
+
import { JwtPayload } from '../../dto/token.dto';
|
|
4
|
+
import { type DpopAuthContext, DpopService } from '../../services/dpop.service';
|
|
5
|
+
import { FamilyDenylistReader } from './family-denylist.reader';
|
|
6
|
+
import { SessionEpochReader } from './session-epoch.reader';
|
|
7
|
+
/**
|
|
8
|
+
* Shared access-token authorization used by HTTP {@link JwtStrategy} and
|
|
9
|
+
* realtime WebSocket handshakes. Keep behavior identical across transports.
|
|
10
|
+
*/
|
|
11
|
+
export declare class AccessTokenValidator {
|
|
12
|
+
private readonly redis;
|
|
13
|
+
private readonly sessionEpochReader;
|
|
14
|
+
private readonly familyDenylistReader;
|
|
15
|
+
private readonly dpopService;
|
|
16
|
+
constructor(redis: IORedis, sessionEpochReader: SessionEpochReader, familyDenylistReader: FamilyDenylistReader, dpopService: DpopService);
|
|
17
|
+
validate(payload: JwtPayload, dpopCtx: DpopAuthContext): Promise<RequestUser>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=access-token.validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access-token.validator.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/auth-core/services/access-token.validator.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,eAAe,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAOhF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D;;;GAGG;AACH,qBACa,oBAAoB;IAG/B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAHX,KAAK,EAAE,OAAO,EACd,kBAAkB,EAAE,kBAAkB,EACtC,oBAAoB,EAAE,oBAAoB,EAC1C,WAAW,EAAE,WAAW;IAGpC,QAAQ,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;CAsEnF"}
|