user1383359
user1383359

Reputation: 2753

Clojure Security: Information Flow + Capability System

Summary

Is there something like http://en.wikipedia.org/wiki/E_programming_language as a DSL inside of Clojure?

Background

I'm aware of:

Context

I'm a big fan of both capability systems and information flow. And I'm wondering if anyone has developed Clojure DSLs for these two techniques. The following would be ideal:

Question

So the question is -- is this something easy to do as a Clojure DSL? Where each object has some capability tag, and we can execute pieces of function/code under certain tags, and the runtime system makes sure that no one gets access to things they're not supposed to access.

Thanks!

Upvotes: 1

Views: 181

Answers (1)

Arthur Ulfeldt
Arthur Ulfeldt

Reputation: 91577

you can do this with metadata and preconditions and then create macros to add a DSL/syntax to it, though I would recommend skipping the macros and going for just preconditions and metadata.

  • Each object would have a piece of metadata with a list of it's capabilities.
  • Each function would have a precondition that checked the metadata.

Upvotes: 2

Related Questions