-
Notifications
You must be signed in to change notification settings - Fork 749
feat(core): Add new auth class using flare identity server for Amazon Q #6958
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
feat(core): Add new auth class using flare identity server for Amazon Q #6958
Conversation
|
|
/runIntegrationTests |
justinmk3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this change eliminates any part of packages/amazonq/src/lsp/auth.ts, it will be helpful to see those changes as part of this same PR, makes the "delta" obvious
This change replaces the entire |
justinmk3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any extra insight, based on your own discoveries while developing this, that you can add to the class docstrings?
8777084
into
aws:feature/amazonqLSP-auth
## Problem The [first version](#6958) of migration of all auth for vscode to Flare using the identity server did not support the recently introduced RegionProfileManager ## Solution These code changes bring back the RegionProfileManager functionality, in the new auth setup. Integration tests and unit tests to be fixed after all references are updated in a follow-up PR to keep the changes manageable. **CI is expected to fail**. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
…zon Q (#7062) ## Problem The business logic of auth-related features is complex and implemented separately for all IDEs. Flare/DEXP LSP server has implemented auth that can be reused for all IDEs. The source code was introduced, but not yet instantiated upon activation. Follow up for #6958 ## Solution * Remove `"amazonqLSP"` experiment flag * Have [regionProfileManager.ts](https://github.com/aws/aws-toolkit-vscode/pull/7062/files#diff-f5716036a70a8b212e9dae829ec09e33731f181c173a3f2b9ad9d361d51af14b) depend on `authProvider` through `IAuthProvider` interface to remove circular dependency with `AuthUtil` * Deprecate `getChatAuthState()` API in favor of new `getAuthState()` * Instantiate and activate LSP client and new AuthUtil instance NOTE: CI is expected to fail, since the reference updates for AuthUtil in the rest of code and unit tests have not been committed yet --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Justin M. Keyes <[email protected]>
…dentity server for Amazon Q (#7088) ## Problem The business logic of auth-related features is complex and implemented separately for all IDEs. Flare/DEXP LSP server has implemented auth that can be reused for all IDEs. The source code was introduced already introduced in #6958 with activation and client updates in #7062. But the references to `AuthUtil` through the codebase weren't updated yet. ## Solution * Update all remaining references to `AuthUtil` in the codebase * All `toolkits` unit tests are passing * Disable telemetry and existing AuthUtil unit tests, to be updated in follow-up PR * `amazonq` and `web` unit tests still failing, to be addressed in follow-up PR **Note that CI is expected to fail for amazonq and web unit tests** --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Justin M. Keyes <[email protected]>
Problem
The business logic of auth-related features is complex and implemented separately for all IDEs. Flare/DEXP LSP server has implemented auth that can be reused for all IDEs.
Solution
This PR is the first in a set of PRs to migrate all auth for vscode to Flare, leveraging their identity server
Components
auth2file with all logic to connect to Flare for SSO-related auth.Testing
This PR includes unit tests. The current full implementation is tested manually and can be found here: https://github.com/opieter-aws/aws-toolkit-vscode/tree/wip/amazonqLSP-auth
When the auth code is complete, we will conduct a bug bash before release.
NOTE: integration tests are failing, since this PR only contains the source code change of
AuthUtil.ts, and not yet all reference changes. This is to keep the PR manageable. Follow up PR will contain reference changes (~90 files).feature/xbranches will not be squash-merged at release time.