You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix(schema): relax request header allowlist validation per AWS docs
Relaxes header allowlist to accept any valid HTTP header name (alphanumeric,
hyphens, underscores) that isn't structurally reserved (x-amz-*, x-amzn-*
except Runtime-Custom-*), per the AWS AgentCore Runtime documentation.
- Updates schema refine to validate character pattern + block reserved prefixes
- Updates normalizeHeaderName to pass through X-* headers unchanged
- Adds case-insensitive deduplication
- Adds tests for X-Api-Key, X-Custom-Signature, restricted prefix rejection
Refs #1151
* fix(tui): update header allowlist help text to reflect relaxed validation
Updates CLI flag description and TUI hints to show examples of newly-accepted
header names (X-Api-Key, X-Custom-Signature) and clarify when auto-prefixing
applies.
Refs #1151
* fix(schema): per-branch error messages and remove dead-code prefix check
Addresses review feedback on PR #1163:
- Schema now returns specific error per violated rule (character pattern,
x-amz- reserved, x-amzn- reserved-except-Custom-) instead of a single
three-rule string. Easier to act on for users.
- Removes dead-code clause '&& !lower.startsWith('x-amzn-')' on the x-amz-
check; 'x-amz-' and 'x-amzn-' are disjoint prefixes (position 5 differs:
'-' vs 'n'), so the carve-out is unnecessary.
- Extracts checkAllowlistHeader() in agent-env.ts as the single source of
truth; header-utils.ts now consumes it instead of duplicating the rules.
- Adds test pinning the documented suffix-preservation behavior of
normalizeHeaderName() for the Runtime-Custom- branch.
- Updates --request-header-allowlist flag help to clarify X-prefixed names
pass through unchanged.
Refs #1151
'Comma-separated list of custom header names to allow (auto-prefixed with X-Amzn-Bedrock-AgentCore-Runtime-Custom-) [non-interactive]'
269
+
'Comma-separated list of header names to allow. X-prefixed names (e.g. Authorization, X-Api-Key, X-Custom-Signature) pass through unchanged; bare names without X- prefix are auto-prefixed with X-Amzn-Bedrock-AgentCore-Runtime-Custom- for backward compatibility. [non-interactive]'
0 commit comments