HashiCorp Boundary Deep Dive
Introduction and Overview
In this section, Rob Barnes introduces himself as a senior developer advocate at HashiCorp and discusses the focus of the series on machine authentication, authorization, and the role of Vault. He then transitions to discussing human-to-machine access and the challenges faced by operators, engineers, and developers in accessing infrastructure in a private network.
Human-to-Machine Access
This section focuses on the challenges of human-to-machine access in a private network environment. Rob explains that there are instances where operators need to SSH into VMs or access databases for troubleshooting purposes. Traditional approaches such as using bastions or VPNs provide access but lack control over which parts of the infrastructure can be accessed.
- Traditional session access involves using bastions or jump boxes with public IP addresses that sit on a private network.
- The problem with traditional approaches is that once users gain access to the bastion host, they have unrestricted access to all resources within it.
- Controlling user access becomes challenging without complex routing rules and maintaining up-to-date routing tables.
- Boundary aims to solve these challenges by providing controlled and governed human-to-infrastructure access.
- Boundary allows visibility into sessions, control over user-machine connections, and targeted network connectivity.
Challenges with Bastions
This section highlights some challenges associated with using bastions for human-to-machine access.
- Onboarding and offboarding users from bastions can be cumbersome as it requires managing SSH keys.
- Removing SSH keys when users leave an organization is often overlooked, leading to potential security risks.
- The lack of integration between bastion management and HR systems adds complexity to user management.
- Secret sprawl occurs when SSH keys are not properly managed, leading to uncertainty about who has access to certain resources.
Boundary Architecture
This section introduces the architecture of Boundary, which consists of a controller and worker components.
- The controller is the main interface for users to log in and interact with Boundary. It manages access control.
- The worker component handles the heavy lifting by creating sessions between users and infrastructure.
- Similar to bastions, workers have public IP addresses but sit on a private network. However, end-users cannot directly connect to them.
Timestamps are provided for each section to help locate specific parts of the video.
User Authentication and Authorization in Boundary
In this section, the speaker discusses the authentication and authorization process in Boundary. They explain the two primary authentication methods used - user pass and oidc (OpenID Connect). The oidc method allows users to bring their identity providers into Boundary without manually replicating user databases.
User Authentication Methods
- User pass is one of the primary authentication methods in Boundary.
- Oidc (OpenID Connect) allows users to authenticate using their identity provider, such as Azure Active Directory, without manual replication of user databases.
Requesting a Session to Infrastructure
- After successful authentication, a user needs to request a session to access a specific piece of infrastructure.
- Access control is determined by roles assigned to users.
- If authorized, the controller schedules the worker to create a session for the user.
- The worker creates a proxy between the user's device and the target infrastructure.
Benefits of Proxy Connection
- The proxy connection eliminates the need for jump boxes or frequent environment variable changes.
- Users can directly connect to their target infrastructure through localhost and specified ports provided by Boundary.
Security and Visibility
- Security professionals have visibility into who is connected to what infrastructure, how long they are connected, etc.
- Detailed logs in Boundary can be ingested into security systems for detection and analysis purposes.
- End-users only need their credentials for authentication and connecting to authorized infrastructure.
Access Control Model
- Scopes play a crucial role in access control within Boundary.
- The global scope is where initial setup occurs, followed by creating organizations with tightly scoped permissions.
- Organizations can have users or groups assigned with appropriate permissions based on security requirements.
Access Control Model in Detail
This section provides further details on the access control model in Boundary, focusing on scopes and organizations.
Scopes and Organizations
- The global scope is where initial setup occurs.
- Organizations are created within the global scope with their own tightly scoped permissions.
- Users can log into specific organizations based on their team or role.
User Management
- Users can be managed within organizations, either individually or through groups.
- Groups are useful for assigning permissions at scale instead of managing them per user.
External Identity Providers
- Boundary supports external identity providers like Azure Active Directory for authentication.
- This eliminates the need to replicate user identities within Boundary.
Access-Based Enumeration
- Access-based enumeration allows fine-grained control over who can see a list of targets and connect to them.
- Permissions can be customized based on security posture and requirements.
Conclusion
Boundary provides flexible user authentication and authorization methods, allowing users to authenticate using various identity providers. The access control model ensures secure access to infrastructure while providing visibility to security professionals. Scopes and organizations help manage permissions effectively, while external identity providers simplify user management. Access-based enumeration further enhances security by controlling target visibility and access.
New Section
This section discusses the concept of groups in identity providers and how they can be mapped to groups in Boundary. It also explains the use of projects as a logical grouping of infrastructure.
Mapping Groups from Identity Provider to Boundary
- Users who are members of a group called "front end" in the identity provider can be mapped directly into a group called "front end" in Boundary.
- Permissions can then be assigned to this group, allowing for easier management and scalability compared to assigning permissions per user.
Projects as Logical Groupings
- Projects in Boundary are used as a sub-scope of an organization.
- They serve as a way to logically group infrastructure components.
- For example, the front-end team may have a project that includes various pieces of infrastructure related to their application stack.
- Permissions can be tightly scoped to each project, ensuring that only members of specific teams have access.
New Section
This section provides an overview of user infrastructure, including users, groups, and projects. It also mentions the option to dynamically manage these using external identity providers or manually using the user pass auth method.
User Infrastructure Overview
- User infrastructure consists of users and groups.
- Users can be managed dynamically through external identity providers or manually using the user pass auth method.
- Groups provide a way to organize users and assign permissions more efficiently.
New Section
This section explains projects in more detail and highlights their role as logical groupings for infrastructure components within an organization.
Understanding Projects
- Projects are a sub-scope within an organization in Boundary.
- They serve as logical groupings for different pieces of infrastructure.
- For example, the front-end team may have their own project containing relevant infrastructure components for their work.
- Permissions can be assigned at the project level, ensuring access is tightly scoped.
New Section
This section discusses the ability to assign permissions to specific teams or groups within projects in Boundary. It also mentions the use of sessions and how permissions can control session creation.
Permissions within Projects
- Permissions can be assigned to specific teams or groups within projects.
- For example, only members of the front-end team may have permission to create sessions through the front-end project.
- This allows for fine-grained control over access and ensures that only authorized users can perform certain actions.
New Section
This section briefly mentions that HashiCorp Cloud Platform offers managed versions of Vault, Consul, and Boundary. It also highlights the availability of open-source versions for those who prefer self-hosted solutions.
Managed vs. Self-hosted Solutions
- HashiCorp Cloud Platform provides managed versions of Vault, Consul, and Boundary.
- These managed versions offer convenience and ease of use.
- Open-source versions are available for those who prefer self-hosted solutions.
- The open-source versions are community-supported and come with a wealth of information on best practices.
New Section
This section emphasizes the benefits of using HashiCorp Cloud Platform for setting up a demo with Boundary. It mentions that it provides a low barrier to entry compared to rolling your own solution.
Benefits of Using HashiCorp Cloud Platform
- Using HashiCorp Cloud Platform for setting up a demo with Boundary offers several advantages.
- It provides a low barrier to entry compared to rolling your own solution.
- The demo setup described in this presentation utilizes HashiCorp Cloud Platform.
New Section
In this section, there is a question about the context-awareness of Boundary and whether it supports session recording.
Context-Awareness and Session Recording
- The question is asked if Boundary is context-aware, specifically in terms of session recording.
- Currently, Boundary does not support session recording.
- However, there is active development to introduce this capability in the future.
- There are different types of session recording, each with its own advantages and drawbacks.
- The community has debated which approach would be preferred, with a 50/50 split in opinions.
New Section
This section continues the discussion on session recording within Boundary. It mentions the different approaches to session recording and their complexities.
Different Approaches to Session Recording
- There are different approaches to session recording within Boundary.
- One approach involves simply recording the entire session, similar to a video.
- Another approach is more protocol-aware and can decode actual commands for better analysis.
- The protocol-aware approach allows for implementing logic and flagging certain actions as red flags in terms of security.
- Implementing the more advanced protocol-aware approach is complex but offers greater capabilities.
New Section
This section highlights that the topic of session recording has been a hot topic internally and externally. It also mentions that HashiCorp takes this topic seriously and actively considers user feedback.
Importance of Session Recording
- Session recording has been a hot topic both internally and externally regarding Boundary.
- User feedback plays an important role in shaping the direction of product development.
- While no specific timeline can be provided, HashiCorp acknowledges the importance of session recording and actively looks into developing this capability.
New Section
This section concludes the discussion on session recording within Boundary. It mentions that while it was not available at the time of launching Boundary, significant progress has been made in the product's development.
Progress in Boundary Development
- Session recording was not available when Boundary was initially launched.
- However, significant progress has been made in the development of Boundary over the past two years.
- User feedback and community input continue to shape the direction of the product.
- It is expected that session recording capabilities will be introduced in the future.
User Authentication and System Connection
In this section, the speaker discusses user authentication and system connection in the context of the product. The speaker mentions that currently, they do not have the capability to consider factors beyond just the user when connecting to certain systems. However, they are open to feedback and suggestions from the community to shape the direction of the product.
User Authentication and Compliance Requirements
- The speaker acknowledges that there is a need for hardware compliance when connecting to certain systems, especially in regulated industries.
- Currently, the product does not have functionality to handle compliance requirements or bundle with other solutions that can fulfill those needs.
- It is suggested that if there is a common denominator among compliance requirements, support for those requirements could be considered in future updates.
Organizational Structure and Project Hierarchy
This section focuses on explaining the organizational structure and project hierarchy within the product. The speaker demonstrates how different scopes such as global, organization, and project are organized.
Organizational Structure
- At the global scope, there are two organizations: "Marketing Department" and "Engineering Department."
- Within the Engineering Department organization, there are two projects: "Front End" and "Back End."
Project Hierarchy
- The Front End project contains everything related to front-end applications.
- Targets represent specific VMs or hosts within a project. In this case, there is a target called "Front End."
- Host catalogs store information about hosts (IP addresses) associated with targets.
- Host sets can be used when multiple targets represent the same deployable unit or when auto-scaling groups are involved.
Sessions and Credentials Management
This section covers sessions and credentials management within the product. The speaker explains how sessions enable connectivity between users and their target infrastructure, and how credentials can be managed.
Sessions and Connectivity
- Sessions are the means of establishing connectivity between users and their target infrastructure.
- Host catalogs and host sets are used in combination with targets to connect to the infrastructure.
- Sessions provide access management for users to connect to specific targets.
Credentials Management
- The product includes a credentials store where session-specific credentials can be injected.
- Users can request sessions with specific credentials, eliminating the need to directly access external credential stores like Vault.
- The duration of the generated credentials can be configured based on requirements.
Study Notes
- User authentication and system connection capabilities are currently limited, but feedback from the community is welcomed for future improvements .
- Compliance requirements for hardware and system connections are important considerations, especially in regulated industries .
- The organizational structure includes global scope, organizations (e.g., Marketing Department, Engineering Department), and projects (e.g., Front End, Back End) .
- Targets represent specific VMs or hosts within a project, while host catalogs store information about hosts associated with targets .
- Host sets can be used when multiple targets represent the same deployable unit or when auto-scaling groups are involved .
- Sessions enable connectivity between users and their target infrastructure, providing access management for specific targets .
- The product's credentials store allows injection of session-specific credentials without direct access to external credential stores like Vault .
This summary covers key points from the transcript.
Access Controls and Roles
In this section, the speaker discusses access controls and roles in the context of defining permissions for entities. They explain how roles are used to define what actions an entity is allowed to perform, such as viewing, creating, editing, or connecting to components within a system.
Defining Access Controls with Roles
- Roles are used to define access controls.
- Entities are granted specific permissions based on their assigned roles.
- Permissions can be granularly defined, allowing for fine-tuned control over what actions an entity can perform.
Grant Strings and Role Permissions
- Grant strings are used within roles to specify the type of actions that can be performed.
- A grant string defines the level of access an entity has for a particular component within a system.
- The speaker emphasizes that grant strings can be as granular as needed.
Simplified Example for Demonstration Purposes
- The speaker mentions that they have simplified the example for demonstration purposes.
- In reality, access controls and roles can be more complex and tailored to specific requirements.
Making Connections in Boundary
This section focuses on different ways of making connections in Boundary. The speaker explains that there are multiple interfaces available, including a web GUI for boundary administrators. They also discuss authentication methods and credential stores.
Interfaces in Boundary
- The web GUI is mainly used by boundary administrators.
- It allows administrators to connect through Boundary to end hosts using their credentials.
Authentication Methods
- If an end device expects username and password authentication instead of SSH keys, a credential store can be set up.
- Credential stores establish communication between Boundary and a Vault instance.
Credential Libraries and Targets
- Credential libraries are associated with targets in Boundary.
- When connecting to a target, you can specify the path of a secret required for successful connection.
- Examples of secrets include username and password credentials stored in Vault.
Dynamic Secrets and API Paths
- Dynamic secrets can be used for authentication if the setup requires it.
- Boundary uses path-based APIs, similar to CLI commands, to manage credential libraries.
Managing Credential Stores and Libraries
This section delves into managing credential stores and libraries in Boundary. The speaker explains how to set up credential stores, specify endpoints, and define the type of API call (GET or POST) required for accessing credentials.
Setting Up Credential Stores
- Credential stores establish a trust relationship between Boundary and a Vault instance.
- They define how Boundary connects to Vault, including namespace and credentials.
Defining Credential Libraries
- Credential libraries are created as a result of setting up credential stores.
- They are associated with targets in Boundary.
Reading Credentials from Vault
- If username and password credentials are required for authentication, you can use the KV example to read that information directly from Vault.
Dynamic Secrets with POST Calls
- For dynamic secrets that require creating credentials instead of reading them, a POST call is typically used.
Session Creation and Operator Access
In this section, the speaker discusses session creation in Boundary and highlights the benefits of using dynamic credentials. They also mention that sessions have an expiration time to mitigate security risks.
Session Creation with Credentials
- When creating a session in Boundary, the system provides the necessary credentials for authentication.
- As an operator or engineer, you don't need to know the actual credentials when using dynamic credentials.
Expiration Time for Sessions
- Sessions have an expiration time defined by boundary administrators.
- This helps mitigate security risks by ensuring that any potential harm caused by a session would be limited within the scope of boundary.
Support for Third-Party Credential Managers
The speaker addresses the question of whether Boundary supports third-party or external credential managers. They mention that currently, there is no support for such systems.
Lack of Support for External Credential Managers
- Currently, Boundary does not have built-in support for third-party or external credential managers.
- The speaker suggests that as a HashiCorp product, Boundary primarily relies on Vault as its identity broker and sequence manager.
Creating a Flexible Workflow Environment
The speaker discusses the goal of creating an environment where users can dictate their workflows without being restricted to a specific way of working. While currently, using Vault is necessary to achieve this functionality, there are plans to expand beyond Vault in the future.
Dictating Workflows and Flexibility
- The aim is to create an environment where users have the freedom to work in their preferred way.
- Currently, using Vault is required for this functionality, but it may change in the future.
- Users can use Vault as a proxy to access secrets stored elsewhere, but certain functionalities like broken identity with databases are not yet available.
Addressing User Needs and Feedback
The speaker acknowledges that many users have been requesting the ability to use existing secret storage solutions instead of having to migrate everything to Vault. They emphasize that HashiCorp values user feedback and empathy towards the community.
Listening to User Feedback
- Many users have expressed the need for integrating existing secret storage solutions with Boundary.
- HashiCorp recognizes these requests and aims to address them.
- They strive to show empathy towards their community and understand that it's not ideal for users to move all their secrets just for Boundary integration.
Interfacing with Boundary: Web GUI, CLI, and Desktop Client
The speaker explains different ways of interacting with Boundary, including through the web GUI, CLI (Command Line Interface), and desktop client. Each interface has its own capabilities and purposes.
Interfacing Options
- The web GUI provides extensive functionality except for creating sessions.
- CLI offers similar capabilities as the API and allows users to perform various tasks related to managing Boundary.
- The desktop client primarily focuses on creating sessions rather than managing or administering Boundary.
Using the Boundary Desktop Client
The speaker demonstrates the use of the Boundary desktop client, which is primarily designed for creating sessions. It allows authorized users to connect to specific infrastructure targets and create sessions.
Creating Sessions with the Desktop Client
- The desktop client is used to create sessions.
- Users can only create sessions for authorized infrastructure targets.
- The desktop client does not provide administrative capabilities or access to other infrastructure targets.
Establishing a Session with Boundary Desktop Client
The speaker shows how to establish a session using the Boundary desktop client. They demonstrate connecting to a target piece of infrastructure and obtaining credentials from Vault.
Establishing a Session
- After authenticating as a user, the desktop client allows users to create sessions.
- Users can connect to specific target infrastructure and obtain credentials from Vault.
- Credentials can be used to establish SSH sessions or other types of connections.
Accessing Infrastructure via Boundary Desktop Client
The speaker demonstrates accessing infrastructure through an SSH session established via the Boundary desktop client. They show how authentication and proxying work in this scenario.
Accessing Infrastructure
- By establishing an SSH session through the desktop client, users can access target infrastructure.
- Authentication is required during connection setup, including providing passwords obtained from Vault.
- Proxying enables secure communication between local machines and private subnets without internet access.
This summary provides an overview of key points discussed in the transcript. For more detailed information, please refer to the corresponding timestamps provided.
Using the CLI to Create a Connection
The speaker demonstrates how to use the command-line interface (CLI) to create a connection directly and inject the protocol for making a connection to the target infrastructure using SSH.
Creating a Connection with Boundary Connect
- Use the CLI command
boundary connectto create a connection.
- Inject the protocol by specifying SSH as the method for connecting to the target infrastructure.
- Cancel any active sessions that are not authorized or suspicious.
- Revoking permissions and investigating unauthorized access can be done after canceling the session.
- Enforcing security measures and compliance is possible through logging and detection systems.
Authenticating with Boundary
The speaker explains how to authenticate with Boundary using the CLI, specifically using password-based authentication.
Authenticating with Password Method
- Use the CLI command
boundary authenticatefollowed bypasswordas the authentication method.
- Provide an auth method ID and login name (username) for authentication.
- After successful authentication, a token is created under-the-hood, allowing further actions.
Making a Connection via SSH
The speaker demonstrates how to make an SSH connection using Boundary's CLI without relying on the desktop client.
Making an SSH Connection
- Use
boundary connectcommand along with specifying SSH as the protocol for making connections.
- Provide target ID and username for establishing an SSH connection.
- If credentials are unknown, bypassing will display them in output for manual entry.
Benefits of Using Boundary
The speaker highlights some benefits of using Boundary for secure connections and access control.
Benefits of Using Boundary
- Users can make direct connections from their laptops to authorized target infrastructure while maintaining visibility and control by their company.
- Access control is based on user roles, ensuring users can only connect to authorized resources.
- Incident response becomes easier as access can be granted temporarily during emergencies.
- Boundary's API-driven nature opens up possibilities for automation and integration with other tools.
Principle of Least Privilege
The speaker discusses the principle of least privilege and how it applies to access control in Boundary.
Principle of Least Privilege
- Engineers typically have no access by default, adhering to the principle of least privilege.
- Access privileges are granted when incidents occur and immediate access is required.
- Temporary access can be provided during emergencies while maintaining overall security measures.
Event Driven Approach with Rift
The speaker discusses an event-driven approach called Rift, which integrates with tools like PagerDuty and Alert Manager. They explain how the on-call engineer receives alerts, acknowledges them on their phone, and then makes a request to give access to specific infrastructure components. The credentials are injected into their session, and when the issue is resolved, all permissions are revoked.
Implementing an Event Driven Approach
- The speaker introduces Rift as an event-driven approach for managing alerts.
- Examples of integrated tools include PagerDuty and Alert Manager.
- When the on-call engineer receives an alert and acknowledges it on their phone, they can make a request to gain access to specific infrastructure components.
- Credentials are automatically injected into their session for easy access.
- Once the issue is resolved, all permissions granted through Rift are revoked.
Secure Posture without Stifling Productivity
The speaker emphasizes the importance of maintaining a secure posture without hindering productivity. They highlight that a good developer experience is crucial for successful deployment of any security tool. They also mention that Boundary can be used within an organization's private network if they are not comfortable exposing it to the public internet.
Balancing Security and Productivity
- Maintaining a secure posture is essential without compromising productivity.
- A good developer experience is central to successfully deploying security tools.
- Boundary allows organizations to implement security measures while still ensuring productivity and happiness among developers.
- If an organization is not comfortable exposing Boundary to the public internet, it can be deployed within their private network.
Using Boundary in Different Network Scenarios
The speaker explains that even if an organization prefers not to use Boundary as a traditional Bastion host, it can still be used within their network. They mention the possibility of requiring VPN access to the private subnet and using Boundary for requesting permission to access infrastructure.
Network Scenarios with Boundary
- Boundary can be used in different network scenarios.
- It doesn't have to function solely as a traditional Bastion host.
- If an organization prefers, they can require VPN access to the private subnet before using Boundary for requesting permission to access infrastructure.
Password of Last Resort
The speaker discusses the concept of a "password of last resort" and its usage in certain scenarios. They explain that while it is difficult to prevent engineers from using this password when necessary, by going through Boundary, there is at least a record of who authenticated at that time.
Password of Last Resort
- The "password of last resort" is used in situations where other authentication methods are not available or feasible.
- It may be challenging to prevent engineers from using this password when necessary.
- By going through Boundary, there is a record of who authenticated at that time, even if the password of last resort was used.
Using Infrastructure Logs for Investigation
The speaker explains how security professionals rely on various logs and information sources during investigations. They highlight the importance of combining logs from systems like Vault and Boundary to build a comprehensive picture when troubleshooting issues.
Utilizing Infrastructure Logs for Investigations
- Security professionals rely on breadcrumbs of information during investigations.
- Combining logs from systems like Vault, Boundary, and other target systems helps build a complete picture.
- Having infrastructure accessible via public internet allows routine rules and permissions to be implemented effectively.
Managing Permissions with Vault and Boundary
The speaker suggests managing permissions by using Boundary instead of Vault. They propose granting only the necessary permissions for day-to-day tasks and escalating them temporarily during critical incidents.
Managing Permissions with Vault and Boundary
- Instead of relying solely on Vault, the speaker suggests using Boundary for managing permissions.
- Granting only the necessary permissions for day-to-day tasks provides a more secure approach.
- During critical incidents, permissions can be escalated temporarily to address the issue.
- Revoking permissions once the incident is resolved gives engineers peace of mind and reduces potential risks.
Trusting Hardware and Access to Passwords
The speaker discusses the need for hardware to have access to passwords as part of the configuration process. However, they emphasize the importance of not solely relying on knowledge of credentials and introduce the concept of centralized secrets management.
- Hardware requires access to passwords during configuration.
- Trusting individuals with access to passwords is necessary.
- Memorizing passwords becomes irrelevant once devices are deployed.
- Static credentials can be a security risk if written down or memorized.
- Dynamic credentials expire quickly, making them more secure.
- Centralized secrets management allows for better governance and control over access.
Determining the Best Worker for Gateway Communication
The speaker addresses a question about how Boundary determines the best worker to use in different scenarios. They mention that it is an internal mechanism handled by Boundary but highlight the use of tags to control worker selection based on network location.
- Determining the best worker is an internal mechanism handled by Boundary.
- Tags can be associated with workers and targets.
- Workers can be tagged based on their capabilities (e.g., front end).
- When starting a session, Boundary looks at target tags and assigns a matching worker.
- Tags allow for controlling flows based on connectivity strategy.
Integration of HashiCorp Vault, Consul, and Boundary with Two-Factor Authentication
The speaker discusses multi-factor authentication (MFA) in relation to HashiCorp Vault, Consul, and Boundary. They mention that MFA has become an open-source feature due to its importance in enhancing security.
- Multi-factor authentication (MFA) is considered essential for security.
- HashiCorp Vault has recently open-sourced MFA as an enterprise feature.
- Integrating MFA with Keys authenticator apps or other methods is possible.
- MFA should be a standard practice for enhanced security.
The transcript provided does not contain timestamps for all sections.
Turn any video into a summary like this
YouTube links, meetings, lectures. With transcripts, search, and chat.