You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #56985 [FrameworkBundle] Derivate kernel.secret from the decryption secret when its env var is not defined (nicolas-grekas)
This PR was merged into the 7.2 branch.
Discussion
----------
[FrameworkBundle] Derivate `kernel.secret` from the decryption secret when its env var is not defined
| Q | A
| ------------- | ---
| Branch? | 7.2
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Issues | #38021
| License | MIT
I'm pursuing the goal of making `APP_SECRET` empty in the default recipe. See symfony/recipes#1314 for background.
At the moment, `kernel.secret` is used for remember-be, login-links and ESI. This means that when you start a project, you don't need it. But once you do enable those features, you'll get an "APP_SECRET env var not found" error message.
I think we can live with this error and the related DX. We need good doc of course.
Still, in order to make DX a bit smoother, I propose to derivate APP_SECRET from SYMFONY_DECRYPTION_SECRET when it's set.
This is what this PR does.
Of course, we should also document that creating a separate `APP_SECRET` is likely a good idea.
FTR, here is how one can trivially generate a value for APP_SECRET and put it in the vault, thus fixing #38021:
```sh
symfony console secrets:set APP_SECRET --random
```
Commits
-------
4749871a29 [FrameworkBundle] Derivate kernel.secret from the decryption secret when its env var is not defined
0 commit comments