5 ms·
Authentication sidecar – a new experience in microservice architecture
- echelon 5y agoThis is an approach we're starting to use. Sidecars instead of libraries. Instead of writing a bespoke integration per language, now you just have one and you talk to it over a socket. It's pretty clever. Auth, metrics ingestion, log ingestion, traffic mesh... It's easier to update in most cases too. Just redeploy the sidecar. No asking teams to update their deployed app libraries (if in polyrepos) or builds (if in a monorepo)
- gavinray 5y agoI'm not sure I understand the distinction between when something is considered a "service" and when something is considered a "sidecar" (also not my area of expertise) Both things = An application running code in a container right? Or what is the difference
- echelon 5y agoIn Kubernetes, you run sidecars in the same pod as a separate process. Sidecars are lightweight processes that the main app can typically communicate with over localhost, a shared file system socket, etc. A service, on the other hand, would live elsewhere, perhaps in another cluster, and scale independently. Foreign services would also have their own sidecars. Sidecars are 1:1 with application instances.
- gavinray 5y agoAh that is a pretty neat idea -- I can absolutely see how useful that would be. TIL, thanks!
- nmehner 5y agoTwo questions: * From a security point of view: With the sidecar approach a simple port misconfiguration can remove the authentication. Is this a good idea? * The egress container cannot propagate the original token used while calling the API. So the authentication is at this point only an authentication of the first backend service being allowed to call the second backend service (with a new token). This makes authorization checks for the original caller (or any operation relying on the data from the token) in the second service impossible. Or am I missing something?