Skip to content

feat(secrets): Implement global secret value size limit#107

Merged
allisson merged 1 commit intomainfrom
secret-value-limit
Mar 5, 2026
Merged

feat(secrets): Implement global secret value size limit#107
allisson merged 1 commit intomainfrom
secret-value-limit

Conversation

@allisson
Copy link
Owner

@allisson allisson commented Mar 5, 2026

This change introduces a configurable global limit on the size of secret values stored in the system. This prevents potential denial-of-service (DoS) attacks and ensures predictable storage and memory usage.

Key changes:

  • Added SecretValueSizeLimitBytes to config.Config with a default of 512KB.
  • Implemented size validation in SecretUseCase.CreateOrUpdate before encryption.
  • Introduced ErrTooLarge standard error and ErrSecretValueTooLarge domain error.
  • Mapped ErrTooLarge to HTTP 413 Payload Too Large in the global error handler.
  • Updated DI container to inject the size limit into the secrets use case.
  • Comprehensive unit and integration test updates to verify the limit and HTTP status.
  • Updated documentation including configuration.md, .env.example, and OpenAPI spec.

Track: Add Secret Value Size Limit (Archived)

This change introduces a configurable global limit on the size of secret
values stored in the system. This prevents potential denial-of-service
(DoS) attacks and ensures predictable storage and memory usage.

Key changes:
- Added SecretValueSizeLimitBytes to config.Config with a default of 512KB.
- Implemented size validation in SecretUseCase.CreateOrUpdate before encryption.
- Introduced ErrTooLarge standard error and ErrSecretValueTooLarge domain error.
- Mapped ErrTooLarge to HTTP 413 Payload Too Large in the global error handler.
- Updated DI container to inject the size limit into the secrets use case.
- Comprehensive unit and integration test updates to verify the limit and HTTP status.
- Updated documentation including configuration.md, .env.example, and OpenAPI spec.

Track: Add Secret Value Size Limit (Archived)
@allisson allisson merged commit c113137 into main Mar 5, 2026
3 checks passed
@allisson allisson deleted the secret-value-limit branch March 5, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant