Browse Source

fix(config): bind api key length to SECURITY_API_KEY_VALUE_BYTES_SIZE

security.api_key.value_bytes_size referenced SECURITY_API_KEY_VALUE_PREFIX,
the same variable as value_prefix. SECURITY_API_KEY_VALUE_BYTES_SIZE had no
effect, and setting a custom prefix made value_bytes_size resolve to a
non-numeric value, which fails int conversion of the @Value injection in
ApiKeyServiceImpl and breaks application startup.
pull/16361/head
Dmytro Artamonov 2 months ago
parent
commit
d2a20dbf46
  1. 2
      application/src/main/resources/thingsboard.yml

2
application/src/main/resources/thingsboard.yml

@ -173,7 +173,7 @@ security:
# Prefix for the auto-generated API key. For example, tb_Ood4dQMxWvMH-76z3E_Cv0mZaBWT0Clk3hRSO0P_jNQ
value_prefix: "${SECURITY_API_KEY_VALUE_PREFIX:tb_}"
# Length of the auto-generated API key. Max is 255
value_bytes_size: "${SECURITY_API_KEY_VALUE_PREFIX:64}"
value_bytes_size: "${SECURITY_API_KEY_VALUE_BYTES_SIZE:64}"
# Enable/disable case-sensitive username login
user_login_case_sensitive: "${SECURITY_USER_LOGIN_CASE_SENSITIVE:true}"
claim:

Loading…
Cancel
Save