Plugin Authentication Methods
Plugin Authentication Methods
IAM Role Anywhere Authentication
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 a Policy
This Policy contains the required permissions for creating Private CA Certificate (including Permissions for creating 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 Organization (O).
- For Key algorithm options, select RSA 2048.
- Add tags if 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.
- 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, like netskope-ce-trust-anchor.
- 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.
- Click on created Trust Anchor and copy the Trust Anchor ARN.
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.
- Go to Policy Generator.
- Replace the Custom trust Policy with the below 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 a Bucket Policy.
- Click Next.
- Provide a Role name (like netskope-ce-roleAnywhere) and 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
- 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, like netskope-ce-profile.
- Select the role created in Create IAM Role netskope-ce-roleAnywhere.
- Remove the Inline Policy.
- Click Create 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.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 the 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 the Certificates as it won’t be visible again. For new certificates you will need to Export them again.
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 a Bucket Policy.
- Click Next.
- Enter a Role Name (like netskope-ce-instance-role) 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.
Assign a Role to a Farget Instance
- Open your CFN script.
- Get the ExistingECSTaskRole Parameter value if present.
- Go to IAM > Roles.
- Search for the ExistingECSTaskRole Parameter value, if any. Otherwise, search for NetskopeCloudExchangeTaskRole-
and select the role.
- Attach Policy created in Create Bucket Policy to this role:
- Click Add permissions and Attach policies.
- Search and select the policy created in the Create Bucket Policy section. (netskope-ce-s3-policy).
- Click Add permissions.
- Click Add permissions and Attach policies.
Assign a Role to a K8s Instance
- Open your Role created for ServiceAccount while creating K8s instance.
- Attach the policy created in Create a Bucket Policy.