Medieval ecclesiastical office responsible for the administration of a particular area or territory within a castle, often involving the management of documents and records.