Skip to content

Self-managed policy in iam-group-with-policies does not work for users with path #334

@enver

Description

@enver

Description

Self-managed policy in iam-group-with-policies does not work for users with path since 5.11.0. Changes introduced removed support for users with path.

  • ✋ I have searched the open/closed issues and my issue is not listed.

Versions

  • Module version [Required]: v5.11.0+

  • Terraform version:
    Terraform v1.3.7
    on darwin_amd64

  • Provider version(s):
    provider registry.terraform.io/hashicorp/aws v4.52.0

Reproduction Code [Required]

examples/iam-group-with-policies

Steps to reproduce the behavior:

  • After applying the example update path for one of the users to i.e. /developers/
  • Remove user from superadmins group
  • NOTE: to workaround issue MFA enforced for groups with policies since 5.11.0 #332 remove DenyAllExceptListedIfNoMFA statement from self managed policies.
  • Enable console access
  • Login with modified user account
  • Try to execute one of the statements from self managed policy. i.e. create IAM access keys

Expected behavior

Users with path should be able to perform actions granted in self manage policy.

Actual behavior

An error is returned: You do not have the permission required to perform this operation. Ask your administrator to add permissions.

Terminal Output Screenshot(s)

Additional context

Introduced in PR #313

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions