Skip to content
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

object capability discipline audit (WIP, FYI) #71

Closed
wants to merge 5 commits into from

Conversation

Projects
None yet
2 participants
@dckc
Copy link

dckc commented Nov 26, 2016

Implicit access to stuff like files and the clock makes unit testing awkward and hinders security auditing.

The lint stuff goes beyond stable so it would have to go in the long term, once I/we refactor for explicit access.

But I got far enough tonight that I thought I'd share my work in progress.

dckc added some commits Nov 26, 2016

pass argv explicitly to Docopt
   - factor ocap_main() out of main()
banner() fails ocap safety lint
  - tag std::io::_print as ocap-unsafe
    following tests/compile-fail/extern.rs example from
    tag_safe 59397d1
@bluejekyll

This comment has been minimized.

Copy link
Owner

bluejekyll commented Nov 26, 2016

Thanks for the PR!

Do you think you could explain what your intending to do with these changes? I'm unfamiliar with some of this.

@dckc

This comment has been minimized.

Copy link
Author

dckc commented Nov 26, 2016

The first commit replaces "ambient" access to the command line args with explicit access. One benefit is that we can substitute the args with our own for testing. Likewise the clock: if some random bit of code deep in the call stack can just reach out and access the clock without explicitly being given access, we can't make unit tests that provide a simulated clock.

It also lets us enforce the principle of least power. I'll have to think about how to explain succinctly.

Meanwhile, perhaps one of the talks in https://github.com/dckc/awesome-ocap#presentations-talks-slides-and-videos is worth your time? Flipping through the "Bringing Object-orientation to Security Programming" slides takes just a few minutes.

@bluejekyll

This comment has been minimized.

Copy link
Owner

bluejekyll commented Nov 27, 2016

Ah, ok. In terms of unit tests, this will definitely be handy, and it sounds like for this type of verification you will probably need it. As an FYI, pretty much anywhere I use current time, I try to make sure that that code path is easily unit-testable. But this will be cool. I'm excited to see what you come up with!

Also, can I suggest putting the txt files into server/ocap/...

And add a README.md in there would be awesome too with just a simple amount of information, or even just a reference back to the material you posted here? I think that would keep the that path a little cleaner.

@bluejekyll bluejekyll added the trust label Sep 14, 2017

@bluejekyll

This comment has been minimized.

Copy link
Owner

bluejekyll commented Oct 21, 2018

I'm going to close this, as it's been open for a long time. I am still interested in it if you ever pick it back up @dckc

@bluejekyll bluejekyll closed this Oct 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.