How to password protect staging environment?

I turn on login required on the staging site. You can do it with an environment variable in the app.yml so that it’s persistent.