feat: distinct sign-in error when Q Developer access is blocked - #571
Open
ashishrp-aws wants to merge 1 commit into
Open
feat: distinct sign-in error when Q Developer access is blocked#571ashishrp-aws wants to merge 1 commit into
ashishrp-aws wants to merge 1 commit into
Conversation
Amazon Q Developer stopped accepting new Builder ID accounts. Such an account signs in
successfully -- sign-in is OIDC and is never gated -- and then finds Q silently
non-functional, because every Q request from that identity is refused and the refusal
surfaces as if it were a chat reply. No explanation, and nothing the user can act on.
Only the language server observes the refusal. The service gates on the User-Agent of the
shared language server, so the plugin's own SDK calls are allowed unconditionally and there
is no client-side signal to classify. The server reports it over the existing notification
channel, so this change teaches the plugin to listen.
- Declare aws/window/showNotification on the client and act on it.
- Advertise window.notifications. Without it the runtime builds no notification router and
drops the notification silently -- no error and no log, which is the failure mode that
cost the most time on the VS Code and JetBrains ports.
- Identify the notification by id, never by title. The runtime's router rewrites the
declared id into base64 of {"serverName":...,"id":...}, so the raw id never arrives, and
a title match would sign out a working user the first time an unrelated error reused the
title "Amazon Q Developer".
- Add QDevAccessBlockedState and resolve it in ViewRouter ahead of the logged-out state.
Reacting to the refusal signs the user out, so the two states are always true together;
checking logged out first would show the ordinary login view and lose the explanation.
- Add QDevAccessBlockedView, following ReauthenticateView, explaining what happened,
pointing to Kiro, and offering a route back to sign-in for pre-cutoff Builder IDs.
The screen carries its own copy rather than displaying the service's message: that message
is one sentence written for an API consumer and does not say what to do next. Consequently
the dates on the screen are product copy from the public announcement, not values reported
by the service.
Ports the behaviour already shipped in VS Code (Amazon-Q-Developer/amazon-q-vscode#159) and JetBrains
(Amazon-Q-Developer/amazon-q-jetbrains#120).
Verified: mvn -B package on Corretto 17 -- BUILD SUCCESS, 508 tests, 0 failures, including
7 new classifier tests and ViewRouterTest at 14/14 with 2 new routing tests.
laileni-aws
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports to Eclipse the sign-in experience already shipped in VS Code (Amazon-Q-Developer/amazon-q-vscode#159) and JetBrains (Amazon-Q-Developer/amazon-q-jetbrains#120).
Problem
Amazon Q Developer stopped accepting new Builder ID accounts. Such an account signs in successfully — sign-in is OIDC and is never gated — and then finds Q silently non-functional: every Q request from that identity is refused, and the refusal surfaces as if it were a chat reply. The user gets no explanation and nothing to act on.
Why detection has to come from the language server
The service gates on User-Agent, and only traffic carrying the shared language server's token is gated. The plugin's own SDK calls are allowed unconditionally, so there is no client-side signal to classify — the same constraint that shaped the VS Code and JetBrains ports. The language server observes the refusal and reports it over the existing notification channel; this change teaches the plugin to listen.
Changes
AmazonQLspClient/AmazonQLspClientImplaws/window/showNotification; on a match, sign out and route to the new viewAmazonQLspServerBuilderwindow.notificationsQDevAccessBlockedNotification(new)ShowNotificationParams(new)QDevAccessBlockedState(new) +ViewRouter+ViewRouterPluginStateQDevAccessBlockedView(new) +AmazonQViewType+AmazonQViewContainerReauthenticateViewThree details that are load-bearing, not defensive
window.notificationsmust be advertised. Without it the runtime builds no notification router and dropsaws/window/showNotificationsilently — no error, no log. This was the single most expensive failure mode on the earlier two ports; it looks exactly like a server-side problem.Identification is by id, never by title. The runtime's router rewrites the server's declared id into base64 of
{"serverName":...,"id":...}, so the raw id never arrives. An earlier revision of the VS Code change matched oncontent.title, which would have signed out a working user the first time an unrelated error reused the title "Amazon Q Developer". There is a test asserting exactly that case is ignored.The blocked state is resolved before the logged-out state. Reacting to the refusal signs the user out, so
BLOCKEDand logged-out are always true together — checking logged out first shows the ordinary login view and loses the explanation.testAccessBlockedTakesPriorityOverLoggedOutpins the ordering, andtestClearingAccessBlockedReturnsToLoginViewpins the way back.On the copy
The screen carries its own text rather than displaying the service's message. That message is a single sentence written for an API consumer and does not say what to do next. The consequence is that the dates on the screen are product copy from the public announcement, not values reported by the service, so they will not follow the service if it changes its cutoff. Same trade-off accepted in the VS Code and JetBrains screens.
Eclipse's other error states (
ReauthenticateView,LspStartUpFailedView) are SWTCallToActionViews rather than webviews, so this screen follows that pattern instead of reproducing the richer card layout used in the two webview-based IDEs. The information is the same; the presentation is native.Testing
mvn -B packageon Corretto 17 — BUILD SUCCESS, 508 tests, 0 failures, including 7 new classifier tests (routed envelope, plain id, lookalike title ignored, missing id, null params, malformed base64, absent content) andViewRouterTestat 14/14 with the 2 new routing tests.Note for anyone reproducing locally: on JDK 26 the whole suite errors out with
Mockito cannot mock this class ... Activator, because Mockito 5.14's inline mock maker cannot instrument that JVM. Build on 17.Not included
Telemetry for block detection, matching the deferral agreed for the other two clients.