Comments (7)
Hi, paper author here (I'm not affiliated with this github project).
There are some very good introductions to macaroons online, e.g.: https://evancordell.com/2015/09/27/macaroons-101-contextual-confinement.html
The construction is deliberately simple, and we don't claim any novel crypto fanciness (and that's the point). Rather, adapting the general framework for bearer-tokens brings several benefits. In particular, we see the easy contextual confinement as a huge step towards limiting the power of bearer tokens, and third-party caveats allow for distributing an authorization decision. The attenuated delegation falls out as a nice extra bonus.
from libmacaroons.
Read through the README for a documentation of how the code can be applied.
Read the Google paper for the theory and proof of why it works: http://research.google.com/pubs/pub41892.html
from libmacaroons.
I did read the readme. My question is not how to use the code (which is answered in the readme) my question is how do macaroons work.
fobbing someone off to read the 16 page paper does not make your project accessable.
for any other curious readers, here is the relavant section:
Fundamental to macaroons is how this chain of keyed
HMAC values is constructed, in a nested fashion, along the
sequence of messages in a macaroon—of which, all but the
first are caveats. The first message in a macaroon is required
to be a public, opaque key identifier that maps to a secret root key known only to the target service. (Such key identifiers
can be implemented, e.g., using random nonces, indices into a
database at the target service, keyed HMACs, or using public-
key or secret-key encryption; see [37, Sections 4.2 and 4.3]
for a discussion.) Starting with this root key, a macaroon’s
chain of HMAC values is derived by computing, for each
message, a keyed HMAC value, nested so that each such value
itself is used as the HMAC key for the next message. Thus, a
macaroon with two messages MsgId and MsgCav and root key KR could have the signature HMAC(K_tmp;MsgCav), where K_tmp is HMAC(KR;MsgId).
so yes, it's just a chain of hmacs, where each caveat added uses the previous macaroon's signature as the key.
from libmacaroons.
Citing the paper is not "fobbing" you off. How to use the code is addressed in the README, and that gives you an idea of the applications you can use it for. You don't need to know the implementation to understand and use the abstraction.
If knowing how it works is important, the paper is the best place to start learning about macaroons. The paper itself is quite accessible and addresses how they work. When you read the paper, you'll see that the construction is more than just a chain of HMACs because the idea of third-party macaroons is central to the idea, and is not described by a "chain of HMACs."
Simplifying how something works to the point where you lose the key idea is dangerous, and I would recommend against it.
from libmacaroons.
Making a short response and then closing the issue without taking the time to understand what is being asked, does feel like being "fobbed off". I agree it's possible to use something without understanding exactly how it works, but to evaluate whether something is worth using (or recommending etc) then it's necessary to have some understanding of how it achieves the properties it claims. Especially, since this is a security context. I ended up here because someone asked me what I thought of macaroons, and I read the readme, but was put off by phrases alluding to "crypto goodness" without actually explaining what that is.
It's great there is a paper, but it's a significant effort to read a whole paper when I'm pretty sure the core of the idea could be explained in a few paragraphs. A paper is full detail, what is missing is something in between.
I was able to guess that it involved hmacing each caveat, which strongly suggests that it could be explained fairly simply. (maybe adding detail about the difference between a first and third party caveat, which I am unsure of right now - are these different, or is it just who creates them? is the first party the user and the third the delegate?)
from libmacaroons.
Here's a video from the author of the paper: https://air.mozilla.org/macaroons-cookies-with-contextual-caveats-for-decentralized-authorization-in-the-cloud/
from libmacaroons.
hi @arnar,
I am trying to figure out if the following functionality is possible:
- a Token Server generates a macaroon for a new user (UserRootMacaroon) with some predefined caveats.
- the user issues their own macaroons based on this UserRootMacaroon
from libmacaroons.
Related Issues (20)
- Seemingly contradictory readme HOT 2
- Cant Build from source HOT 1
- macaroon_deserialize_json is not declared in macaroons.h HOT 2
- serialization produces invalid base64 HOT 4
- macaroon_hash2 has unexpected implementation HOT 3
- pyx function signature error HOT 1
- Leftovers in Go Bindings HOT 1
- Building libmacaroons on OS X HOT 3
- Cookies are different from session IDs HOT 4
- No installation documentation + Linux installation problems HOT 6
- syntax error in VERSION script HOT 2
- third party caveats produce invalid JSON when serialized HOT 1
- python bindings: produce better error when format not recognized HOT 1
- first party caveats are not always checked by verifier HOT 4
- version 1 JSON serialization not supported
- Version 0.4.0 roadmap? HOT 2
- Add pip installation instructions to the README
- Potential undersized buffer
- pkg-config is required HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libmacaroons.