The Proxy of the Sealed Vault
Controlling access to a powerful artifact via verification conditions.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Proxy
ARCANUM SCHOOL: Abjuration // Sealing
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
module Proxy
type secret_knowledge = string
let read_grimoire (is_archmage: bool{is_archmage = true}) : secret_knowledge =
"Forbidden Secrets of the Void"
let proxy_read (user_level: int) : option secret_knowledge =
if user_level > 9000 then Some (read_grimoire true)
else None
A Proxy that leverages F*’s dependent types to ensure that only a certified Archmage can invoke the function to read the forbidden grimoire.
Runic Tags:
#proxy
#access-control
#vaults