FreeRADIUS MFA with Amazon WorkSpaces on AWS

Partner Solution Deployment Guide

QS

February 2023
Adeleke Coker, Hammad Raza, and Charles Meruwoma, AWS Solutions Architecture and Support Engineering teams

Refer to the GitHub repository to view source files, report bugs, submit feature ideas, and post feedback about this Partner Solution. To comment on the documentation, refer to Feedback.

This Partner Solution was created by Amazon Web Services (AWS). Partner Solutions are automated reference deployments that help people deploy popular technologies on AWS according to AWS best practices. If you’re unfamiliar with AWS Partner Solutions, refer to the AWS Partner Solution General Information Guide.

Overview

This guide covers information you need to deploy FreeRADIUS MFA with Amazon WorkSpaces solution on the AWS Cloud.

For additional information about the product, refer to FreeRADIUS.

Costs and licenses

There is no cost to use this guide, but you will be billed for any AWS services or resources that this guide deploys. For more information, refer to the AWS Partner Solution General Information Guide.

Architecture

Deploying this solution with default parameters builds the following FreeRADIUS MFA with Amazon WorkSpaces environment in the AWS Cloud.

  • Scenario 1: Deploy and Configure FreeRADIUS MFA with Amazon WorkSpaces and your own Active Directory Domain Services (AD DS) installation on Amazon Elastic Compute Cloud (Amazon EC2) instances. The AWS CloudFormation template for this scenario builds the AWS Cloud infrastructure and sets up and configures Active Directory Domain Services (AD DS) and AD-integrated Domain Name Service (DNS) on the AWS Cloud. It also creates AWS Directory Service for Microsoft Active Directory (AD Connector) but you handle maintenance and adminstration of Active Directory Domain Services (AD DS) tasks. It then deploys FreeRADIUS MFA with Amazon WorkSpaces that is integrated with Active Directory Domain Services (AD DS) and configured and enabled on the AD Connector. You can also choose to deploy into your existing VPC infrastructure. Manual steps are required for users to register the MFA token after deployment.

  • Scenario 2: Deploy and Configure FreeRADIUS MFA with Amazon WorkSpaces and AWS Directory Service for Microsoft AD. The CloudFormation template for this scenario builds the base AWS Cloud infrastructure and then deploys AWS Managed Microsoft AD on the AWS Cloud. AWS Directory Service takes care of Active Directory Domain Services (AD DS) tasks such as building a highly available directory topology, monitoring domain controllers, and configuring backups and snapshots. It also deploys FreeRADIUS MFA with Amazon WorkSpaces that is integrated with Active Directory Domain Services (AD DS) and configured and enabled on the AWS Managed Microsoft AD. You can also choose to deploy into your existing VPC infrastructure. Manual steps are required for users to register the MFA token after deployment.

  • Scenario 3: Deploy and Configure FreeRADIUS MFA with Amazon WorkSpaces in an existing AWS Directory Service. The CloudFormation template for this scenario builds the base AWS Cloud infrastructure for the FreeRADIUS MFA with Amazon WorkSpaces. It integrates the solution into an existing Active Directory Domain Services (AD DS) and AWS Directory Service. You’ll be required to provide credentials of an existing domain user with permissions to make an LDAP request. It also requires an existing AWS Directory Service ID and VPC. This scenario requires that you have AWS Directory Service already created.

For all new Active Directory Domain Services (AD DS) installations, it deploys Active Directory Domain Services (AD DS) and Active Directory DNS integration, and it sets up Active Directory sites and subnets. For all the above scenarios, MFA is enabled on the AWS Directory Service with the solution and WorkSpaces is launched for a domain user.

Scenario 1: Deploy FreeRADIUS MFA with Amazon WorkSpaces and self-managed Active Directory

Architecture1
Figure 1. Scenario 1–Solution architecture for FreeRADIUS MFA with Amazon WorkSpaces on AWS

As shown in Figure 1, this solution sets up the following:

  • A highly available architecture that spans two Availability Zones.*

  • A virtual private cloud (VPC) configured with public and private subnets, according to AWS best practices, to provide you with your own virtual network on AWS.*

  • In the public subnets:

    • Managed network address translation (NAT) gateways to allow outbound internet access for resources in the private subnets.*

    • Remote Desktop Gateway (RD Gateway) instances in an Auto Scaling group to help secure remote access to instances in private subnets.*

  • In the private subnets:

    • An Application Load Balancer to allow inbound Secure Shell (SSH) access to Amazon EC2 instances in private subnets.

    • A Windows Server forest and AWS Managed Microsoft Active Directory (AD) domain controller in each Availability Zone, including a security group and rules for traffic between instances.

    • RADIUS servers installed to Amazon EC2 instances in an Auto Scaling group.

    • Amazon Aurora for a LinOTP database.

    • WorkSpaces for a specified domain user. These users are created in Scenarios 1 and 2.

    • AD Connector configured with the Active Directory Domain Services (AD DS) DNS IP addresses that connects to WorkSpaces.

  • AWS Key Management Service (AWS KMS) to encrypt the WorkSpaces root and user volumes and RADIUS server volumes.

  • AWS Secrets Manager to store passwords.

  • AWS Systems Manager for automation documents to do the following:

    • Install and configure Active Directory Domain Services (AD DS) (not shown), Active Directory DNS integration (not shown), AD Connector, and RADIUS server.

    • Enable MFA on AWS Directory Service.

  • Amazon EventBridge to invoke Systems Manager for automation documents that configures integration when the RADIUS server auto scaling activity occurs.

  • AWS Lambda function to invoke Systems Manager for automation documents.

* The template that deploys this into an existing VPC skips the components marked by asterisks and prompts you for your existing VPC configuration.

Scenario 2: Deploy FreeRADIUS MFA with Amazon WorkSpaces and AWS Managed Microsoft AD

Scenario 2 is similar to scenario 1, but it includes AWS Managed Microsoft AD to provision and manage Active Directory Domain Services (AD DS) on the AWS Cloud. Instead of fully managing Active Directory Domain Services (AD DS) yourself, you rely on AWS Directory Service for tasks such as building a highly available directory topology, monitoring domain controllers, and configuring backups and snapshots.

AWS Directory Service deploys Active Directory Domain Services (AD DS) across multiple Availability Zones, and automatically detects and replaces domain controllers that fail. AWS Directory Service also handles time-consuming tasks such as patch management, software updates, data replication, snapshot backups, replication monitoring, and point-in-time restores. For more information, refer to AWS Directory Service and AWS Directory Service Documentation.

Architecture2
Figure 2. Scenario 2–Solution architecture for FreeRADIUS MFA with Amazon WorkSpaces on AWS

As shown in Figure 2, this solution sets up the following:

  • Bullets 1–3 from Scenario 1.

  • In the private subnets:

    • (Required) A Windows EC2 instance to act as a management instance, including a security group and rules for traffic between instances.

    • Bullets 4.4 and 4.5 from Scenario 1.

  • AWS Managed Microsoft AD to provision and manage Active Directory Domain Services (AD DS) in the private subnets.

  • Bullets 5–9 from Scenario 1.

* The template that deploys this into an existing VPC skips the components marked by asterisks and prompts you for your existing VPC configuration.

Scenario 3: Deploy FreeRADIUS MFA with Amazon WorkSpaces into an existing AWS Directory Service

Scenario 3 is similar to scenarios 1 and 2 above, but it doesn’t provision the Active Directory. It requires an existing AWS Directory Service and a domain user with permissions to make an LDAP request to your existing Active Directory.

Architecture3
Figure 3. Scenario 3–Solution architecture for FreeRADIUS MFA with Amazon WorkSpaces on AWS

As shown in Figure 3, this solution sets up the following:

  • Bullets 1–2 from Scenario 2.

  • In the public subnets:

    • Managed NAT gateways to allow outbound internet access for resources in the private subnets.*

  • In the private subnets:

    • Bullets 4.3 and 4.4 from Scenario 1.

    • (Required) An existing AWS Directory Service in a supported WorkSpaces AWS region.

  • Systems Manager for automation documents to register AWS Directory Service for WorkSpaces and RADIUS server and enable MFA.

  • Bullets 5–6 and 8–9 from Scenario 1.

* The template that deploys this into an existing VPC skips the components marked by asterisks and prompts you for your existing VPC configuration.

Deployment options

This solution provides the following deployment options:

This solution provides separate templates for these options. It also lets you configure Classless Inter-Domain Routing (CIDR) blocks, instance types, and FreeRADIUS MFA settings.

Deployment steps

  1. Sign in to your AWS account, and launch this Partner Solution, as described under Deployment options. The AWS CloudFormation console opens with a prepopulated template.

  2. Choose the correct AWS Region, and then choose Next.

  3. On the Create stack page, keep the default setting for the template URL, and then choose Next.

  4. On the Specify stack details page, change the stack name if needed. Review the parameters for the template. Provide values for the parameters that require input. For all other parameters, review the default settings and customize them as necessary. When you finish reviewing and customizing the parameters, choose Next.

    Unless you’re customizing the Partner Solution templates or are instructed otherwise in this guide’s Predeployment section, don’t change the default settings for the following parameters: QSS3BucketName, QSS3BucketRegion, and QSS3KeyPrefix. Changing the values of these parameters will modify code references that point to the Amazon Simple Storage Service (Amazon S3) bucket name and key prefix. For more information, refer to the AWS Partner Solutions Contributor’s Guide.
  5. On the Configure stack options page, you can specify tags (key-value pairs) for resources in your stack and set advanced options. When you finish, choose Next.

  6. On the Review page, review and confirm the template settings. Under Capabilities, select all of the check boxes to acknowledge that the template creates AWS Identity and Access Management (IAM) resources that might require the ability to automatically expand macros.

  7. Choose Create stack. The stack takes about 130 minutes to deploy.

  8. Monitor the stack’s status, and when the status is CREATE_COMPLETE, the FreeRADIUS MFA with Amazon WorkSpaces deployment is ready.

  9. To view the created resources, choose the Outputs tab.

Postdeployment steps

Once deployment is complete, you’ll need to download the samplepolicy.cfg file and upload to the admin portal. The link to this portal will be in the output of the RADIUS stack in AWS CloudFormation. For more information, refer to step 2.10 in the Integrating FreeRADIUS MFA with Amazon WorkSpaces blog post.

Troubleshooting

For troubleshooting common solution issues, refer to the AWS Partner Solution General Information Guide and Troubleshooting CloudFormation.

Customer responsibility

After you deploy a Partner Solution, confirm that your resources and services are updated and configured—including any required patches—to meet your security and other needs. For more information, refer to the Shared Responsibility Model.

Feedback

To submit feature ideas and report bugs, use the Issues section of the GitHub repository for this Partner Solution. To submit code, refer to the Partner Solution Contributor’s Guide. To submit feedback on this deployment guide, use the following GitHub links:

Notices

This document is provided for informational purposes only. It represents current AWS product offerings and practices as of the date of issue of this document, which are subject to change without notice. Customers are responsible for making their own independent assessment of the information in this document and any use of AWS products or services, each of which is provided "as is" without warranty of any kind, whether expressed or implied. This document does not create any warranties, representations, contractual commitments, conditions, or assurances from AWS, its affiliates, suppliers, or licensors. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements, and this document is not part of, nor does it modify, any agreement between AWS and its customers.

The software included with this paper is licensed under the Apache License, version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at https://aws.amazon.com/apache2.0/ or in the accompanying "license" file. This code is distributed on an "as is" basis, without warranties or conditions of any kind, either expressed or implied. Refer to the License for specific language governing permissions and limitations.