HawkAuth protocol is widely adopted by Firefox Accounts and appears in Postman in a very short list of supported API authentication methods which indicates HawkAuth is vastly more popular than you might first expect.
HawkAuth protocol history
The origins of HawkAuth appears to be with Eren Hammer then shortly sponsored by hapijs before being completely acquired by Mozilla in "maintenance mode" and renamed to just "hawk", which we will learn here that removing the "auth" from the name serendipitously accurate, as you only get Authentication optionally.
There are many client and server side implementations that are disparate in their interpretations of the API.
Where is HawkAuth utilised?
There are several libraries that are available for projects to consume and implement Hawk Authentication:
- mozilla/fxa (typescript)
- JoyMoe/HawkAuthentication (dotnet core)
- nathansgreen/hawkk (Kotlin)
- Postman v3.2 is out with Hawk authentication support
- hiyosi/hawk (Go)
- https://docs.rs/hawk/1.0.5/hawk/ (Rust)
What exactly is HTTP Holder-Of-Key Authentication?
Simply put; If you have an API (server) that you want to ensure the requester (client) is whom they claim to be and the request you received (payload) is not modified from what was sent (integrity), then you can pre-share a secret with the client to 'sign' the request which proves they have the secret without them exposing it or giving it back to you and you can only get this proof if the server verifies the request using the secret and payload too.
The literal definition of Authentication
Hawk does not do the server verification by default, therefore Hawk may never actually do any Authentication at all unless you very explicitly and far too onerously tell it too do the verification on purpose.
This is Hawk
Are there any fixes?
Watch this space
How does this effect Firefox Accounts?
FXA is where Authentication is handled for Firefox Accounts, the following list are the public endpoints that are easily observable by just running Firefox and observing where the Authentication is included:
There is also the FXA server side that has patched the risk by changing from default to the payload verification that will do the HTTP Holder-Of-Key Authentication (which is the one and only expected function of Hawk).
Finally, the FXA Payments Server is at risk and Mozilla claim it is "a significant vulnerability" but they ignored my significant updates for 6 months. Complete silence. Now 9 months with no input from Mozilla.
I refuse to publish the proof-of-concept, any specifics about how an attack can work, or be specific about the flaw. I only discuss there is a disputed vulnerability, sharing only public information.
If Mozilla read this, please contact me using Bugzilla 1719614