This document explains how to configure the AWS Security Hub v1.0.0 plugin with the Risk Exchange module of the Netskope Cloud Exchange platform. This plugin is used to fetch device records from Security Hub CSPM > Findings. This plugin does not support performing any actions on the Security Hub. Netskope Normalization Score will be calculated based on the severity of the finding.
Prerequisites
To complete this integration, you need:
- A Netskope tenant (or multiple, for example, production and development/test instances).
- A Netskope Cloud Exchange tenant with the Tenant plugin and Risk Exchange plugin already configured.
- Connectivity to the Amazon Security hub.
AWS Security Hub Plugin Support
This plugin is used to fetch device records from Security Hub CSPM > Findings. This plugin does not support performing any actions on the Security Hub. Netskope Normalization Score will be calculated based on the severity of the findings in Hub CSPM.
| Type of data pulled | Actions Supported |
|---|---|
| Devices | Not Supported |
Mappings
Mapping are used to view the pulled Devices along with their respective details. Fields mapped during plugin configuration are visible on the Records page when the data is pulled. Here are the suggested mapping to use while configuring the plugin.
Device Mapping
| Plugin Field | Expected Datatype | Suggested Field Name | CRE Aggregate Strategy |
|---|---|---|---|
| Finding ID | String | Finding ID | Unique |
| Resource ID | String | Resource ID | Unique |
| IPv4 Address | String | IPv4 Address | Unique |
| Region | String | Region | Overwrite |
| Resource Tags | List | Resource Tags | Overwrite |
| IPv6 Addresses | List | IPv6 Addresses | Overwrite |
| Subnet ID | String | Subnet ID | Overwrite |
| VPC ID | String | VPC ID | Overwrite |
| Severity | String | Severity | Overwrite |
| Product Name | String | Product Name | Overwrite |
| Finding Title | String | Finding Title | Overwrite |
| Finding Description | String | Finding Description | Overwrite |
| Compliance Status | String | Compliance Status | Overwrite |
| Last Seen | Datetime | Last Seen | Overwrite |
| Netskope Normalize Score | Number | Netskope Normalize Score | Overwrite |
Permissions
AWS Security Hub permissions to the IAM user to pull Devices information is GetFindings.
API Details
List of APIs used
This plugin uses Python libraries to get logs from AWS Cloudwatch log groups attached to the AWS Verified Access Instance
Library: The AWS SDK for Python (Boto3)
Usage: The AWS SDK for Python (Boto3) to create, configure, and manage AWS services, such as Amazon Security Hub CSPM. The SDK provides an object-oriented API as well as low-level access to AWS services.
Creating Security Hub Client
securityhub_client = boto3.client(
"securityhub",
aws_access_key_id=self.aws_public_key,
aws_secret_access_key=self.aws_private_key,
aws_session_token=self.aws_session_token,
region_name=self.configuration["region_name"].strip(),
config=Config(
proxies=self.proxy,
user_agent=self.useragent,
retries={
"total_max_attempts": 3,
"mode": standard
}
),
)
Getting Security Hub CSPM Findings
Parameters
{
"Filters": {
"ResourceType": [
{
"Value": "AwsEc2Instance",
"Comparison": "EQUALS"
},
],
"UpdatedAt": [
{
"Start": start_time,
"End": end_time,
}
],
},
"SortCriteria": [
{
"Field": "UpdatedAt",
"SortOrder": "DESC",
}
],
"MaxResults": 100,
}
response = securityhub_client.get_findings(**params)
Performance Matrix
Here is the performance matrix conducted on a Large CE Stack with these specifications by pulling 500k devices.
| Description | Specification |
|---|---|
| Stack details | Size: Large RAM: 32 GB CPU: 16 Cores |
| Time taken to store the pulled Device records | ~20 minutes |
User Agent
netskope-ce-5.1.2-cre-aws-security-hub-v1.0.0
Workflow
- Generate credentials for AWS Security Hub authentication methods.
- Configuring the AWS Security Hub plugin.
- Add a Business Rule.
- Add an Action.
- Validate the AWS Security Hub plugin.
Watch a Video
Click play to watch a video:
Create an AWS Security Hub Policy
- Click on the JSON tab, and enter this policy. Click Next: Tags, and then click Next: Review.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Statement1",
"Effect": "Allow",
"Action": [
"securityhub:GetFindings"
],
"Resource": "*"
}
]
}
- Enter a Name and click Create Policy.

- Attach this policy to the user. Go to IAM > Users. Select the user for which you want to attach a policy, and click Add permissions, and then click Add permissions options.
- Select the Attach policies directly option under Permissions, and then search and select the policy you created in the previous step for the source queue.

- Click Next, and then click Add permissions. The policy will be attached to the user.
Plugin Authentication Methods
IAM Role Anywhere Configuration
Prerequisites
The AWS Certificate Manager service is required to be enabled to authenticate the plugin using the AWS IAM Roles Anywhere Authentication Method.
Note to sure you create the Private Certificate Authority, Trust Anchor and Profile in the same region in which your AWS SQS Queue resides.
Create a Policy
This Policy contains the required permissions for creating Private CA Certificate (including Permissions for creating a Trust Anchor and Profile) and using the IAM Roles Anywhere.
- Go to Policy Generator and select IAM Policy as policy type, enter Add Statement details, and generate a policy.
- Select Type of Policy: IAM Policy
- Effect: Allow
- AWS Service: AWS Private Certificate Authority
- Actions:
- CreateCertificateAuthority
- DescribeCertificateAuthority
- GetCertificate
- GetCertificateAuthorityCertificate
- GetCertificateAuthorityCsr
- ImportCertificateAuthorityCertificate
- IssueCertificate
- ListCertificateAuthorities
- ARN: *
- Click Add Statement.

- Scroll back up to add another statement.
- Select Type of Policy: IAM Policy
- Effect: Allow
- AWS Service: AWS Identity and Access Management (IAM)
- Actions:
- AttachRolePolicy
- CreateAccessKey
- CreateRole
- DeleteRole
- PassRole
- ARN: *
- Click Add Statement.

- Scroll back up to add another statement.
- Select Type of Policy: IAM Policy
- Effect: Allow
- AWS Service: AWS Certificate Manager
- Actions:
- DescribeCertificate
- ExportCertificate
- GetCertificate
- ListCertificates
- ListTagsForCertificate
- RequestCertificate
- ARN: *
- Click Add Statement.

- Scroll back up to add another statement.
- Select Type of Policy: IAM Policy
- Effect: Allow
- AWS Service: AWS Identity and Access Management Roles Anywhere
- Actions:
- CreateProfile
- CreateTrustAnchor
- GetProfile
- GetTrustAnchor
- ListProfiles
- ListTrustAnchors
- ARN: *
- Click Add Statement.

- Click Generate Policy.

- Copy the Policy as it will be used in the next step for creating the policy required for creating the Private CA certificates.
- Go to AWS Console and select IAM from All Services. Click Policies in the left panel, and then click Create Policy.

- Copy the policy to the JSON tab, click Next:Tags, and then click Next:Review
.
- Enter a name (like netskope-ce-rolesAnywhere-policy) and click Save Changes.

Create a Private Certificate Authority
- Log in to AWS Console.
- Search for Certificate Manager.

- Click AWS Private CA.
- Click Create a private CA.

- For Mode Options, select General-purpose.
- For CA type options, select Root.

- Enter the Organization (O).

- For Key algorithm options, select RSA 2048.


- Add tagsif any (optional).
- Check the checkbox in the CA permissions options section.
- Check the checkbox in the Pricing section.
- Click Create to create the CA certificate.


- From Actions,select Install CA Certificate.

- Click Confirm and Install.


Create a Trust Anchor
- Search for the IAM service, go to Roles under Access management scroll down to Roles Anywhere and select Manage.

- Click Create a Trust anchor.
- Enter a Trust anchor name.
- Select AWS Certificate Manager Private CA (created in the previous steps) as a Certificate authority (CA) source. Select the Certificate that was created in the previous step in AWS Private Certificate Authority.
- Add tags if required.
- Click Create a trust anchor.

- Click on the created Trust Anchor and copy the Trust Anchor ARN. This will be required in the Plugin configuration Trust Anchor ARN parameter for the authentication method AWS IAM Roles Anywhere.

Create an IAM Role
- Go to IAM services in the AWS Console.
- Click Role in the Access Management submenu.
- Click Create Role.

- In the Trusted entity type, select Custom Trust Policy.

- Replace the Custom trust Policy with this Trust Policy. This policy contains the permissions for using the roles anywhere service:{ “Version”: “2012-10-17”, “Statement”: [ { “Effect”: “Allow”, “Principal”: { “Service”: [ “rolesanywhere.amazonaws.com” ] }, “Action”: [ “sts:AssumeRole”, “sts:TagSession”, “sts:SetSourceIdentity” ] } ] }

- Click Next.
- In the Permissions policies, select the policy created in Create an AWS Security Hub Policy.

- Click Next.
- Provide a Role name (like netskope-ce-aws-verified-access-role) and Description for the role.

- Click Create role. Search for the created role and click on the Role Name.

- Make a note of the Role ARN. This will be required in the Plugin configuration Role ARN parameter for the authentication method AWS IAM Roles Anywhere.

Create a Profile
- Select Roles under Access management.
- Scroll down to Roles Anywhere and click Manage.

- Expand the Setup steps.
- Click Step 2: Configure roles.
- Click Configure a profile.

- Enter a Profile Name.
- Select the role created in the Create IAM Role section.
- Remove the Inline Policy.

- Click Create a profile.


- Select the created Profile and copy the Profile ARN.
Request a Private Certificate
- Go to AWS Certificate Manager > Request certificate.
- Select Request a private certificate.

- Click Next.
- Select the Certificate authority created in the previous step.

- Provide a domain name in the Fully qualified domain name field, like netskope-ce-verified-access.com.
- Select RSA 2048 as the Key algorithm.
- Add tags if required.
- Acknowledge the Certificate renewal permissions.
- Click Request.

- Go to List certificates from the navigation pane of AWS Certificate Manager.
- Select the certificate created previously.

- Click Export.

- Enter a passphrase. Make a note of the passphrase as it will be required for the Configuration of the AWS Security Lake Plugin using the AWS IAM Roles Anywhere Authentication method.
- Click Generate PEM Encoding.
- Download all theCertificatesas it won’t be visible again. For new certificates, you will need to Export them again.
The Certificate body, Certificate Private Key will be required for the Configuration of the AWS Verified Access Plugin using the AWS IAM Roles Anywhere authentication method. For more info, go to AWS IAM Role Anywhere.
AWS Authentication
Create a Role
- Go to IAM services in the AWS Console.
- Click Create role.

- Select the AWS Service.
- Under Use case, select EC2.
- Click Next.

- Select the permission policy created in Create an AWS Security Hub policy.

- Click Next.

- Enter a Role Name and Description.
- Click Create Role.
Assign a Role to an EC2 Instance
- Log in to your EC2 instance console.
- Click Instances under Instances.


- Go to Action > Security > Modify IAM Role.

- Select the Role that you created above in Create a Role. (netskope-ce-instance-role).
- Click Add IAM Role or Modify IAM Role.

Note:
Both EC2 instance and Queue should be on the same region.
Configure the AWS Security Hub Plugin
- In Cloud Exchange, go to Settings > Plugins and search for the “AWS Security Hub” plugin. Click on the plugin box .

- Enter a configuration name and change sync interval.

- Enter the configuration parameters:
- Authentication Method: Select the method to be used for authentication (Deployed on AWS/AWS IAM Roles Anywhere)
- Private Key: Private Key for decrypting the AWS Private CA Certificate. Required for ‘AWS IAM Roles Anywhere’ authentication type.
- Certificate Body: Certificate Body for AWS Public/Private CA Certificate. Required for ‘AWS IAM Roles Anywhere’ authentication type.
- Password Phrase: Password Phrase for decrypting the CA Certificate. Required for ‘AWS IAM Roles Anywhere’ authentication type.
- Profile ARN: AWS Profile ARN for AWS client authentication. Required for ‘AWS IAM Roles Anywhere’ authentication type.
- Role ARN: AWS Role ARN for AWS client authentication. Required for ‘AWS IAM Roles Anywhere’ authentication type.
- Trust Anchor ARN: AWS Trust Anchor ARN for AWS client authentication. Required for ‘AWS IAM Roles Anywhere’ authentication type.
- AWS Region Name: AWS Region Name. Make sure that the region name matches the region in the Profile ARN and Trust Anchor ARN.
- Initial Range: Number of days to pull the data for the initial run.

- Click Next. Select the Entity from the Entity dropdown. The Entity fields can be created from the Schema Editor page or using the + Add Field option from the field dropdown. Provide the field mappings. For the suggested mappings, refer to the section ‘Mapping’.

- Click Save.

Note:
The Finding ID, Resource ID, and IPv4 address, fields will be required to pull the Users and instance id is required to pull applications.
Add a Risk Exchange Business Rule for the AWS Security Hub Plugin
- Go to Risk Exchange > Business Rules.
- Click Create New Rule in the top right corner.
- Enter a Rule Name. Select the Entity for which Fields have been configured for the AWS Security Hub plugin, and configure the query based on your requirements. The below example filters the data fetched from the plugin.

- Click on Save.
Add Risk Exchange Actions for the AWS Security Hub Plugin
The AWS Security Hub supports the following action type:
No Action
No action will be performed for this action. You can generate UBA alerts in Ticket Orchestrator by using this action, and enabling the Generate Alert toggle.

Note:
For the devices pulled in Cloud Exchange from the AWS Security Hub plugin, you can use the Add host to Private App actions on Netskope. For performing the devices related actions on Netskope refer to the Netskope’s plugin guide.
Steps to configure the Action
- Go to User Risk Exchange > Actions > Click on Add Action Configuration.
- Select the required Business Rule, Configuration, and Action from their respective dropdown.
- Enable the Require Approval toggle if Approval is needed before performing an action.
- Click Save.
Validate the AWS Security Hub Plugin
Validate in Cloud Exchange
To validate the pulling of devices in Cloud Exchange from the AWS Security Hub CSPM findings, go to Logging and search for message Like “CRE AWS Security Hub [CRE AWS Security Hub]” .

To validate the stored device records in Cloud Exchange, go to Risk Exchange > Records. Select the entity that you used while adding the mapping in the plugin configuration, and check the records.

Validate in AWS Security Hub
In AWS, the plugin pulls AwsEc2Instance details from AWS Security Hub CSPM > Findings.

Troubleshooting AWS Security Hub Plugin
Unable to pull Devices
If you are not able to pull Devices from the AWS Security Hub CSPM Findings it could be due to there being no data available to pull.
What to do:
- Go to AWS Security Hub CSPM > Findings. Check if the findings are available to pull for the same time range as provided in the plugin configuration.
- If the findings are available and still not pulled, check the Resource value for those findings. Only findings with the EC2 Instance or AwsEc2Instance Resource type are pulled.
Facing issues while configuring the new plugin
If you’re creating a new plugin with AWS IAM Roles Anywhere and face below error while configuring the plugin:

What to do:
This error could possibly mean that one of the Trust Anchor ARN, Role ARN, or Profile ARN has a different account ID, so you need to check that the provided parameters are generated from the same account, and have the same region.



