Class: Cerbos::MutualTLS

Inherits:
TLS
  • Object
show all
Defined in:
lib/cerbos/mutual_tls.rb

Overview

Settings for encrypting the gRPC connection and authenticating the client with mutual TLS.

Instance Attribute Summary collapse

Attributes inherited from TLS

#root_certificates_pem

Instance Method Summary collapse

Constructor Details

#initialize(client_certificate_pem:, client_key_pem:, **tls_settings) ⇒ MutualTLS

Create settings for encrypting the gRPC connection and authenticating the client with mutual TLS.

Parameters:

  • client_certificate_pem (String)

    the PEM-encoded client certificate.

  • client_key_pem (String)

    the PEM-encoded client private key.

  • tls_settings (Hash)

    arguments to pass to TLS#initialize.


21
22
23
24
25
26
# File 'lib/cerbos/mutual_tls.rb', line 21

def initialize(client_certificate_pem:, client_key_pem:, **tls_settings)
  super(**tls_settings)

  @client_certificate_pem = client_certificate_pem
  @client_key_pem = client_key_pem
end

Instance Attribute Details

#client_certificate_pemString (readonly)

The PEM-encoded client certificate.

Returns:

  • (String)

9
10
11
# File 'lib/cerbos/mutual_tls.rb', line 9

def client_certificate_pem
  @client_certificate_pem
end

#client_key_pemString (readonly)

The PEM-encoded client private key.

Returns:

  • (String)

14
15
16
# File 'lib/cerbos/mutual_tls.rb', line 14

def client_key_pem
  @client_key_pem
end