-
I would like to have hash cost to be configurable by environment variable, e.g.: parameters:
env(HASH_COST): 12
hash_cost: "%env(int:HASH_COST)%"
security:
password_hashers:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
algorithm: 'argon2id'
cost: "%hash_cost%" When calling: The value 0 is too small for path "security.password_hashers.Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface.cost". Should be greater than or equal to 4 I have read issues:
According to the comment in last issue (45868): #45868 (comment), do I understand correctly that what I want to achieve is impossible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It depends for which settings. Some of the settings are validated during the configuration processing, and so knowing the value is necessary (while env placeholders are precisely about not knowing the value during the container compilation). the encoder cost is one of the settings that has strict validation, and so is incompatible with env placeholders. |
Beta Was this translation helpful? Give feedback.
It depends for which settings. Some of the settings are validated during the configuration processing, and so knowing the value is necessary (while env placeholders are precisely about not knowing the value during the container compilation).
the encoder cost is one of the settings that has strict validation, and so is incompatible with env placeholders.