PLD: set open and secure based on require auth with tests, closes #866