grpc_ssl_ciphers

The `grpc_ssl_ciphers` directive specifies the suite of ciphers that NGINX will use for SSL/TLS connections in gRPC services.

Syntaxgrpc_ssl_ciphers cipher_suite;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The grpc_ssl_ciphers directive in NGINX configures the cipher suites that can be used for secure connections in gRPC applications. When a gRPC service is configured to use SSL/TLS, it requires a secure communication channel between the client and the server. The grpc_ssl_ciphers directive allows you to explicitly specify which ciphers should be accepted by the server when negotiating SSL/TLS connections, ensuring compatibility and security based on your application's needs. The directive is applicable in the http, server, and location contexts, thereby providing flexibility in defining cipher suites for global or specific use cases.

This directive accepts a single argument, which is a colon-separated list of ciphers. Each cipher in the list must be valid according to the SSL/TLS library used by NGINX, typically OpenSSL. When multiple ciphers are specified, they will be evaluated in the order listed when establishing a secure connection, allowing for prioritized cipher selection. It's crucial to keep the security of your application in mind when configuring cipher suites, as using weak or deprecated ciphers could expose your system to vulnerabilities. Additionally, this directive works in concert with other SSL-related directives to establish a secure environment for gRPC communications.

Config Example

server {
    listen 443 ssl;
    grpc_ssl_ciphers 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256';
}

Ensure that your specified ciphers are compatible with your SSL/TLS library version.

Using outdated or weak ciphers can lead to security vulnerabilities; regularly update your cipher list based on best practices.

← Back to all directives