Skip to content

fix(bedrockagentcore): allow colons in match_value_string regex - #48445

Closed
AruneshDwivedi wants to merge 3 commits into
hashicorp:mainfrom
AruneshDwivedi:fix/bedrockagentcore-colon-regex
Closed

AruneshDwivedi wants to merge 3 commits into
hashicorp:mainfrom
AruneshDwivedi:fix/bedrockagentcore-colon-regex

Conversation

@AruneshDwivedi

@AruneshDwivedi AruneshDwivedi commented Jun 17, 2026 •

Copy link
Copy Markdown

The match_value_string and match_value_string_list fields in custom_jwt_authorizer used the regex ^[A-Za-z0-9_.-]+$ which rejects colons. But the AWS API and Console accept colons -- for example in OIDC claim strings like https://issuer.example.com.

Updated the regex to ^[A-Za-z0-9_.:-]+$ to allow colons, matching what AWS actually accepts.

Fixes the failing test TestAccBedrockAgentCoreCustomJWTAuthorizer_basic.

…alue_string_list regex

The match_value_string and match_value_string_list fields in
custom_jwt_authorizer used regex ^[A-Za-z0-9_.-]+$ which rejected
colons. However, the AWS API and Console accept colons in these values
(e.g. Cognito custom attributes use the 'custom:' prefix, and group
names can contain colons like 'myapp:admin:read').

The sibling field inbound_token_claim_name already uses
^[A-Za-z0-9_.-:]+$ which correctly allows colons.

This fix adds ':' to the character class in both regex patterns,
matching the existing convention.

Fixes hashicorp#48428

Signed-off-by: Arunesh Dwivedi <[email protected]>
@AruneshDwivedi
AruneshDwivedi requested a review from a team as a code owner June 17, 2026 16:53
@dosubot dosubot Bot added the bug Addresses a defect in current functionality. label Jun 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions

github-actions Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible.

@github-actions github-actions Bot added needs-triage Waiting for first response or review from a maintainer. service/bedrockagentcore Issues and PRs that pertain to the bedrockagentcore service. size/XS Managed by automation to categorize the size of a PR. labels Jun 17, 2026
@AruneshDwivedi AruneshDwivedi changed the title fix(bedrockagentcore): allow colons in match_value_string and match_value_string_list regex fix(bedrockagentcore): allow colons in match_value_string regex Jun 19, 2026
@justinretzolk

Copy link
Copy Markdown
Member

Hey @AruneshDwivedi 👋🏻 Thank you for taking the time to raise this! It looks like this is a duplicate of #48437, so I'm going to close this pull request in favor of that one. If you feel I've done this in error, please feel free to open a new pull request and we'd be happy to take another look.

@github-actions github-actions Bot removed the needs-triage Waiting for first response or review from a maintainer. label Jun 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions

Copy link
Copy Markdown
Contributor

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Addresses a defect in current functionality. service/bedrockagentcore Issues and PRs that pertain to the bedrockagentcore service. size/XS Managed by automation to categorize the size of a PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants