mirror of
https://github.com/jwadow/kiro-gateway.git
synced 2026-04-25 01:15:57 +03:00
[GH-ISSUE #16] [Bug]: AWS SSO OIDC - API host incorrectly uses SSO region instead of us-east-1 #13
Labels
No labels
bug
bug
enhancement
enhancement
fixed
fixed
invalid
needs-info
needs-testing
pull-request
question
upstream
wontfix
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/kiro-gateway-jwadow#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bhaskoro-muthohar on GitHub (Jan 7, 2026).
Original GitHub issue: https://github.com/jwadow/kiro-gateway/issues/16
Gateway Version
v1.0.8 (commit
69795d1)What happened?
This is a follow-up to #12 (AWS SSO OIDC support). While the token refresh now correctly uses the SSO region for the OIDC endpoint, the API host is also being set to the SSO region, causing DNS resolution failures.
The Problem
When using
KIRO_CLI_DB_FILEwith AWS IAM Identity Center credentials from a non-us-east-1 region (e.g.,ap-southeast-1), the gateway fails with:Root Cause
In
kiro_gateway/auth.py, the_load_credentials_from_sqlite()method (lines 210-215) sets_api_hostbased on the region from the SQLite database:This results in:
https://oidc.ap-southeast-1.amazonaws.com/token(correct)https://codewhisperer.ap-southeast-1.amazonaws.com(wrong - doesn't exist)The CodeWhisperer API is only available in us-east-1, regardless of the SSO region.
Expected Behavior
The gateway should:
ap-southeast-1) for OIDC token refreshus-east-1for the CodeWhisperer API hostSuggested Fix
Debug Logs
app_logs.txt
DNS Verification
Related: #12 (original AWS SSO OIDC support issue)
@jwadow commented on GitHub (Jan 7, 2026):
@bhaskoro-muthohar
Thanks for the detailed report, you nailed the exact issue.
Fixed. Now SSO region is stored separately in
_sso_regionand only used for OIDC token refresh. API hosts (_api_host,_q_host) are no longer touched when loading from SQLite — they stay at us-east-1.Also updated
manual_api_test.pywith the same logic so the test script works correctly too.Can you test it? Just
git pulland run.@jwadow commented on GitHub (Jan 7, 2026):
Forgot to commit, lol. I hope you haven't started testing yet. Everything should be ready by now.
@bhaskoro-muthohar commented on GitHub (Jan 7, 2026):
Tested with commit
d5ad4b1- works perfectly! 🎉Thanks for the quick fix!