In cloud environments, if we have to move towards zero trust security philosophy, we need to bring HashCorp Boundary and Vault integration into play.
Boundary is an identity-aware proxy solution that provides a simple, secure way to access hosts and critical systems on your network and Vault is HashiCorp’s comprehensive secrets management solution. The typical workflow would be like:
One of the key advantages of this approach is that you will not be specifically bridging the client onto the private network, so, we stay in line with sort of a zero-trust network philosophy where we’re not bridging users onto this private network.
Let’s take a quick look at some of these challenges. So, during adoption phase, you’ll notice that the credentials are still exposed to the users in case they’re using credential brokering feature or they still end up leveraging static SSH keys from Vault’s KV secret engine. Whereas during scaling phase, you often struggle with accountability and traceability issues in case of shared-user Linux accounts. Also, you might see some resource sprawling in case of multi-user Linux accounts. And then we can’t forget about automating these Boundary and host configurations when you’re talking about thousands of machines which you need to manage.
Organizations often using Boundary OSS rely on credential brokering. However, this approach lacks the ability to fully hide credentials from users. When a user attempts to connect to a target, Boundary’s control plane retrieves the necessary credential from Vault. Unfortunately, this credential is then visible to the user, allowing them to copy and use it to connect to the target. Even if the credential is dynamically generated, it is still exposed to the user, which poses potential security risks.
This is where credential injection comes into play. As part of this feature, when a user attempts to connect to a target, Boundary’s control plane retrieves the necessary credential from Vault. But this time, instead of exposing credentials to the user, the Boundary control plane directly injects the credential to the worker and the session is established. This gives a passwordless experience to the user. This is an Enterprise/HCP only feature.
We can solve this issue with SSH certificates. With SSH certificates, the user’s authenticity is based on possession of a certificate signed by the trusted certificate authority (CA). Instead of having to provision and deprovision keys across your infrastructure, SSH certificates allow you to specify how long a certificate is valid for or which users the certificate holder can login as. In this workflow:
Please follow the demo in below talk which I presented during HashiConf 2024 in Boston.
From an organization’s perspective, there may be good reasons for sharing usernames on the hosts, such as making it easier to configure unix permissions, configuring common reusable scripts, resource limits or maybe simplifying the overall provisioning of the hosts.
To solve this, you can enable SSH Recording feature.
I have created a dedicated blog on this issue.
To solve this:
So, if we have to summarize this blog, in order to introduce a robust solution for dynamically creating and managing SSH certificates at scale, you need to:
Originally published at https://japneetsahni.com on December 1, 2024.