-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify the protocol #1
Comments
What options do we have for protocols? I see that you already added something that looks like protocol specifications at the beginning of cappy.py, is that what this is about? |
Note that "object", "reference", and "capability" all sort of mean the same thing. Suppose we're running a service for renting digital items from a store. I am the server and you are a client. When you log in, I send you a reference to the store. On this store reference you can call certain methods such as We'd essentially want to send something like a "class name" answering the question "what kind of object is this?" and then whatever data is needed to describe a particular instance of the object. For example, if there's a banana for rent, I might respond to your
That message could be encoded in any number of ways. JSON is probably a good place to start since it's simple and well supported. In your code you might have a look-up table in which the string A more complex feature would be if references can be passed as arguments to remote calls on other references. For example, the store might have |
Did you google for the average weight of a banana? Because you got the average weight of a banana perfectly right. |
Guilty as charged.
That's exactly right. One of the nice things about OCM is that security is easier to reason about. For example, even if you guess a capability's id I can look my table and see whether or not I ever gave you a reference to that capability; even if you successfully guess an id I gave to someone else, I automatically ignore your attempts to invoke methods on that capability. Now, of course, security is never free. What does it even mean to talk about giving a capability to you versus someone else? In every implementation I've seen so far (which is only two), users are defined by their (TCP) connection. I don't know the security concerns with that: is it possible/hard to spoof someone else's connection? Still, that aside, the mere fact that I don't have to manually juggle access permissions is a huge win in my opinion. |
Instantly in love with OCM, it just seems like such a well-thought and functional way to control permissions. When you say users are defined by their TCP connection you mean as in their IP address? If so, than we could add some security by storing MAC/IP pairs. |
I confess ignorance. A piece of code that "opens a TCP socket" manages ports, IP address, etc. in ways that I do not pretend to understand (yet). I imagine that once one has established a secure connection using TLS (previously known as SSL) then this problem makes more sense. I think it's not worth worrying about this until we have established a messaging protocol and written a prototype. I started drafting the messaging protocol last night. Hopefully will have something worth discussing soon. |
This should probably happen before much more code is written.
The text was updated successfully, but these errors were encountered: