All Downloads are FREE. Search and download functionalities are using the official Maven repository.

convex.trust.whitelist.cvx Maven / Gradle / Ivy

The newest version!
'convex.trust.whitelist

;; An Minimal scoped actor implementing immutable small whitelists
;; - Scopes are whitelists: sets of addresses considered safe
;; - Because all state is stored in the scope, this actor is super simple!
;;
;; Intention is that whitelist trust monitors can be sepcified simply as follows:
;;
;;   (import convex.trust.whitelist :as allow)
;;   (set-controller [allow #{#234 #256 #777}])

(import convex.trust :as trust)

(defn check-trusted?
  ^:callable
	[subject action object]
  (or (set? *scope*) (fail :ARGUMENT "Scope must be a set"))
  (contains-key? *scope* subject))




© 2015 - 2024 Weber Informatics LLC | Privacy Policy