Enable interop HTTP based authentication and resolve technical debt
johanstokking opened this issue · 1 comments
johanstokking commented
Summary
Enable HTTP-based authentication for interop. Whenever we touch this, we should also resolve technical debt.
References #717
References #2627
Why do we need this?
To support Backend Interfaces clients that do not use TLS client authentication, but that we allow authenticators that use an API key or token.
What is already there? What do you see now?
Currently, pkg/interop
's server only supports TLS client authentication.
The aforementioned package is also built around Echo.
What is missing? What do you want to see?
TLS client authentication should become optional and we should support dynamic authentication mechanisms. One authentication mechanism could be checking an API key against a configured value or validating a token.
Use the more generic HTTP middleware instead of Echo.
How do you propose to implement this?
- Add non-TLS endpoint for interop
- On the TLS endpoint, do not require a TLS client certificate
- Replace Echo middleware by generic HTTP middleware
- Add a dynamic authenticator mechanism that sets
pkg/auth
info on the request context - Turn Join Server's authorizer based on X.509 Distinguished Name in an authenticator that checks the authenticated name in a more generic way, as it may also come from a token or API key
How do you propose to test this?
CI
Can you do this yourself and submit a Pull Request?
Yes
johanstokking commented
Blocking #4678