Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
gRPC security covers transport credentials, per-call authentication, and authorisation for services that speak Protocol Buffers over HTTP/2 rather than JSON over HTTP/1.1.

What Is gRPC Security?
gRPC is a remote procedure call framework that serialises messages with Protocol Buffers and carries them over HTTP/2. It dominates internal service-to-service traffic in Kubernetes estates because it is compact, strongly typed, and supports streaming in both directions. None of those properties makes it safer than a JSON API, and two of them make it harder to inspect, which is where most of the practical difficulty lies.
The payload is binary and the schema lives in a .proto file rather than in the message, so a proxy or logging layer that does not hold the definition cannot read the traffic. Methods are addressed as HTTP/2 paths of the form /package.Service/Method, which means URL-based access rules written for REST do not map across. Streaming calls hold a connection open for minutes or hours, so per-request controls such as timeouts and authentication checks need rethinking. And because browsers cannot speak gRPC directly, a grpc-web proxy usually sits at the edge, adding a translation layer that has its own configuration.
gRPC distinguishes channel credentials, which secure the connection, from call credentials, which identify the caller. Both have failure modes worth checking:
The idiomatic place to enforce identity is a server interceptor that runs before every handler. Two mistakes recur. The first is validating the caller at the interceptor and then performing no object-level check inside the method, which reproduces broken access control exactly as in any other API. The second is enforcing the check once per stream rather than per message, so a long-lived stream keeps its privileges after the token behind it has expired or been revoked.
Metadata deserves the same suspicion as HTTP headers. Values arriving from a client should never be used to decide identity, and an edge proxy should strip internal metadata keys before forwarding, otherwise a caller can assert its own user identity header.
Server reflection, enabled so that tools can discover services at runtime, lets anyone who reaches the port enumerate every method and message type with grpcurl. It is useful in development and should be off in production. Equally, the default maximum message size of 4 MB is a protection worth keeping; raising it to accommodate one large upload path raises it for every method. Set per-method deadlines, cap concurrent streams, limit the number of connections per client, and apply rate limiting at the mesh or gateway, because the framework does none of this for you.
Protocol Buffers parsing has also had its own vulnerabilities, including denial of service through deeply nested or recursive messages, so keeping the runtime library current through software composition analysis matters as much here as anywhere.
Testing needs the schema. With the .proto files, or with reflection enabled in a test environment, grpcurl and Postman can craft calls directly, and Burp Suite can decode gRPC-Web traffic for interception. Without either, a tester is reverse engineering wire format, which wastes engagement time that should go on the authorisation model. Supplying the protocol definitions at kick-off is the single most useful thing a development team can do for the assessment. Our web application security testing covers gRPC and gRPC-Web services alongside the REST APIs they usually sit behind.
It is not inherently more or less secure. Strong typing removes a class of parsing surprises and the default message size limit is helpful, but authentication, authorisation, input validation, and resource limits all have to be implemented with the same care. The binary encoding makes traffic harder to read casually, which is obscurity rather than security.
Yes for internet-facing services, and usually yes internally. Reflection lets any client enumerate every service, method, and message type without the proto files, which hands an attacker the full attack surface. Keep it enabled in development and test environments where tooling depends on it, and provide proto files directly to anyone who needs them in production.
Mutual TLS gives each workload a cryptographic identity that does not depend on network position, and a service mesh can issue and rotate the certificates automatically. Layer a short-lived token in call metadata when you need to carry the end user’s identity as well as the calling service’s. Validate both in a server interceptor and again at object level.
No. Browsers do not expose the control over HTTP/2 frames that gRPC requires, so web clients use gRPC-Web and a translating proxy such as Envoy. That proxy becomes part of your security boundary: it terminates TLS, applies cross-origin rules, and forwards metadata, so its configuration needs the same review as the service behind it.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.