liveBook · Manning

Identity propagation

As explained in Software Security for Developers

The user identity propagation problem is the difficulty of passing the initiating user's identity across services that use different programming languages and communication protocols.

Identity propagation passes the initiating user’s identity through a chain of services, even when those services use different programming languages and communication protocols. The user identity differs from service identity: one identifies who started the request, while the other identifies each service acting on that user’s behalf. section 3.1.1 section 3.4

A mixed-protocol call chain

An edge service determines the user’s identity through OIDC or WebAuthn, then passes it over HTTP to a C# service. That service forwards it over gRPC to Go, which continues over AMQP to JavaScript. Each boundary must preserve the identity across different protocols and languages. section 3.1.1

A practical design starts with these constraints:

  • Use system-specific patterns and conventions because no industry-standard solution propagates user identity across service calls. section 3.4
  • Keep user identity separate from service authentication, which can use API keys or mutual TLS. section 3.5
Figure 3.4 The edge service uses OpenID Connect (OIDC) or WebAuthn protocols to determine the identity of the user making the request. It must then propagate the user identity over HTTP to the service written in C#, which must propagate the user identity over gRPC to the service written in Go, which must propagate the user identity over the Advanced Message Queuing Protocol (AMQP) to the service written in JavaScript.
figure

Follow the identity as it crosses the edge, HTTP, gRPC, and AMQP boundaries. section 3.1.1

How Software Security for Developers covers it

How deep it goes
Defines the problem and distinguishes user from service identity, but defers implementation to patterns and conventions.
Examples
Uses an edge-to-service chain crossing HTTP, gRPC, and AMQP between C#, Go, and JavaScript services.
What it assumes
Assumes service-to-service communication and introduces the need for cryptography, TLS, OAuth 2, OIDC, and related technologies.
What you can do after
Evaluate identity-propagation designs against protocol differences and the separation of user and service identities.
How it connects
Connects user identity with service identity, HTTP, gRPC, AMQP, OAuth 2, OIDC, API gateways, and service meshes.

This explainer was generated by Manning's knowledge graph from the text of Software Security for Developers. The section links point to the parts of the book it draws on.