-
Notifications
You must be signed in to change notification settings - Fork 16
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
Beholder CSA Authentication #877
Conversation
f6a504c
to
e6e43bc
Compare
65a2d33
to
67152b5
Compare
pkg/beholder/auth.go
Outdated
// where the byte value of <public_key_hex> is what's being signed | ||
func BuildAuthHeaders(signer func([]byte) []byte, pubKey []byte) map[string]string { | ||
messageBytes := pubKey | ||
signature := signer(messageBytes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/nit but do we need to support multiple signing functions? Can we lock the functionality down in this module to save consumers from possibly duplicating/using invalid signing methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, I think realistically we'll just be supporting ed25519 unless something takes the place of CSA keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed here 88df7ab
…r-csa-signer-auth_2
What
Notes
Design Context
Challenges
Two main challenges were in mind when arriving at an authentication mechanism for Beholder:
Why no mTLS
mTLS can secure the connection between the sidecar collector and the gateway, while also providing identity and authentication
This was decided against as we wouldn't be able to lean on an existing system. While CSA keys do power mTLS today in WSRPC, they're being used in a non-standard way with the certificates being generated in-memory. To use these certificates in the sidecar collector would require writing them to disk (a new security consideration).
Furthermore, mTLS is one of the reasons WSRPC is being deprecated. Since it needs to be what terminates TLS, we're not able to use L7 load balancers with more advanced security features. Using mTLS in the Gateway would put us in a similar position. It's feasible this could be made to work with a load balancer that supports mTLS, but this wasn't greatly explored
Why auth header
Headers can be passed through from the Chainlink node, to the sidecar collector, and up to the Gateway. We can also leverage the existing CSA keys as a means of identifying nodes. Thus, using a header for authentication seemed like the path of least resistance.