Lurker News
We have the monthly "Who is hiring?" and "Freelancer? Seeking freelancer?" threads. But what about people who don't want to work for money and are not looking for people who want to work for money but still want to work together on cool projects?

For free to make the world better or to start a startup.
If you do, please post your project or your skills!

Comments (506) 164 threads

Show all comments

Showing thread 100 of 164

mikewarot1 reply#
I want to demonstrate the advantages of capability based security in actual examples that people can use. I'd like to have one as my daily driver.

I'm willing to commit to reading and constructively commenting on projects in this thread.

continuational1 reply#
Maybe we should talk! I'm working on a language with first class capabilities.

Here's an example from the main function of the self hosting Firefly compiler [1]:

    main(system: System): Unit {
        ...
        let fs = system.files()
        if(fs.exists(tempPath)) { deleteDirectory(fs, tempPath) }
        ...
    }

    deleteDirectory(fs: FileSystem, outputFile: String): Unit {
        fs.list(outputFile).each { file =>
            if(fs.isDirectory(file)) {
                deleteDirectory(fs, file)
            } else {
                fs.delete(file)
            }
        }
        fs.delete(outputFile)
    }
Main is passed `System`, which is a value with methods to access the network, the file system, etc. It passes on the `FileSystem` value to `deleteDirectory`, which only has methods to access the file system. Since there's no other way for `deleteDirectory` to obtain capabilities than to recieve them as arguments, `deleteDirectory` only has access to the file system.

[1] https://github.com/Ahnfelt/firefly-boot/tree/master/compiler

mikewarot1 reply#
How would you pass the capability off to an external program? I'm hopeful that if the user could us a powerbox outside of a programs control to select the token/capability/file handle to pass to a program, then the system would be immune to the problems of ambient authority.
continuational1 reply#
System wide capabilities is an interesting concept - I'd love to see it implemented. I'm not sure if it meaningfully fits into a programming language though - it seems like an operating system concept. But I might be mistaken?

Firefly currently only uses capabilities for security within a single program, which I think is also a big issue in software development today, the Log4j fiasco being a recent example.

mikewarot1 reply#
Since you're in the mindset of capabilities, what do you think is a reasonable way to pipe them through the internet, or between cooperating programs on a given machine?
continuational1 reply#
Well, the main challenge is that you can take a capability and limit it before passing it on. For example, take the FileSystem capability and wrap it in a new object that only allows access to a specific directory.

Otherwise, you could probably use OAuth!
Now, Firefly makes it possible to limit capabilities with arbitrary code. But suppose you instead had a declarative format for limiting capabilities.
Then you could probably represent capabilities like this:

    {
        "system": "FileSystem",
        "publicKey": "...",
        "parent": "...",
        "limitation": {
            "path": "/foo/bar"
        }
    }
The publicKey is the public key of the system in question. The system should probably be a URI.

The parent is the capability that was limited, encrypted with the public key, so that only the system in question can decrypt it. This allows the system to verify the capability, while not leaking the parent capability to anybody else.
The limitation is a system-specific declarative limitation, and must be at least as strict as the parent capability.
How does that sound?

Continue this thread — 1 reply