I have a staging and a production server and staging acts as both a final test of my code as well as a back up of data (production gets synced down to staging so content is aligned before a new feature or code change is pushed to staging). The problem is staging is publicly accessible so I want to make it so that if you hit the staging server you MUST be loged into the CMS to see the pages BUT I don’t want that to be the case on production.
Is this possible to do either in a stock v17 or with a pugin?
Yes, this is possible with v17, no package needed.
Umbraco has front-end basic authentication built in and it validates against backoffice user credentials, which is exactly what you want. It’s an app setting: