geal
There's definitelt some cool use cases we could collaborate on. One thing I'm looking at more deeply right now is tokens carrying the necessary data as they go through the system,to make sure one call does not see some of it rights change dynamically when going from service to service
> Given a long-term token, can I create short-term, auto-expiring tokens?
yes, with attenuation: https://doc.biscuitsec.org/recipes/common-patterns#expiratio...
> Is there some revocation mechanism?
In a token, each block has a revocation id, so if you revoke a token, all the tokens derived from that one will be revoked as well. As for how to handle those revocation ids, it's the same strategies as in other systems, reintroducing some state to check revocation lists: https://www.biscuitsec.org/docs/guides/revocation/
> How do these things line up against JWT or OAuth? When should I prefer this, but also when should I NOT prefer this?
JWT has a lot of footguns, especially in the way it handles the list of algorithms, and libraries tend to all go through the same set of mistakes (a lot of them are stable now though). JWT are good to transmit a small amount of data, and are overall well supported. JWTs do not enforce any authorization system, you have to add one yourself. Biscuit is very strict in how it deserializes and verifies tokens, so it avoids the usual JWT issues (partly by its spec, partly by an extensive test suite). Biscuits can be larger than JWTs, and can take longer to verify (one signature verification per block). Biscuit comes with its own authorization, based on a logic language, that can be both carried by the token and provided by the verifier. It has implementations in a lot of languages but is not as widely supported as JWT yet.
I'd say if you can live with JWTs containing a little data (like a sub to look up in DB) and a simple authz system like a RBAC, keep using it, that will work well. But if you can benefit from attenuation (ex: per request attenuation https://doc.biscuitsec.org/recipes/per-request-attenuation and delegation https://www.biscuitsec.org/docs/guides/microservices/ ), then look into Biscuit, it can help
If you go towards flexibility, you get more complexity and possibly unexpected results. And they become hard to audit and explain.
You can choose simple, single purpose systems, like a RBAC only authz backed by a SQL database. You write tight, easy to understand policies. But systems always grow beyond the bounds of those rules, and you end up with a lot of ad hoc rules, or role explosion.
Datalog was a good tradeoff for Biscuit (https://www.biscuitsec.org): powerful enough to cover a lot of use cases, simple enough to be implemented the same way in multiple languages
Use Datalog to write your authorization rules
Biscuit: Pubkey signed token with offline attenuation and Datalog authz policies
Nom 5: fast Rust parser combinators, now without macros
Why you should, actually, rewrite it in Rust
Type-safety and lack of garbage collection are essential properties, could you tell me why you don't think that's the case?
Giving the reason for our language choice felt useful. Otherwise, it would have really looked like Rust developers steamrolling into projects :)
Async, Futures, AMQP, pick three
Security is a process, not a reaction
Nom, the fast Rust parser combinators library, just reached 1.0
Crypto problems you actually need to solve
Crypto problems you actually need to solve
Comparing akka-stream and scalaz-stream
PeaCoq, a UI for Coq
More seriously, the performance improvement here is really significant