Manage Prowler & Security Hub findings in OpenSearch
- Create a config file named
config.FOO
with your specific settings.
export DEPLOY_BUCKET=fooli-deploy
export DEPLOY_PREFIX=prowler
export CHECKS_FILE=fooli-checks.json
export CONFIG_FILE=fooli-config.yaml
export PROWLER_MANIFEST=Fooli-Prowler-Manifest.yaml
export IMAGE_VERSION=20230805-1201
# Used by a local run
export ROLENAME=fooli-audit
export PAYER_ID=123456789012
export OUTPUT_BUCKET=fooli-prowler
- Create Manifest.
cft-generate-manifest -m Fooli-Prowler-Manifest.yaml -t cloudformation/Prowler-Template.yaml
- Edit Manifest.
- If you're not using opensearch, you can just set the
pDomainEndpoint
to the value of NONE
- If you're not using opensearch, you can just set the
- Make the ECR Repo:
make env=FOO repo
- Push the container:
make env=FOO push
(you need docker running)- Update the Config file to set the correct
IMAGE_VERSION
- Update the Config file to set the correct
- Deploy:
make env=FOO prowler-deploy
- Generate a
cft-deploy
Manifest file:
cft-generate-manifest -m Manifests/my-Opensearch-Manifest.yaml -t pht-prowler-searchcluster/cloudformation/OpenSearch-Template.yaml
- Edit the values in that template to match your environment.
- It's recommended to adjust the timeout to 45min or more.
- Deploy the stack with
cft-deploy -m Manifests/my-Opensearch-Manifest.yaml
- Get the Admin Password from Secrets Manager
- Enable IAM Mapping. This is needed to leveage IAM roles to access the OpenSearch.
./scripts/enable_iam_roles.sh <OpenSearch-StackName> <Prowler-StackName>
This process is based on this Blog Post
All Settings from AWS Identity Center are placed into a Secrets Manager secret for use by CloudFormation when deploying or updating the OpenSearch Cluster.
- To begin, go to AWS Identity Center, and click "Add application"
- Choose "I have an application I want to set up", then "SAML 2.0", then "Next"
- For Display Name, use choose what to call this, such as "Prowler OpenSearch". Add a description if so desired.
- Download the
IAM Identity Center SAML metadata file
to your computer - Copy the
IAM Identity Center SAML issuer URL
- Enter
https://DOMAIN_ENDPOINT_URL/_dashboards/_opendistro/_security/saml/acs/idpinitiated
for "Application ACS URL" - You can get the value of DOMAIN_ENDPOINT_URL from the output of the OpenSearch stack. If you choose a custom endpoint, you can should use that here (such as
prowler.fooli.media
) - Enter
https://DOMAIN_ENDPOINT_URL
for Application SAML audience - Click "Submit"
- Edit the Attribute Mappings. They should look like:
- Create an admin Group for OpenSearch.
- Enter a group name, such as "prowler-opensearch-admin"
- Add users to the group
- Click Create
- Go back to the group you just created, and under "General Information", copy the Group ID. It should look like
046988c4-70e1-70bf-8071-ff5a9e1b82b4
- You should have three values saved:
- The Admin Group ID
- The IAM Identity Center SAML issuer URL
- The contents of the SAML metadata file.
In the AWS account with the OpenSearch cluster, create a AWS Secrets Manager Secret. Map these values:
SAMLEntityId
->IAM Identity Center SAML issuer URL
SAMLMetadataContent
-> The contents of the metadata file you downloadedAdminGroupId
-> The ID of the group created in AWS Identity Center
Finally, update the OpenSearch Manifest pSAMLConfigSecret
with the name of the Secrets Manager secret, and re-deploy OpenSearch.