question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Difficult agent mTLS configuration

See original GitHub issue

Is your an issue a feature request? If so, please raise it as an enhancement

Environment

  • OS / version:
  • Processor architecture:
  • TPM Manufacturer:
  • Keylime version: current latest 37d338f

Description

keylime agent uses the following options for mTLS

# The name of the RSA key that Keylime should use for protecting shares of U/V.
rsa_keyname = tci_rsa_key

# The name of the X509 certificate that is used for mTLS. Uses the rsa_keyname as a key.
mtls_cert = tci_mtls_cert

# The CA that signs the client certificates of the tenant and verifier.
# If set to default it tries to use /var/lib/keylime/cv_ca/cacert.crt
keylime_ca = default

keylime verifier uses

# mTLS configuration for connecting to the agent.
# Set 'agent_mtls_cert' to 'CV' for using the CV CA for the connections.
agent_mtls_cert = CV
agent_mtls_private_key =
agent_mtls_private_key_pw =

and tenant also uses

# mTLS configuration for connecting to the agent.
# Set 'agent_mtls_cert' to 'CV' for using the CV CA for the connections.
agent_mtls_cert = CV
agent_mtls_private_key =
agent_mtls_private_key_pw =

There are the following issues with this configuration:

  1. rsa_keyname and mtls_cert assumes file names or paths relative to /var/lib/keylime/secure. This is not mentioned and in contradiction to keylime_ca or mTLS related options of tenant or verifier which assume absolute paths.

  2. absolute paths for cloud agent should be also supported

  3. when a file cannot be accessed due to incorrect path the message should be printed visibly (Warning or Error, currently only Debug).

  4. agent mtls certificate needs to be self-signed, this fact is not documented

  5. naming convention for agent options - should have similar names as tenant and verifier. keylime_ca should be rather named ca_cert or mtls_ca_cert.

  6. verifier and tenant do not mention which CA cert is being used if ‘CV’ is not set.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
ansasakicommented, Sep 20, 2022

@THS-on From my point of view, yes, #1068 addresses the issues pointed here

1reaction
ansasakicommented, Mar 7, 2022

I think most of the options related with keys/certificates configurations are confusing or not clear:

In cloud_verifier section:

  • tls_dir: could be more explicit, like ca_dir, cv_ca_dir, or verifier_ca_dir
  • registrar_tls_dir: similar to above, could be registrar_ca_dir or registrar_access_ca_dir. I understand it is difficult to select a name as it is not usual to have the option to select different keys/certs to use for each individual connection. The description comments could also be more explicit (e.g. The following options set the keys and certificates the verifier will use as a client to connect to the registrar.)
  • registrar_my_cert: could be registrar_access_cert or something similar. The confusing part is to understand why we have registrar options in cloud_verifier section.
  • registrar_private_key: the most confusing option, made me ask “why would any entity know other entity’s private key?”. This again could be something like registrar_access_private_key. A comment specifying explicitly the purpose of this option, like mentioned above, could clarify it.
  • agent_mtls_cert, agent_mtls_private_key, agent_mtls_private_key_pw: these are not as confusing as the registrar related options, but consistency on naming would be nice. A clear and explicit comment about the purpose would be a plus.

In tentant section:

  • All above applies here
  • There are no options to set the keys/certificates used when connecting to the verifier. I understand my_cert and private_key are used in this case, but again some consistency is missing.
Read more comments on GitHub >

github_iconTop Results From Across the Web

A Kubernetes engineer's guide to mTLS - Buoyant.io
Mutual TLS, or mTLS, is a hot topic in the Kubernetes world, especially for anyone tasked with getting “encryption in transit” for their...
Read more >
What is mTLS? | Mutual TLS | Cloudflare
Mutual TLS, or mTLS, is a type of mutual authentication in which the two parties in a connection authenticate each other using the...
Read more >
Using client certificates for mutual TLS (mTLS) authentication ...
This post discusses how client certificates can be configured to ensure mutual TLS (mTLS) authentication occurs between beacons and FlexNet ...
Read more >
The significance of mTLS and why you should care about it
The main thing that makes mTLS different (and arguably more secure) is that it requires both the server and client to verify each...
Read more >
Enable TLS Encryption for Nomad - HashiCorp Developer
Encrypt API and RPC traffic using mutual TLS (mTLS) to increase the security of your Nomad cluster.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found