Skip to content

fix: prevent OSS policy name exceeding 32-char limit#686

Open
madhununna wants to merge 1 commit intoaws-samples:mainfrom
madhununna:fix/issue-582-kb-policy-name-too-long
Open

fix: prevent OSS policy name exceeding 32-char limit#686
madhununna wants to merge 1 commit intoaws-samples:mainfrom
madhununna:fix/issue-582-kb-policy-name-too-long

Conversation

@madhununna
Copy link

Issue #, if available:582

Description of changes:When policy_suffix defaulted to kb_name, policy names were constructed as '{kb_name}-sp-{kb_name}', doubling the name and exceeding the 32-char OpenSearch Serverless limit.

Fix uses self.suffix (already generated for uniqueness) as the default policy_suffix, and truncates the kb_name prefix in policy names to guarantee all generated names stay within the 32-char constraint.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

When policy_suffix defaulted to kb_name, policy names were constructed
as '{kb_name}-sp-{kb_name}', doubling the name and exceeding the 32-char
OpenSearch Serverless limit.

Fix uses self.suffix (already generated for uniqueness) as the default
policy_suffix, and truncates the kb_name prefix in policy names to
guarantee all generated names stay within the 32-char constraint.

Fixes aws-samples#582
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant