Motivation
Several constants are currently hard-coded:
| Constant |
Location |
Value |
TOKEN_TTL_HOURS |
AddKeyToVerificationQueueCommandHandler |
24 h |
MAX_EMAIL_UIDS |
same |
20 |
MAX_SUBKEYS |
(proposed in #136) |
50 |
| Max keytext size |
(proposed in #135) |
128 KB |
These should be read from MicroProfile Config so operators can tune them per deployment without recompiling.
Implementation
Add @ConfigProperty injection in the handler(s):
@Inject
@ConfigProperty(name = "keyserver.verification.token-ttl-hours", defaultValue = "24")
int tokenTtlHours;
Provide default values matching the current hard-coded values so behaviour is unchanged out of the box.
Document the properties in docs/ or a src/main/liberty/config/ README.
Motivation
Several constants are currently hard-coded:
TOKEN_TTL_HOURSAddKeyToVerificationQueueCommandHandlerMAX_EMAIL_UIDSMAX_SUBKEYSThese should be read from MicroProfile Config so operators can tune them per deployment without recompiling.
Implementation
Add
@ConfigPropertyinjection in the handler(s):Provide default values matching the current hard-coded values so behaviour is unchanged out of the box.
Document the properties in
docs/or asrc/main/liberty/config/README.