AWS Cloud Operations Blog
Self-service Account Provisioning Using AWS Service Management Connector for ServiceNow
Many customers are looking to adopt a multi-account strategy within their AWS environment. This allows customers to isolate their workloads into different environments including test, dev, and production in addition to separating workloads based on regulatory requirements. As customers scale their multi-account environments, one strategy to increase agility is to offer business units their own sandbox accounts for experimental and testing purposes. To do so rapidly, business teams want the ability to self-serve provisioning of their own accounts and resources.
For organizations that have adopted ServiceNow, IT operations teams can offer business teams the ability to self-service provisioning of accounts through a familiar interface. This is accomplished by connecting AWS Control Tower and AWS Service Catalog into ServiceNow using the AWS Service Management Connector which enables ServiceNow end users to provision, manage, and operate AWS resources natively through ServiceNow. AWS Control Tower enables customers to set up and govern a multi-account environment at scale. For guidance building a well-structured foundation and isolating AWS services by function and team, customers can reference the Security Reference Architecture.
In this blog post, we’ll demonstrate how to set up an environment that allows end users the ability to self-serve provisioning of accounts through ServiceNow. By the end of this hands-on session, you should be able to:
- Integrate AWS Service Catalog (AWS Control Tower Account Factory Portfolio) with ServiceNow ITSM Portal using AWS Service Management Connector to enhance Cloud Management.
- Order and provision an AWS Account as an end user from ServiceNow Portal in a standardized, secure, and governed fashion.
Prerequisites
AWS
- Obtain/use a clean AWS account with admin credentials. Although we’re using admin privileges for the purpose of this blog, it is security best practice to apply least-privilege permissions and grant only the permissions required to perform a task.
- Create Landing Zone using AWS Control Tower.
ServiceNow
- Obtain ServiceNow Personal Developer Instance or use clean ServiceNow Developer Environment. You will need an Account that has admin privileges to perform the configuration steps in ServiceNow.
Part 1: AWS Configuration
This section describes the configuration required on AWS. At a high-level, the following steps will be performed:
- Verify AWS Control Tower Landing Zone is set up.
- Verify AWS Service Catalog Portfolio Product is active.
- Create two IAM Users for AWS Service Management Connector:
SCSyncUser
SCEndUser - Create two IAM Policies:
Demo-ControlTower-FullAccess
Demo-SSO-FullAccess - Create an IAM Role Demo-Role-For-LaunchConstraint and attach required policies.
- Create AWS Service Catalog Launch Constraint and assign the role Demo-Role-For-LaunchConstraint.
- Grant access to the Service Catalog portfolio to users: SCSyncUser and SCEndUser.
Step 1: In your AWS Console, verify AWS Control Tower is setup in the US East (N. Virginia) region.
Step 2: Verify that the status of AWS Control Tower Account Factory Portfolio version is Active from the AWS Service Catalog service in your AWS Console.
Step 3: Create IAM Users
For each AWS account, the Connector for ServiceNow requires two IAM users:
- AWS Sync User: An IAM user to sync AWS resources (such as potfolios and products) to ServiceNow.
- AWS End User: An IAM user who can provision products as an end user, execute requests, and view resources that ServiceNow exposes. This role includes any required roles to provision and execute.
After creating each user, make a note of the access keys details as you would need them when configuring the new AWS Account in ServiceNow.
To add the users, Navigate to the Identity and Access Management (IAM) service.
Step 3.1: Create User 1
- Create the first user SCSyncUser, assign Permissions and create Access key (Programmatic Access) as shown in the screenshots.
- Select “Users” from the left-hand menu and then choose “Add users” button.
- Enter “SCSyncUser” for the user name. Since this user will only require programmatic access, leave the box unchecked for access to the AWS Management Console.
- Choose ‘Next’.
- Select the permissions option ‘Attach policies directly’ and search for the policy “AWSServiceCatalogAdminReadOnlyAccess”. Select the check-box against the policy name.
- Choose ‘Next’, Review the details and choose ‘Create User’ to complete the User Creation.
- To create an access key for this user, select “Users” from the left-hand menu and then choose SCSyncUser.
- Select the ‘Security credentials’ tab.
- Scroll down to the section for ‘Access keys’ and select ‘Create access key’.
- Select the radio button option for ‘Third-party service’, check the box at the bottom and choose ‘Next’.
- On the next page, choose ‘Create access key’.
- To Retrieve the access keys, choose ‘Download .csv file’ to save the access key and then choose ‘Done’.
Step 3.2: Create User 2
- Create the second user SCEndUser, assign Permissions and create Access key (Programmatic Access) as shown in the screenshots.
- Select “Users” from the left-hand menu and then choose “Add users” button.
- Enter “SCEndUser” for the user name. Since this user will only require programmatic access, leave the box unchecked for access to the AWS Management Console.
- Choose ‘Next’.
- Select the permissions option ‘Attach policies directly’ and search for the policy AWSServiceCatalogEndUserFullAccess”. Select the check-box against the policy name.
- Choose ‘Next’, Review the details and select ‘Create User’ to complete the User Creation.
- To create access key for this user, select “Users” from the left-hand menu and then choose SCEndUser.
- Select the ‘Security credentials’ tab.
- Scroll down to the section for ‘Access keys’ and choose ‘Create access key’.
- Select the radio button option for ‘Third-party service’, check the box at the bottom and choose ‘Next’.
- On the next page, choose ‘Create access key’.
- To Retrieve the access keys, select ‘Download .csv file’ to save the access key and then choose ‘Done’.It is best practice to rotate AWS Access keys periodically and sync updated keys programmatically in ServiceNow.
Step 4: Create IAM Policies
Before creating a launch constraint to which we attach an IAM role that Service Catalog assumes when an end user launches a product, the following policies with necessary permissions need to be created and subsequently attached to the IAM Role.
Navigate to the Identity and Access Management (IAM) service.
Step 4.1: Create a policy called Demo-ControlTower-FullAccess. This policy allows full access to the AWS Control Tower Service to provision new accounts.
- In the left navigation pane, choose “Policies” and then select the “Create policy” button.
- On the “Create policy” page, select the “JSON” and replace the default policy document with the following:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": "controltower:*", "Resource": "*" } ] }
- When you are finished, choose Next: Tags and then choose Next: Review on the following page.
- On the Review policy page, type the Name “Demo-ControlTower-FullAccess”.
- Review your policy and choose “Create policy” to save it.
Step 4.2: Create another policy called Demo-SSO-FullAccess. This policy allows access to AWS IAM Identify Center (successor to AWS Single Sing-on) service to create the IAM Identity Center Users (for the accounts provisioned using AWS Service Catalog – AWS Control Tower Account Factory Portfolio).
- In the left navigation pane, choose “Policies” and then choose the “Create policy” button.
- On the “Create policy” page, select the “JSON” and replace the default policy document with the following:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": "sso-directory:*", "Resource": "*" }, { "Effect": "Allow", "Action": "sso:*", "Resource": "*" } ] }
- When you are finished, choose Next: Tags and then choose Next: Review on the following page.
- On the Review policy page, type the Name “Demo-SSO-FullAccess”.
- Review your policy and choose “Create policy” to save it.
Step 5: Create IAM Role
- Navigate to the Identity and Access Management (IAM) service.
- In the left navigation menu, select “Roles“.
- Choose the “Create role” button.
- Select “AWS service” for the Trusted entity type and “Service Catalog” for the service.
- When you are finished, choose Next.
- Select the following permission policies to attach to the role:
AWSCloudFormationFullAccess AmazonS3FullAccess Demo-SSO-FullAccess Demo-ControlTower-FullAccess
- When you are finished, choose Next.
- Enter the name “Demo-Role-For-LaunchConstraint” for the role and choose the “Create role” button.
Step 6: Create Service Catalog Launch Constraint
- Navigate to the Service Catalog service.
- In the left navigation menu, select “Portfolios” and select the portfolio named ‘AWS Control Tower Account Factory Portfolio’.
- On the next page, select the tab “Constraints” and choose the “Create constraint” button.
- Select ‘AWS Control Tower Account Factory Portfolio’ for Product and ‘Launch’ for the Constraint type.
- For the Launch Constraint Method, choose “Select IAM role” and select the IAM role Demo-Role-For-LaunchConstraint from the drop-down.
- Choose “Create”.
Step 7: Grant AWS Service Management Connector (SMC) Users access to portfolio
To grant Service Management Connector users SCSyncUser and SCEndUser:
- Navigate to the Service Catalog service.
- In the left navigation menu, select “Portfolios” and select the portfolio named ‘AWS Control Tower Account Factory Portfolio’.
- On the next page, select the tab “Access” and choose “Grant access” button.
- Select “IAM Principal” for the Access type and select the “Users” tab.
- Select the users SCEndUser and SCSyncUser by checking the boxes.
- Choose the “Grant access” button to grant access to the users.
This concludes the configuration required on AWS.
Part 2: ServiceNow Configuration
This section describes how to configure core components in ServiceNow.
Step 1: Configuring AWS Service Management Connector
AWS Service Management Connector requires a ServiceNow plugin, called User Criteria Scoped API (for AWS Service Catalog integration), that provides useful components to the integration features.
The following configuration steps, as detailed in the AWS Service Management Connector Administrator Guide, need to be performed:
- Activating ServiceNow plugins
- Installing ServiceNow Connector scoped application
- Configuring Connector using Guided Setup
- Platform system administrator components
- ServiceNow permissions for administrators of the Connector scoped app
- Configuring AWS Service Management Connector scoped application
- Configuring AWS accounts to synchronize in the Connector
- When choosing the visible AWS service integrations for this AWS account, select
- ‘Integrate with AWS Service Catalog (including AppRegistry)‘ check-box option from the visible AWS service integrations for this AWS account.
- When choosing the visible AWS service integrations for this AWS account, select
- Validating connectivity to AWS Regions
- Manually syncing scheduled jobs
- Choose the following job names to execute:
- Synchronize AWS Service Catalog
- Synchronize changes to all AWS accounts
- Choose the following job names to execute:
Step 2: Adding the My AWS Products widget to the Service Portal view
The widget enables users to view their AWS product requests, view outputs, and perform post-operational actions such as update and terminate.
To include the My AWS Products widget on the Service Portal view, log in as system administrator in the ServiceNow standard user interface (Fulfiller view).
- In the navigator panel, find Service Portal.
- Choose Service Portal Configuration.
- Choose Designer.
- Search for Index in the filter. Choose the Home Page box with a house image and the word Index in the lower left corner.
- In the left panel in Widgets, enter My AWS Products in the Filter Widget.
- Drag the widget to the Service Portal edit view to your desired location.
- Preview your changes.
Part 3: Provisioning an AWS Account from ServiceNow
This section describes an example of how to order and provision an AWS Account from ServiceNow.
- In the navigator panel, find Service Portal.
- Choose Service Portal Home.
- Choose Catalog Menu on the top
- Select the Browse by Categories link
- Under the Categories section on the left, expand the AWS Service Catalog to view the available AWS products.
- Chooseo AWS Control Tower Account Factory Portfolio [Service Catalog] and then select AWS Control Tower Factory product to provision.
- Enter product request details including Product Name, Parameters and Tags (if any).
- Choose Order Now to submit the ServiceNow request and provision the AWS Service Catalog product.
- Choose Check Out to submit
Once done, you will receive an order status acknowledging the submission. The request shows that the submissions and execution have been successful and outputs the information submitted to AWS.
Part 4: AWS validation of self-serve account provisioned from ServiceNow
In your AWS Console, navigate to AWS Control Tower
- Choose Organization on the left panel.
- Expand the Sandbox Organizational Unit (OU) on the right to verify that the account provisioned from ServiceNow is Enrolled.
This completes the final task in this hands-on session.
Part 5: Clean Up
To clean up AWS Configurations:
- Remove access to AWS Control Tower Account Factory Portfolio for users: SCSyncUser and SCEndUser.
- Delete the AWS Control Tower Account Factory Portfolio Launch Constraint.
- Delete IAM Role Demo-Role-For-LaunchConstraint.
- Delete the two IAM Policies:
- Demo-ControlTower-FullAccess
- Demo-SSO-FullAccess
- Delete the two IAM Users:
- SCSyncUser
- SCEndUser
To clean up in ServiceNow, release the Personal Developer Instance provisioned for this Lab by following instructions in ServiceNow Documentation.
Conclusion
Customers using ServiceNow as their ITSM solution can leverage the AWS Service Management Connector to self-serve the vending of AWS Accounts natively from ServiceNow. In this blog post, we’ve shown how to implement steps to integrate AWS Service Catalog (AWS Control Tower Account Factory Portfolio) with ServiceNow ITSM using AWS Service Management Connector and raise a change request to provision an AWS Account through the ServiceNow Portal in a secure and standardized fashion. In doing so, customers can accelerate migration and AWS adoption at scale through oversight and governance in their declared operational tooling and system of record.