Amazon Web Services Feed
How to use AWS RAM to share your ACM Private CA cross-account
In this post, I use the new Cross-Account feature of AWS Certificate Manager (ACM) Private Certificate Authority (CA) to create a CA in one account and then use ACM in a second account to issue a private certificate that automatically renews the following year. This newly available workflow expands the usability of ACM Private CA so that your organization can build a centralized CA hierarchy and allow issuance across many accounts, which fits the needs of how customers build on AWS today. A central CA hierarchy can enable centralized management of the CA and creates cost savings, because you no longer need one CA per account. Your organization can also simplify the access the PKI team needs to administer the CA but having the CA in one account and sharing the issuance across multiple accounts. This covers use cases like SSL/TLS everywhere and Internet of Things (IoT) production where many production-line systems need to generate certificates. Support for microservice meshes (like AppMesh and Managed Kafka) will be coming soon.
The newly launched feature, Private CA Cross-Account Sharing, gives you the ability to grant permissions for other accounts to use a centralized CA to generate and issue certificates by using AWS Resource Access Manager (RAM) to manage the permissions. This removes the need for a Private CA in every account, saving you $400 for each CA created, which is a more cost-effective way of deployment. Also, each account the Private CA is shared with that creates a private certificate in its own account, remains in full control of the certificate because the key lives in the certificate creation account and is fully protected there. The certificate creation account can associate the certificate to any resource in their account or export it for further use. Each certificate that is created also has the complete managed renewal capability of ACM.
For this walkthrough, I share my ACM Private CA with a single account. This feature also works with AWS Organizations. To give you a couple of examples of creating certificates in a secondary account from the shared Private CA, I show you how to accomplish this through the AWS Command Line Interface (CLI) and through the ACM console.
Solution overview
The solution is simple to both use and configure. It does require you to have an ACM Private CA already created in a single account. If you don’t, you can follow the steps outlined in the ACM Private CA User Guide to create one. After you’ve selected your CA to share, you can create a resource share and include your private CA by using AWS RAM. You can either share this with your full AWS Organizations structure, AWS organizational units, or individual accounts both inside and outside of AWS Organizations. When you share your CA, and the sharing accounts accept the resource share, they have the ability to create certificates through the ACM console or through CLI, API, or AWS CloudFormation. You are only sharing the ability to create, manage, bind, and export certificates from the CA. You are not sharing any of the admin functionality. This enables you to provide a strong separation between admins and users of the Private CA. The workflow for sharing your ACM Private CA is as follows, also shown in Figure 1.
- Identify which Private CA(s) you want to share, and which accounts you want to share with.
- Create a resource share and then add your ACM Private CA to the share.
- Share the resource with a single account or with your AWS Organizations structure.
- In the shared account(s), create a certificate through the ACM console (You can choose to share with a single account, or with your entire AWS Organizations structure; you don’t have to do both).
- Share your Private CA with your AWS Organizations accounts.
- Share your Private CA with individual accounts.
Prerequisites
For this walkthrough, you should have the following prerequisites:
- An AWS account with an ACM Private CA already set up.
- A secondary account and/or an AWS Organizations structure to share the Private CA with.
- An AWS Identity and Access Management (IAM) role or user with permissions to perform ACM and AWS RAM operations in both the primary and secondary accounts.
Deploying the solution through the AWS Management Console
In this section, you can find all the steps to complete this tutorial. I walk you step-by-step through the process for sharing this Private CA and verifying success by creating a private certificate through the AWS Management Console.
To deploy the solution through the AWS Management Console
- First, create your shared resource in the AWS RAM console. This is completed in the Private CA OWNING account.
- Sign in to the AWS Management Console. For Services, select the Resource Access Manager console.
- In the left-hand pane, choose Resource shares, and then choose Create resource share.
- For Name, enter Shared_Private_CA.
- For Resources, select your ACM Private CA.
- For Principals, select either AWS Organizations or an individual account.
- Choose Create resource share.
- Next, accept the shared resource in your shared account. Note: If you choose to share with AWS Organizations, there is no need for the acceptance step. By sharing with an organization or organizational units, all accounts in that container will have access without going through the acceptance step. Accepting a resource share into your account enables you to control which shared resources are displayed in your account when you list resources. You can reject unwanted shares to prevent the system from displaying unwanted resources that are shared from accounts you don’t know or trust.
- In your shared account, sign in to the AWS Management Console. For Services, select the Resource Access Manager console.
- On the left-hand pane, under Shared with me, select Resource shares. (You will see the share invite pending.)
- Select the name of the shared resource, and then choose Accept resource share.
- After the share is accepted, under Resource shares, you will see that the Shared_Private_CA is now listed as Active.
- Next, create a certificate from the Shared_Private_CA in the shared account.
- In the same account, go to the Certificate Manager console
- Choose Request a certificate.
- Select the option Request a private certificate, then choose Request a certificate.
- For CA, select Shared_Private_CA, and then choose Next.
- For Add domain names, add the domain www.example2.com, and then choose Next.
- Choose Review and request, confirm the information, then choose Confirm and request.
- You can now see your new ACM certificate, issued by the Shared_Private_CA in your account.
Deploying the solution through the AWS CLI
You’ve completed this tutorial using the AWS Management Console. Now, I will walk you through the same step-by-step process of sharing your Private CA and creating a private certificate to verify success using the AWS CLI.
To deploy the solution by using the AWS CLI
- First, create your shared resource in the AWS RAM console. With credentials from your ACM Private CA OWNING account, run the following command (make sure to replace values in italics with your own values).
- Next, accept the shared resource in your shared account. With credentials from your shared account, run the following command (make sure to replace values in italics with your own values).
- Next, create a certificate from the Shared_Private_CA (make sure to replace values in italics with your own values).
- Finally, verify the certificate by running describe-certificate (make sure to replace values in italics with your own values).
Example output is shown as follows.
Conclusion
In this post, I showed you how to share an ACM Private CA with a single account or AWS Organization and then create a certificate from that shared Private CA. We went through steps to do both these tasks through the AWS Management Console and AWS CLI. You now have the option to centralize your ACM Private CA, and share it with your other AWS accounts to issue private certificates. This lowers cost, management overhead, and makes it easier to implement separation of PKI administrators from users of the CA, freeing up time to focus on your AWS infrastructure and security. You can read about more ACM Private CA Best Practices in our ACM User Guide.
If you have feedback about this post, submit comments in the Comments section below. If you have questions about this post, start a new thread on the AWS Certificate Manager forum or contact AWS Support.
Want more AWS Security how-to content, news, and feature announcements? Follow us on Twitter.