This document explains how to configure the AWS S3 Events, Alerts v1.2.0 plugin with the Log Shipper module of the Netskope Cloud Exchange platform. This plugin is used to fetch Alerts (DLP, Malware, Policy, Compromised Credential, Malsite, Quarantine, Remediation, Security Assessment, Watchlist, UBA, CTEP, Device, and Content) and Events (Page, Application, Audit, Infrastructure, Network, Incident, Endpoint and Client Status) from the Netskope Tenant.
Prerequisites
To complete this configuration, you need:
- A Netskope tenant (or multiple, for example, production and development/test instances).
- A Netskope Cloud Exchange tenant with the Tenant plugin and Log Shipper plugin already configured.
- Amazon S3 bucket permissions to the IAM user.
- ListBucket
- CreateBucket
- ListAllMyBuckets
- GetBucketPolicy
- GetBucketPublicAccessBlock
- PutEncryptionConfiguration
- PutBucketPublicAccessBlock
- PutBucketPolicy
- GetBucketLocation
- PutObject
- Connectivity to the following hosts: AWS S3 Bucket access.
AWS S3 Events, Alerts Plugin Support
This plugin is used to fetch Alerts (DLP, Malware, Policy, Compromised Credential, Malsite, Quarantine, Remediation, Security Assessment, Watchlist, UBA, CTEP, Device, and Content) and Events (Page, Application, Audit, Infrastructure, Network, Incident, Endpoint and Client Status) from the Netskope Tenant.
| Data Type | Description |
|---|---|
| Event Support | Yes: Page, Application, Audit, Infrastructure, Network, Incident, Endpoint and Client Status |
| Alert Support | Yes: DLP, Malware, Policy, Compromised Credential, Malsite, Quarantine, Remediation, Security Assessment, Watchlist, UBA, CTEP, Device, and Content |
| WebTx Support | No |
Permissions
Amazon S3 bucket permissions to the IAM user to send Events and Alerts data to buckets.
- ListBucket
- CreateBucket
- ListAllMyBuckets
- GetBucketPolicy
- GetBucketPublicAccessBlock
- PutEncryptionConfiguration
- PutBucketPublicAccessBlock
- PutBucketPolicy
- GetBucketLocation
- PutObject
API Details
List of APIs Used
This plugin uses Python libraries to create file objects in AWS S3.
Library: The AWS SDK for Python (Boto3)
Usage: The AWS SDK for Python (Boto3) to create, configure, and manage AWS services, such as Amazon Elastic Compute Cloud (Amazon EC2) and Amazon Simple Storage Service (Amazon S3). The SDK provides an object-oriented API as well as low-level access to AWS services.
Create a Client
s3_client = boto3.client(
"s3",
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.region_name,
config=Config(proxies=self.proxy, user_agent=self.useragent),
)
Create a Bucket
bucket = s3_client.create_bucket(
Bucket=bucket_name,
CreateBucketConfiguration=location,
)
Upload to File to the Bucket
s3_client.upload_file(
file_name,
bucket_name,
object_name,
)
Get an AWS Resource
s3_resource = boto3.resource(
"s3",
aws_access_key_id=self.aws_public_key,
aws_secret_access_key=self.aws_private_key,
region_name=self.region_name,
config=Config(proxies=self.proxy, user_agent=self. user-agent),
)
Performance Matrix
This performance reading is for a Large Stack CE tested on these VM specifications. These readings are added with the consideration that it will ingest around 10K file size in 30 seconds.
| Description | Specification |
|---|---|
| Stack details | Size: Large RAM: 32 GB CPU: 16 Cores |
| Events, Alerts ingested to third-party SIEM | ~ 200K EPM |
User Agent
User-Agent: APN/1.1 (ahq9d89xj9gspapczzdb59goq)
Workflow
- Generate required credentials for AWS S3 bucket access.
- Create an S3 Bucket and Policy.
- Generate Private Key, Certificate Body, Password Phrase, Profile ARN, Role ARN, Trust Anchor ARN if using AWS IAM Role Anywhere.
- Configure the AWS S3 Events, Alerts plugin.
- Configure Log Shipper Business Rules for the AWS S3 Events, Alerts plugin.
- Configure Log Shipper SIEM mappings for the AWS S3 Events, Alerts plugin.
- Validate the AWS S3 Events, Alerts plugin.
Watch a Video
Click play to watch a video.
Create AWS S3 Source Bucket
This bucket will be used in the AWS S3 Source Bucket configuration parameter while configuring the plugin.
- Enter Bucket Name, scroll down, and click Create Bucket. Example: netskope-ce-source-bucket.
- Click Edit in the Block public access (bucket settings) section. Uncheck all checkboxes and click Save Changes. You’ll be asked for confirmation; confirm it and click Confirm.

- Select S3 Bucket policy as the policy type, add statement details, and generate the policy:
Replace the <user-arn> with the user ARN used for accessing the source bucket and <bucket-name> with the source bucket created above. Sample<user-arn>: arn:aws:iam::7111xxxxxxxx:user/xxxxxxxx, and <bucket-name>: netskope-ce-source-bucket- Select Type of Policy: S3 Bucket Policy
- Effect: Allow
- Principal: <user-arn>
- Actions:
- GetBucketAcl
- GetBucketPolicy
- ARN: arn:aws:s3:::<bucket-name>
- Click Add Statement.

- Scroll back up and add another statement.
- Select Type of Policy: S3 Bucket Policy
- Effect: Allow
- Principal: <user-arn>
- Actions:
- PutObject
- PutObjectAcl
- ARN: arn:aws:s3:::<bucket-name>/*
- Click Add Statement.


- Click Generate Policy. Make sure to copy the policy generated in this step because it will be used in the next step to attach in the source bucket.

Create a Bucket Policy
- On the JSON tab, enter this policy. Click Next: Tags, and click Next: Review.

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:GetBucketPublicAccessBlock",
"s3:PutEncryptionConfiguration",
"s3:PutBucketPublicAccessBlock",
"s3:ListAllMyBuckets",
"s3:PutBucketPolicy",
"s3:CreateBucket",
"s3:ListBucket",
"s3:GetBucketPolicy",
"s3:GetBucketLocation"
"s3:PutObject"
],
"Resource": "*"
}
]
}
- Attach this policy to the user. Go to IAM > Users and select the user for which you want to attach a policy. Click Add permissions, and click Add permissions again.

- Select Attach policies directly under Permissions, and then search for and select the policy created in the previous step for the source queue.

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
Make sure you create the Private Certificate Authority, Trust Anchor, and Profile in the same region in which your AWS S3 Source Bucket resides.
Create an IAM Policy
This Policy contains the required permissions for creating a Private CA Certificate (including Permissions for creating a Trust Anchor and Profile) and using IAM Roles Anywhere.
- Go to Policy Generator and click Add Statement to 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.

- 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.

- Select Type of Policy: IAM Policy
- Effect: Allow
- AWS Service: AWS Certificate Manager
- Actions:
- DescribeCertificate
- ExportCertificate
- GetCertificate
- ListCertificates
- ListTagsForCertificate
- RequestCertificate
- ARN: *
- Click Add 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.

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

Create a Private Certificate Authority
- Add tags if any (optional).
- Enable the checkbox in the CA permissions options section.
- Enable the checkbox in the Pricing section.
- Click Create to create the CA certificate.


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

- Select AWS Certificate Manager Private CA (created in the previous steps) as a Certificate authority (CA) source.
- Add tags if required.
- Click Create a trust anchor.


Create an IAM Role
- Replace the Custom trust Policy with the below given 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.
- Provide a Role name, like netskope-ce-roleAnywhere, and add a Description for the role.
- Click Create role.

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

Create a Profile
- Enter a Profile name, like netskope-ce-profile.
- Select the role created in Create IAM Role section (netskope-ce-roleAnywhere).

Request a Private Certificate
- Provide a domain name in the Fully Qualified Domain Name field, like netskope-ce.com.
- Select RSA 2048 for the Key algorithm.

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

- Enter the passphrase. Make a note of the passphrase as it will be required for the Configuration of the AWS S3 Plugin using the AWS IAM Roles Anywhere Authentication method.
- Click Generate PEM Encoding.

- Download all the Certificates because they won’t be visible again. For new certificates, you will need to Export it again. For More Info visit AWS IAM Role Anywhere

Deployed on AWS Configuration
Create a Role
Assign a Role to an EC2 Instance
- Select the Role that you created previously (like netskope-ce-instance-role).
- Click Update IAM Role.

Assign a Role to a Fargate Instance
- Go to IAM > Roles.
- Search for the ExistingECSTaskRole parameter value. Otherwise, search for NetskopeCloudExchangeTaskRole-<CFN name> and select the role.

- Attach the previously created Create Bucket Policy to this role.
- Click Add permission > Attach policies.

- Search and select the bucket policy previously created (netskope-ce-s3-policy).
- Click Add permissions.

Assign the Role to a K8s Instance
- Open your Role created for ServiceAccount while creating K8s instance.
- Attach the Bucket policy created previously.
Configure the AWS S3 Events, Alerts Plugin
- In Cloud Exchange, go to Settings > Plugin Store.
- Search for and select the AWS S3 Events, and Alerts v1.2.0 (CLS) plugin box.

- Click Next and 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 S3 Bucket Region Name: AWS S3 Bucket Region Name from where to get the AWS S3 Bucket. Make sure that the region name matches the region in the Profile ARN and Trust Anchor ARN.
- AWS S3 Bucket Name: AWS S3 Bucket Name in which the data object will be stored.



Configure a Log Shipper Business Rule for AWS S3 Events, Alerts
- In Log Shipper, go to the Business Rules.
- By default there is a business rule that filters all alerts and events. If you want to filter out any specific type of alert or event, click Create New Rule and configure a new business rule by adding the rule name and filter(s).
- Click Save.

Configure a SIEM Mapping for AWS S3 Events, Alerts
- Go to SIEM Mappings and click Add SIEM Mapping.
- Select the Source plugin (Netskope CLS), the Destination plugin (AWS S3 Events, Alerts), your business rule, and click Save.
- After the SIEM mapping is added, the data will start to be pulled from the Netskope tenant, transformed, and ingested into the AWS platform.

Validate the AWS S3 Events, Alerts Plugin
Validate the Pull
To validate the pulling of indicators from the Netskope tenant.
Go to Logging in Cloud Exchange and search for the pulled logs.


Validate the Push
To validate the plugin workflow, on Netskope Cloud Exchange.
- Go to Logging and search for ingested events with the filter “message contains ingested”.
- The ingested logs will be filtered.


To validate the push from the AWS S3 platform:
- Go to AWS S3. On the Search bar, search for and select Buckets.
- Search the bucket you used while creating the plugin.
- Click on the bucket name.
Note
The folder structure will be like alerts/feedname/year/month/day/hour/filename.gz
Example: awsdemobucket/alerts/feedname=Malware/year=2023/month=11/day=30/hour=9/1701336881_139977276685128.txt



After downloading the file, the alert/event will look like this:


Troubleshooting the AWS S3 Events, Alerts Plugin
Facing issues in the existing plugin configuration after the plugin update
If you’ve recently updated your AWS S3 plugin, there might be an issue where editing the existing plugin configuration leads to a blank Cloud Exchange interface. This problem may occur in Cloud Exchange versions 4.2.0 and 5.0.0 if users try to modify the plugin configuration after the update and navigate to the Configuration Parameters page.
Here’s what you can do on your Cloud Exchange version:
For version 4.2.0, 5.0.0: The only solution available is to delete the current plugin configuration and set up a new one from scratch.
Facing issues while configuring the new plugin
If you’re creating a new plugin with AWS IAM Roles Anywhere and face an error of 400, the root cause for not being able to save the plugin can be found in the logging section when expanding the logs


What to do:
While expanding the log, you can see At least one of the Trust Anchor ARN, Role ARN, and Profile ARN has a different account ID, so you would have to check that the provided parameters are generated from the same account and have the same region.



















































