Skip to content

fix(llm): escape path when using bedrock inference profiles #14310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

muscionig
Copy link

@muscionig muscionig commented Feb 25, 2025

Summary

This PR attempts to fix issue #14309 by properly handling URL encoding in AWS SigV4 authentication. Specifically:

  • Escapes the model.name if an ARN is identified.
  • It sets the canonicalURI with the proper escaping for the signer.
  • Current behavior is maintained in the case model.name is not an ARN.

I have tested this e2e.

Please let me know if this approach is acceptable. If not, feel free to close this PR.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix #14309

@CLAassistant
Copy link

CLAassistant commented Feb 25, 2025

CLA assistant check
All committers have signed the CLA.

@team-eng-enablement team-eng-enablement added the author/community PRs from the open-source community (not Kong Inc) label Feb 25, 2025
@team-eng-enablement team-eng-enablement added author/community PRs from the open-source community (not Kong Inc) and removed author/community PRs from the open-source community (not Kong Inc) labels Mar 9, 2025
@pull-request-size pull-request-size bot added size/M and removed size/S labels Apr 26, 2025
@muscionig muscionig changed the title fix: escape path when using bedrock inference profiles fix(llm): escape path when using bedrock inference profiles Apr 26, 2025
@oowl
Copy link
Member

oowl commented May 30, 2025

Hey @muscionig, Thank you for your incredible contribution. We have merged your commit in https://github.com/Kong/kong-ee/commit/4da8ac49891bbcae88e86914667514ffd7fe4d86 in another PR, so I choose to close your PR now.

@oowl oowl closed this May 30, 2025
@gitbrad
Copy link

gitbrad commented Jun 5, 2025

Did this make it to 3.9.1? I have no visibility into the link provided. But I do think this is still present in version 3.9.1, FYSA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author/community PRs from the open-source community (not Kong Inc) size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: ai-proxy does not correctly escape AWS Bedrock inference profile ARN in signature and request
5 participants