Skip to content

Enabling SecurityHub Central Configuration: AccessDeniedException

0

Hello all,

I am attempting to enable SecurityHub Central Configuration using Terraform in a delegated Admin account (this account is not the Org management account and is a member account). I have successfully been able to to deploy the aws_securityhub_finding_aggregator resource which is required prior to enabling Central Configuration.

Once Terraform attempts to deploy Central Config it throws a 403 error being Error: updating Security Hub Organization Configuration (): operation error SecurityHub: UpdateOrganizationConfiguration AccessDeniedException: You don't have permissions to access this resource. See resource code below which is depending on the creation of the aggregator resource that was succesfully deployed:

resource "aws_securityhub_organization_configuration" "central_config" {
  auto_enable           = false
  auto_enable_standards = "NONE"
  organization_configuration {
    configuration_type = "CENTRAL"
  }

I am assuming into a role that has SecurityHub: "*" access. I am deploying to the home region and have confirmed that the account is the delegated admin and that trusted service is enabled in the management account for SecurityHub. I checked CloudTrail and didn't see any subsidiary API calls that were blocked as all I see is the one for UpdateOrganizationConfiguration. I also checked SCPs attached to the account and I cannot find any restricting access to SecurityHub.

I found one very similar issue here but looked like it wasn't resolved: https://github.com/hashicorp/terraform-provider-aws/issues/38043

asked 2 years ago1.2K views

2 Answers
1

The issue you're experiencing with enabling Security Hub Central Configuration using Terraform in a delegated admin account is likely related to insufficient permissions, despite having SecurityHub:"*" access.

To enable central configuration in AWS Security Hub, there are a few key requirements and steps to consider:

  1. The account must be properly designated as the Security Hub delegated administrator for the organization. This designation must be done through AWS Organizations, not just by granting SecurityHub permissions.

  2. The delegated administrator account must be in the intended home Region for Security Hub. The home Region is where the delegated administrator configures the organization and cannot be an opt-in Region.

  3. Security Hub must be integrated with AWS Organizations. This integration involves creating an organization in AWS Organizations if not already done.

  4. The action to enable central configuration must be performed from the home Region. The delegated administrator can create and manage configuration policies only from this designated home Region.

  5. Ensure that you have the necessary permissions not just in Security Hub, but also in AWS Organizations. You may need additional permissions related to Organizations to perform this action.

  6. Double-check that you're running the Terraform code in the correct AWS region - it should be the designated home Region for Security Hub.

  7. Verify that the Security Hub service-linked role exists in your AWS account. This role is usually created automatically when you enable Security Hub, but if it's missing, you may need to create it manually.

If you've confirmed all these points and are still encountering the AccessDeniedException, you may need to escalate to AWS Support for further investigation. They can help identify any specific permission issues or potential service problems that might be causing this error.
Sources
Enabling central configuration in Security Hub - AWS Security Hub
Managing Security Hub administrator and member accounts with Organizations - AWS Security Hub
UpdateOrganizationConfiguration - AWS Security Hub

answered 2 years ago

EXPERT

reviewed 2 years ago

0
Accepted Answer

Well discovered what the issue is. The AWS managed policy (AWSSecurityHubOrganizationsAccess) was added to the role and was able to get Central Config deployed. So it needed additional Organization permissions.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.