The spell
What Arcane Lock does
You touch a closed door, window, gate, chest, or other closable object. The spell imbues it with an arcane lock spell that only you, and anyone you allow, can open. You and the target of this spell must agree on a password at the time the spell is cast. You can change the password by casting the spell again on the object if you are within 1 foot of it.
Otherwise, a creature that doesn't know the password expends 20 minutes trying to open the locked object. A successful dispel magic spell ends the spell, but it must be cast as an action. You can also set a condition that will cause the spell to end, such as "the spell ends when the arrow of time is reversed" or "no one can open the object if it rains outside." Creatures can sense that the object is magically locked.
