Skip to content
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

[v13] Assist backport #27243

Merged
merged 23 commits into from Jun 3, 2023
Merged

[v13] Assist backport #27243

merged 23 commits into from Jun 3, 2023

Conversation

jakule
Copy link
Contributor

@jakule jakule commented Jun 1, 2023

Backport of all Assist's PR to v13.

@justinas
Copy link
Contributor

justinas commented Jun 2, 2023

Did basic validation of this and https://github.com/gravitational/teleport.e/pull/1399 in Cloud, seems to be working well.

@public-teleport-github-review-bot

@jakule - this PR will require admin approval to merge due to its size. Consider breaking it up into a series smaller changes.

Copy link
Collaborator

@r0mant r0mant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot.

jakule and others added 14 commits June 2, 2023 19:20
* Assist - API implementation

* Add Assistant CRUD test

* Move assistant API to a separate file.

* Rename GRPC methods
Fix comments

* Address PR comments

* Update GRPC API - addressing code review comments

* Move assist API to a new GRPC service

* Add Assistant RBAC rules to this backport.

* Add missing license

* Update comment.
* Move username and ID out of AssistantMessage

#25810 added username and conversation ID to AssistantMessage. They aren't needed inside the message and can be moved out of it.
This PR also fixes ` grpc: error while marshaling: proto: Marshal called with nil` in `CreateAssistantMessage`.

Note: It's safe to change protobuf numbers as this code hasn't been released or backported yet.

* Fix test

* make grpc
* Assist - Configuration and usage

* Add network config test

* Add config test

* Run GCI

* Address review comments
* Assist - OpenAI library port

* Add tests

* Address code review comments

* Added comment

* Partial backport of #26058

* Move AI messages to a new file

* Prevent blocking on error

* Add comments.
Fix typo
* Assist - Execution web endpoint

* Add test
Clean up code a bit

* Add missing username

* Address review comments

* Make more implementation shared between Terminal and Command Web Handlers

* Address review comments

* Address review comments

* Fixes after rebase
Add comments

* Add comments
Fix linter

* Add TELEPORT to Teleport related environment variable.
* Assist - Web endpoints

* GCI

* proto rpc

* enforce endpoint checks

* disable in ui if disallowed by auth

* add comment

* unwrap stack

* Refactor code

---------

Co-authored-by: Joel Wejdenstål <jwejdenstal@icloud.com>
Currently, after selecting a user for command execution in Teleport Assist the user can randomly change. This PR fixes this behavior.
* Add rate limiting to Assist

* Only rate limit Assist in Cloud

* Add a comment to assistantLimiter

* Fixes after rebase

* Add 'rate-limited' test case to assistant_test

* Handle CHAT_MESSAGE_UI in Assist web UI

* Add godoc

* CHAT_MESSAGE_UI -> CHAT_MESSAGE_ERROR

* Run assistant test cases in parallel
* Rename `ChatGPT` to `GPT4`

ChatGPT is a user friendly name, but is technically inaccurate.

* Apply suggestions from code review

Co-authored-by: Reed Loden <reed@goteleport.com>

* Lint fix

* Additional ChatGPT --> OpenAI GPT-4 fixes

---------

Co-authored-by: Reed Loden <reed@goteleport.com>
When Proxy is separate from Auth,
Proxy 'modules' will not contain meaningful data.
Instead, one must use ClusterFeatures fetched from the Auth server
jakule and others added 8 commits June 2, 2023 19:20
* Initial support for MFA in Assist

* UI webauth handler

* WebUI - WIP

* Run prettier

* Perform MFA ceremony only once.

* Cleanup JS

* Remove hacky WS logic

* Add cancel MFA logic
* Add parallel execution to assist.

* Extract execution logic to a new function.

* Add test

* Switch uber to std

* Address code review comments
* Fix display of Assist executions with empty output

* Lint

* Nit

* Improve display of commands that failed with code

* Address lint
* [Assist] Allow removing assist conversations

* Display landing page after the conversion is removed

* Improve styling and add a confirmation dialog

* Change the icon opacity to copy the main navigation

* Remove unused minus icon

* Add missing trace.wrap

---------

Co-authored-by: Ryan Clark <ryan.clark@goteleport.com>
@jakule jakule added this pull request to the merge queue Jun 2, 2023
Merged via the queue into branch/v13 with commit 11bd535 Jun 3, 2023
31 checks passed
@jakule jakule deleted the jakule/v13/assist-init branch June 3, 2023 00:15
@r0mant r0mant mentioned this pull request Jul 14, 2023
@fheinecke fheinecke mentioned this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants