Commit graph

1313 commits

Author SHA1 Message Date
Tiago Silva b8118731cf
Fix listing servers when creating a new lock via webui (#28950)
This PR fixes the property `value` used by Servers when listing
connected nodes. The value was incorrectly switched from `node` to
`server_id` by mistake which crashed the list of Servers.

This regression was introduced in #27395.

Fixes #28948
2023-07-11 17:58:59 +00:00
Bartosz Leper 800e79b113
Add an audit event for creating provisioning tokens (#28769)
* Add a provision token creation event on the backend

* Support provision token creation audit event on frontend

* Modify the deprecated GenerateToken function

Also:
* Add some missing tests.
* Add error logging in emitTokenEvent().
* Fix lint errors.

* Fix import order

* Address review comments

* Fix final review comments, add docs

* Fix the broken test

* Revert "Fix the broken test"

This reverts commit e1b8d2e640.

* Properly fix emitting duplicated events
2023-07-11 12:21:26 +00:00
Sakshyam Shah 072519b3e2
supports newline and whitespace in motd: (#28747)
dquote> - renders vertical scrollbar for longer message
dquote> - caps width to 600px, height to 500px
2023-07-11 11:06:21 +00:00
Ryan Clark 116c5dab06
[Assist] Only parse messages from Assist as markdown (#28899)
* Only parse messages from Assist as markdown

* Move markdown into a separate component & disable images

* Update Markdown.tsx
2023-07-10 16:33:36 +00:00
Lisa Kim f6938613d2
WebDiscover: Finish auto deploy screen (iam configure script) (#28621)
* Define the return type

* Add endpoint for config script

* Store the entire integration object instead of just the name

* Build the correct script string, renames, emit event

* Enable auto deploy as default

* Fix script endpoint and update story

* Add regex check, update story

* Touch ups, add test

* Address CR

* Remove sudo from bash command

* Make into ui friendly object
2023-07-10 15:09:03 +00:00
dependabot-batcher[bot] c6529af658
Batched Dependabot updates (#28863)
* Bump @grpc/grpc-js from 1.6.7 to 1.8.8

Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.6.7 to 1.8.8.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.6.7...@grpc/grpc-js@1.8.8)

---
updated-dependencies:
- dependency-name: "@grpc/grpc-js"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc from 1.43.0 to 1.53.0 in /examples/go-client

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.43.0 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.43.0...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc in /examples/desktop-registration

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.52.3 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.52.3...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump tough-cookie from 4.1.2 to 4.1.3

Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/oauth2 from 0.9.0 to 0.10.0

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/sashabaranov/go-openai from 1.12.0 to 1.13.0

Bumps [github.com/sashabaranov/go-openai](https://github.com/sashabaranov/go-openai) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/sashabaranov/go-openai/releases)
- [Commits](https://github.com/sashabaranov/go-openai/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: github.com/sashabaranov/go-openai
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump k8s.io/apiextensions-apiserver from 0.27.2 to 0.27.3

Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.27.2 to 0.27.3.
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases)
- [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.27.2...v0.27.3)

---
updated-dependencies:
- dependency-name: k8s.io/apiextensions-apiserver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/bufbuild/connect-go from 1.7.0 to 1.9.0

Bumps [github.com/bufbuild/connect-go](https://github.com/bufbuild/connect-go) from 1.7.0 to 1.9.0.
- [Release notes](https://github.com/bufbuild/connect-go/releases)
- [Commits](https://github.com/bufbuild/connect-go/compare/v1.7.0...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/bufbuild/connect-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/aws/aws-sdk-go-v2/service/sqs from 1.22.0 to 1.23.2

Bumps [github.com/aws/aws-sdk-go-v2/service/sqs](https://github.com/aws/aws-sdk-go-v2) from 1.22.0 to 1.23.2.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.22.0...service/ecs/v1.23.2)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sqs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/aws/aws-sdk-go-v2/service/glue from 1.53.0 to 1.54.0

Bumps [github.com/aws/aws-sdk-go-v2/service/glue](https://github.com/aws/aws-sdk-go-v2) from 1.53.0 to 1.54.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ec2/v1.53.0...service/ec2/v1.54.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/glue
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.35.0 to 1.36.0

Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.35.0 to 1.36.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.35.0...service/s3/v1.36.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/s3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/oauth2 from 0.9.0 to 0.10.0 in /assets/backport

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump cloud.google.com/go/iam from 1.1.0 to 1.1.1

Bumps [cloud.google.com/go/iam](https://github.com/googleapis/google-cloud-go) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/documentai/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/dlp/v1.1.0...iam/v1.1.1)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/iam
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc from 1.56.1 to 1.56.2 in /api

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.1 to 1.56.2.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.56.1...v1.56.2)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/oauth2 from 0.9.0 to 0.10.0 in /build.assets/tooling

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/aws/aws-sdk-go-v2/service/ec2 in /assets/aws

Bumps [github.com/aws/aws-sdk-go-v2/service/ec2](https://github.com/aws/aws-sdk-go-v2) from 1.102.0 to 1.103.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ec2/v1.102.0...service/ec2/v1.103.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/ec2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* go mod tidy

* make grpc

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-batcher[bot] <122306277+dependabot-batcher[bot]@users.noreply.github.com>
Co-authored-by: Tim Ross <tim.ross@goteleport.com>
2023-07-10 15:07:46 +00:00
Noah Stride 6122933e68
Machine ID: Add guides to the Enroll Integration page (#28646)
* First pass at adding buttons to the integrations page

* Add analytics events for clicking Machine ID enrollment tiles

* Run prettier

* Fix eslint complaints

* Push fixed icons

* Flatten the styling for the Jenkins logo

* Rearrange machine ID title code

* Remove logs from event processing

* Switch to coloured gitLab icon

* Use GitLabs proper name for CI/Cd

* Fix imports

* Further adjustments from PR

---------

Co-authored-by: Ryan Clark <ryan.clark@goteleport.com>
2023-07-10 13:27:52 +00:00
Justinas Stankevičius f71c2484e0
Assist: mark individual nodes as finished (#28477)
* Mark nodes as done when command finishes in Assist

* Split Close/CloseWithPayload

* Expect a close message before the summary in test

* Remediate confusing type usage in test

`Envelope` is the outer layer used (in protobuf format)
for execution / terminal sessions.

Meanwhile `outEnvelope` is the inner layer
used (in JSON) spefically with assist (execution),
when outer envelope is of "raw" type

Using `Envelope` where decoding `outEnvelope` in tests
previously worked "by accident" due to matching field names

* Assert that server ID is set in the close message

* Refactor command execution logic and adjust WebSocket handling

This commit changes how command execution and WebSocket handling are performed in the code. Instead of manually managing session close signals and command execution notifications via WebSocket, we have wrapped it into more easily manageable form.

Changed parts: assist and websocket libraries, test and several components of 'teleport'.

Why:
This allows cleaner command management and error handling, leading to more reliable and maintainable application. Also made code more readable and easy to understand. Made WebSocket more precise with its handling to prevent cases where stale or incorrect data might interrupt the session.

Details:
Instead of sending a close signal after all commands have been executed, we now send individual session end updates for each command. Sessions no longer remain active unnecessarily.

Message handling in command execution has been refactored for better error propagation.

All these changes were also adjusted and reflected in the associated test cases.
Also, names and types of various data structures are edited to reflect their actual usage.

* Change ServerID to NodeID to improve code consistency

This commit replaces occurrences of `ServerID` with `NodeID` across several files.
`ServerID` was misleading and causing confusion as it was serving as an identifier for nodes, so to improve comprehension and consistency in the codebase, all instances of `ServerID` have been replaced with `NodeID`. Tests have also been updated to reflect this change.

---------

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
2023-07-07 16:24:55 +00:00
Ryan Clark b204ebbe76
Fix theme not loading on first login & overflowing command result summary (#28702)
* Share styling between command result & summary

* Correctly override the theme preference with the legacy preference

* Update web/packages/teleport/src/services/localStorage/localStorage.ts

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2023-07-06 09:24:14 +00:00
Ryan Clark c1efc0409e
[Assist] Clear the refresh websocket timeout when closing Assist (#28610)
* Clear the refresh websocket timeout when closing Assist

* Missing semicolon to please prettier

* Add comment to remove once the new session implementation is done
2023-07-05 17:11:03 +00:00
Lisa Kim 31b66f0922
WebDiscover: Partially implement auto deploy database server view (#27924)
* Add new endpoint, types, update types

* Preserve user selected aws rds db

* Rename DownloadScript to ManualDeploy

- Remove duplicate test
- Use discover context instead of passed in props
- Rename util to common
- Move hasMatchingLabels to common.tsx for re-use

* Add another action button and pass autoFocus field

* Implement auto deploy screen

* Implement auto manual view toggler

* Update db view config

* Only allow back on user trait if user manually deployed agent

* Add TODO comment

* Address CRs

* Fix lint/test

* Address CRs

* Revert back to original flow

* Define type for service deploy method

* Address CR and revert a change

- aws field for database has to be empty if the
  result comes back empty. this field determines
  if the database is hosted by aws
- add a clarifying comment

* Remove optional rds field
2023-07-04 03:39:38 +00:00
Lisa Kim adabe847d5
Add custom component prop type for react-select (#28596)
* Add custom select comp type for react-select

* use tsdoc comment style
2023-07-03 20:07:34 +00:00
Michelle Bergquist 79754a325d
set onboarding survey on user preferences (#28530) 2023-07-03 17:43:06 +00:00
Ryan Clark 6569a69065
Remove console.log in AssistContext (#28607) 2023-07-03 16:41:17 +00:00
Michelle Bergquist 010076f356
Posthog event for onboarding questionnaire submit (#28328)
* update protos

* create Posthog event for onboarding questionnaire submit
2023-07-03 15:12:38 +00:00
Joel 490d9d6030
[Assist] Provide interactive updates during agent execution (#27893)
* send progress update messages during agent thoughts

* handle new output format

* define json tags for serialized fields

* use streaming api

* fan streaming from model loop

* fix streaming

* stream progress updates

* Update lib/assist/assist.go

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>

* remove useless mute

* nits

* Update lib/ai/model/agent.go

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>

* fix merge

* fix misc

* more misc fixes

* what

* what2

* weird eof errors?

* Fix tests UI integration

* Fix other tests

* Linter fixes

* Comment out token counting for assist streams to avoid race condition.

* Fix more tests

---------

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
2023-07-03 14:48:06 +00:00
Grzegorz Zdunek 3c4ed44a09
Connect My Computer: check permissions before showing in the UI (#28346)
* Move CMC icon and setup document to common `ConnectMyComputer` directory

* Add permissions to show CMC

* Use `cluster.leaf` to check if a cluster is a root cluster

* Rename `isConnectMyComputerPermittedForRootCluster` to `canUseConnectMyComputer`

* Add licenses

* Rename `DocumentSetup` to `DocumentConnectMyComputerSetup`

* Check `cluster.leaf` flag to verify if the cluster is a root cluster

* Do not throw in `canUseConnectMyComputer`

* Add comments

* Use the same field name in a documentation comment

* Use relative import
2023-07-03 08:14:11 +00:00
Alexander Klizhentas b3e83faead
Improve copy on the integrations page (#28111)
Removes happy text from the copy.
2023-07-02 22:16:43 +00:00
Lisa Kim b4d5297bc8
Web: Improve no access message and remove hard coded color (#28508)
* Provide a more actionable 'no access' message

* Replace hard coded color with theme defined color
2023-06-30 18:51:51 +00:00
Lisa Kim 7fca7f14a9
Web related tweaks for access request user groups (#28455)
* Enable muting tooltip info icon

* Require user group field

* Update snapshot as a result of changing css for tooltip

* Fix user group setting for UI

* Address CR
2023-06-30 18:16:48 +00:00
Ryan Clark cf23101efb
Add the UI for Assist's settings (#28413)
* Add the UI for Assist's settings

* Add typing

* Fix test by wrapping render in LayoutContextProvider

* Run prettier
2023-06-30 09:41:09 +00:00
Lisa Kim f6906f330e
Discover: Add deployed method field to deploy service event (#28336)
* Define a  deployed_method field to discover deploy event

* Add deployed_method field to expected events

* Add deployed method type and define its field when emitting event from web UI

* Address CR and add another field

* Address CR
2023-06-29 23:36:28 +00:00
matheus ff9ceb2d89
Change copy "Go To Dashboard" for "Go To Cluster" on new account screen (#28434)
* Replace dashboard for cluster unless it is a on-prem dashboard

* Add new tests and screenshots

* Revert e update
2023-06-29 16:01:45 +00:00
Ryan Clark 3b9053faae
Introduce user preferences (#28291)
* Add user preferences feature

* Add missing license header

* Fix the order of arguments to require.Equal

* Update lib/web/userpreferences.go

Co-authored-by: Michelle Bergquist <11967646+michellescripts@users.noreply.github.com>

* Add a `GetUserPreferencesResponse` message

* Remove unused logger

* Use .Put instead of .Create/.Update

* Add missing godoc

* trace.Wrap the happy path

---------

Co-authored-by: Michelle Bergquist <11967646+michellescripts@users.noreply.github.com>
2023-06-29 15:43:56 +00:00
Jakub Nyckowski c9bf80be65
Improve error handling and embedding prompts; fix typos (#28403)
* "Improve error handling and embedding prompts; fix typos"

This commit encompasses several changes. First, an error handling routine has been added in AssistContext.tsx to properly close a WebSocket connection and finish all results. The intent is to ensure that execution fails gracefully when a session doesn't end normally. In tool.go, user instructions have been made more explicit to ensure users check access to nodes before generating any commands. It warns them that not checking access will cause error. Also, some minor typos were corrected in agent.go and messages.go for better readability.

* "Refactor 'hosts' to 'nodes' in AI Tool Descriptions"

This commit refactors the language from 'host' terminology to 'node' terminology in the AI tool's generated responses as the LLM seems to be confused when generating queries with embeddings.

* Update expected test values in chat_test.go

The expected values in three different tests in chat_test.go have been updated. This change was required because the underlying algorithm has been adjusted and these modifications will keep the tests aligned with the current algorithm's behavior.
2023-06-29 14:41:39 +00:00
Grzegorz Zdunek 95996acb52
Add light & dark themes to YAML editor (#28378)
* Add data visualisation colors to theme

* Add YAML editor theme and use it

* Add new `ace-teleport` theme instead of overwriting `ace-monokai`

* In a standalone editor use `levels.sunken` background; when displayed inline, use `levels.deep`

* Remove unused component

* Remove custom class for `.ace-fold-widget` as it makes the folding arrow to always render in the "expanded" state
2023-06-28 16:55:59 +00:00
Hugo Shaka d386c422eb
ai: compute opportinistic summary of command execution (#28033)
* ai: compute opportinistic summary of command execution

* ai: add streaming summary back after rebase on new front-end

* Lint and fix tests pt.1

* reference nodes by name and add tests

* Lint, fix tests and address feedback

* Attempt to tame the stream close monster

* fixup! Attempt to tame the stream close monster

* [Assist] Do not close the WS after command execution (#28246)

* Revert "fixup! Attempt to tame the stream close monster"

This reverts commit 8537aa2163.

* Revert "Attempt to tame the stream close monster"

This reverts commit e0c861df40.

* Do not close the WS after command execution

* Fix tests and lint

* fixup! Fix tests and lint

* undo put web test command into constant

---------

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
2023-06-27 16:14:03 +00:00
Michelle Bergquist ec78da1f3f
Add onboarding questionnaire components (#27977) 2023-06-26 15:51:21 +00:00
Michael Wilson e62e786946
Add associated applications and user groups to UI objects. (#28084)
* Add associated applications and user groups to UI objects.

The user groups UI object will now contain the list of associated applications
and the applications UI object will contain the list of associated user
groups. This will be used to improve the access request experience for
Okta applications and user groups.

* UI linting.

* Correct type issues.

* Add friendly names/descriptions to the app/user group objects. Additionally add in tests for these.

* Correct permissions issues when querying for associated user groups and applications. Update UI types.

* Correct user_groups to userGroups in application object.

* GCI.
2023-06-26 14:42:09 +00:00
Lisa Kim b3b37f1480
Preserve applications original URL's query (#28099)
* Preserve original URL's query along with path

* Preserve space (URLSearchParam converts encoded space to +)

* Shift test into describe block

* Address CR: handle possible duplicate query path key

* Address CR
2023-06-23 18:07:25 +00:00
Grzegorz Zdunek c0a8691cef
Web terminal themes (#28022)
* Convert `Terminal` to a functional component

* Remove custom terminal theme values

* Add theme switching to the SSH terminal and player terminal

* Remove any custom styling

* Rename navigation item "Main" to "Home"

We don't have anything like "Main".

* Update snapshots
2023-06-22 14:35:09 +00:00
Grzegorz Zdunek 92a2e6cb24
Connect My Computer: Add a setup document and an icon in the top bar (#28063)
* Add Connect My Computer setup document and an icon in the top bar

* Use theme values

* Keep all CMC stories in the same group

* Remove `opts` type, use `RootClusterUri`

* Revert code-style changes
2023-06-22 09:17:25 +00:00
Rafał Cieślak ee79020332
Remove outdated comment from ClustersService (#28090)
syncClusterInfo has been making network requests ever since we made it
return details needed for access requests.
2023-06-21 14:21:11 +00:00
Grzegorz Zdunek 689f36b4ad
Connect: Add docs for theme (#28024)
* Add docs for Connect theme

* Move most commonly modified properties to the top
2023-06-20 16:47:34 +00:00
Grzegorz Zdunek 12204708e7
Connect: Make tabs shadows look better (#27931)
* Add bottom shadow for inactive tabs and inset for the active one

* Add shadow for new tab item by using common styling

* Adjust `KeyboardShortcutsPanel` to the light theme

* Center Servers/Databases/Kubes navbar vertically between tabs and table by using the same margin values (8px)

* Set title on the element that is dragged
2023-06-20 08:57:59 +00:00
Grzegorz Zdunek 0d28a44400
Fix Assist import so it does not break storybook (#28023)
* Fix `Assist` import path

* Fix `TopBar` story
2023-06-20 07:40:19 +00:00
Grzegorz Zdunek 453700e570
Connect: Fix overlapping placeholder and keyboard shortcut in the search bar (#28026)
* Fix overlapping placeholder and keyboard shortcut in the search bar

* Run prettier
2023-06-19 21:34:18 +00:00
Ryan Clark 876277feb0
Fix command output showing when running on multiple nodes (#27936) 2023-06-19 15:37:28 +00:00
Rafał Cieślak 5e836688f5
Reorder resource filters in the search bar (#28032) 2023-06-19 14:41:52 +00:00
Grzegorz Zdunek ca3411426a
Connect: Update Electron to 25.1 and TypeScript to 5.1 (#27837)
* Update Electron to 25.1, TypeScript to 5.1

* Use the same focusing mechanism on all platforms

* Use `role: about` in the app menu as Linux supports it

* Bump Electron to 25.1.1
2023-06-19 13:03:42 +00:00
Yassine Bounekhla 6be5d884e4
add saml wizard to ui (#27518) 2023-06-16 13:50:46 +00:00
Grzegorz Zdunek 95e6482043
Connect: Add theme configuration (#27788)
* Add a config item for the theme and adjust Electron's `nativeTheme` based on that

* Listen to theme changes and update the app accordingly

* React to theme changes in teleterm stories

* Rename channel

* Return boolean from handlers

* Do not mock the whole app context in storybook

* Fix linting issue

* Fix typo
2023-06-16 09:28:21 +00:00
Sakshyam Shah 1762c764ae
feat: adds motd to the ui (#27813)
* feat: adds motd to the ui

* address review suggestions:
- update MOTD to Motd
- moved motd state to useLogin
- added behaviour tests

* add motd test to apiserver_test.go webconfig. update snapshot test to address motd warning

* git mv to update MOTD to Motd

* multiple fix:
- add unmount test
- remove motd title
- group states together in useLogin
- update arrow func to classic js func

* remove unused waitForElementToBeRemoved
2023-06-16 02:43:17 +00:00
Michelle Bergquist b283530b16
design updates for team gated features (#27756)
* update designs for gated features

* remove Card bg where set to default

* update snapshots
2023-06-15 16:14:25 +00:00
Justinas Stankevičius cf08ae3d9b
Gracefully handle errors in Assist frontend (#27669) 2023-06-13 20:14:32 +00:00
Michael Wilson 1b3201a97c
Add the notion of friendly names to access request details. (#27495)
* At the notion of friendly names to access request details.

Access request details can now return friendly names. This will help display
access request resources in a way that allows easier reviewing of Okta apps
and user groups, where the names are not human readable.

* Use friendly name for nodes, tune variable names.

* Add in DetailsID helper function for use by the enterprise UI.

* Request apps instead of app servers, remove DetailsID as its no longer needed.

* Push friendly name into app and usergroup UI objects.

* Fix apps test.

* Linting.

* [Connect] Add FriendlyName to AccessRequest (#27694)

---------

Co-authored-by: Michael <michael.myers@goteleport.com>
2023-06-13 14:02:16 +00:00
Ryan Clark 0c75d71b6c
[Assist] New UI & rewrite (#27629)
* Rewrite Assist & implement a new UI

* Use the node name from the API

* Code review comments

* Address UI code review comments

* Add some tests for the service

* Rename "MiniAssit" to "Assist"

* Impose a max height for the floating assist for small windows

* Add missing license header

* Update web/packages/teleport/src/Assist/Conversation/ExecuteRemoteCommandEntry.tsx

Co-authored-by: Lisa Kim <lisa@goteleport.com>

* Code review improvements

* Only use stopPropagation so links still work and assist does not close

* Make errors only show when error message isn't null

* Add websocket refresh to avoid session expirations

* Mark the conversation as not streaming when assist returns a full message

* Improvements to error handling and icon spacing

* Use encodeChallengeResponse to match the MFA backend changes

* Run prettier

* Usability improvements

---------

Co-authored-by: Lisa Kim <lisa@goteleport.com>
2023-06-13 09:31:54 +00:00
Lisa Kim 0b2cef80bd
Add opsgenie static credentials check and test (#27655)
* Pass down form value name field to react selectable input

* Add opsgenie static validation check and test
2023-06-09 18:35:45 +00:00
dependabot[bot] 6c7e4221df
Bump vite from 4.2.0 to 4.2.3 (#27439)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.2.0 to 4.2.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.2.3/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.2.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-09 14:32:30 +00:00
rosstimothy 553eb02bdf
Fix moderated session presence checking (#25988)
* Fix moderated session presence checking

Addresses all of the issues that were preventing presence checking during
moderated sessions from working as described in
[#18092](https://github.com/gravitational/teleport/issues/18092#issuecomment-1540900859).

Closes #18092

* make presence test clearer

* fix presence checking on the web ui

* Refactor web socket message handling

A single message processing loop handles retrieving the envelope
and passing it off to individual message handlers. This allows all
messages to be processed outside of `Read` which was dependent on
the terminal being active to process any messages.

The webauthn challenge response was also moved from a raw message
to a webauthn message. By sending it as a raw message it made
presence checking fail because the response has a `t` in it which
caused the session to be killed during moderated sessions.

* enforce mfa ceremony when joining and cluster wide mfa is enabled

* fix conflicts with master

* moderated tests

* Add moderated session tests for the UI

* Add moderated session integration test

* fix lints

* clean up presence test

* refactor envelope handling

* fix build

* fix: revert test debug timeout

* fix: use local context in tests

* simplify closing streams

* generalize waitForOutput to work with an io.Reader

* fix error handling in stream close

* unexport PresenceOptions

* Improve waitForOutput to match against output in successive reads
2023-06-08 20:27:13 +00:00