* Rename old "quick input" to the current "command bar" feature name
* Remove 'Droid Sans Fallback' from Linux fonts
* Add docs for config
* Link to the proper documentation section
* Apply suggestions from @ravicious and @ibeckermayer
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
Co-authored-by: Isaiah Becker-Mayer <isaiah@goteleport.com>
* Adjust property descriptions with the names used in User Interface
* Drop `Courier New`
* Simplify `$schema` description
* Fix lint issues
* Add a break line after each heading
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
* Schema should not be modified
* Config file is created on first launch
---------
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
Co-authored-by: Isaiah Becker-Mayer <isaiah@goteleport.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
* Add GetType() to Plugin
* Add Plugins feature flag to web
* Run prettier
* Update e_imports.go with slack plugin subpackage
Respective enterprise changes imports a new subpackage,
which pulls new dependencies.
* Expose `openConfigFile` IPC
* Add "Open Config File" to `NavigationMenu`
* Make `NavigationMenu` more concise
* Remove unused imports
* Call "three dots" menu "More Options" to make it easier to refer to in the docs
* Show a notification with a config file path
* Render the icon component only in `NavigationItem`
* Render the separator only with access request items
* Use just `separator` string instead of an object
* Render `StyledListItem` as a button
* Shorten the notification
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
---------
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
* Fix uncaught exception handling in Connect's shared process
Without this patch, an uncaught exception being thrown would result in
the following error due to how binding methods to class instances works:
C:\Users\rav\AppData\Local\Programs\teleport-connect\resources\app.asar\
build\app\dist\main\sharedProcess.js:73614
this.getLogger().error(message, ...args);
^
TypeError: this.getLogger is not a function
at process.error (C:\Users\rav\AppData\Local\Programs\teleport-connect\
resources\app.asar\build\app\dist\main\sharedProcess.js:73614:10)
at process.emit (node:events:513:28)
at process._fatalException (node:internal/process/execution:167:25)
* Log the origin of the uncaught exception
* Filter version alerts out of the alerts list
* Use constants to alert names
* Update test
* Addres code review comment
* Use afterEach to undo cfg change
* Add a function that returns error that might happen during loading the file
* Return validation and file loading errors from `ConfigService`
* Discard file storage updates when the file was not loaded correctly
* Do not show usage reporting dialog when the file was not loaded correctly
* Make title of notifications a little bit smaller, so longer titles do not look weird
* Get rid of sync fs functions wherever possible in file storage
* Move error handling code to `createFileStorage`
* Improve `getConfigError` comment
* Rename `discardUpdatesWhenLoadingFileFailed` to `discardUpdatesOnLoadError`
* Fix the error message in `notifyAboutConfigErrors`
* Revert "Make title of notifications a little bit smaller, so longer titles do not look weird"
* Make `writeSync` async too
* Return `unknown` from `FileStorage.get`
* Add a TODO comment about createFileStorage type
* Add "the" to "Using default config instead"
* Remove `toString()`
---------
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
* Define new endpoints and request fields
- Add MFA response field for test connection reqs
- Define new types for checking if MFA is required
* Implement logic to check if MFA is required
* Add MFA dialog to test connectors
Adds a new function field for ReAuthenticate dialog
that just returns the MFA response
* Update storybook
* Change json field names as a result of backend CR
* Address CRs
* Address CR 2
* Connect: Remove leftovers from resource cache removal
* GetAll* RPCs were used in the resource cache and are no longer used.
* ListApps was pretty much never actually used as we didn't ever list apps
in Connect.
* ClusterContext.state.searchValue ceased to be used after we moved to
fetching resources from the backend.
* Remove remaining leftovers from tshd client mock
* Remove unused imports
* Rename `putAllSync` to `writeSync`
* Extend `FileStorage` with functions to replace an entire state and return file path used to create it
* Add `updateJsonSchema` function
* Generate schema for the app config
* Always return a string from `createMockFileStorage().getFilePath()`
* Add missing license headers
* Rename 'teleport_connect_config_schema.json' to 'schema_app_config.json'
* Rename `getKeyboardShortcutDescription` to `getShortcutDesc`
* Rename `keyboardShortcutSchema` to `shortcutSchema`
* Update a valid shortcut message
* Rename `configJsonSchemaFile` to `jsonSchema`
* Simplify `updateJsonSchema`
* Set `$refStrategy` to none
* Add missing description for `usageReporting.enabled`
* Bump zod to the latest (improves TS performance)
* Move `configService` implementation to `configStore`
* Rename `configStore` to `configService`
* Move `updateJsonSchema` to `createConfigService`
* Move `validateStoredConfig` outside `createConfigService`
* Rename `createAppConfigSchema.ts` to `appConfigSchema.ts`, `getKeyboardShortcutSchema.ts` to `keyboardShortcutSchema.ts`
* Export `createKeyboardShortcutSchema`
* Add license header
* update storybook dependencies to resolve some dependabot issues.
* remove config that's already set to the default
* Resolve prettier issues after dep update.
* Pin x-default-browser version to resolve dependabot vulnerability.
* Use event.code for non A-z keys
Without this fix, shortcuts like "Shift+1" can't work, because the reported character is "!".
* Add Zod schema to validate keyboard shortcuts
* Render better formatted error notification, add a link to docs
* Notify about duplicated accelerators
* Improve the error message for re-parsing failure (it can happen when a default value does not pass validation)
* A bunch of renames
* Allow spaces in accelerators
* Rename `isContentAnObject`
* Allow `Notification` to render links and lists
* Split by optional whitespace and "+"
* Allow lowercase letters
* Require a modifier for non-function keys
* Move VALID_SHORTCUT_MESSAGE to `initUi`
* Always return from `getDuplicateAccelerators`
* Use 'Cmd' and 'Ctrl' for mac
* Add comments
* Fix notification not rendering content
* Add more comments, rename `getKeyCode` to `getKeyName`
* Fix incorrect size of <Link> text
* Remove "expected" prefix
* Revert `typeof content === 'object'` in `Notification`
* Remove a comment about disabled keys in `ConfigService`, add a note about `keymap.` prefix
* Improve `getKeyName` comment
* Extract an inline object to a variable in `getKeyName`
* Fix notification list padding
* Change text for doc link & description for config error
* Improve comment for `getKeyName`
* Remove special formatting for list === 1 in `Notification`
* Print valid modifiers
* Call `getKeyboardShortcutSchema()` once
* Collect issues from all validations, run `invalidModifiers` through a set
* Change error message for `missingModifierIssue`
* Convert duplicates warning to error
* Define ALLOWED_KEY_CODES in a more concise way
* Support both `IntlBackslash` and `Backquote`
* Restore modifiers for mac to full spelling, sort them in order recommended by platform guidelines
* Fix old comment about the shortcuts order
---------
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
* Make naming around keyboard shortcuts more consistent
Previously, we used words like: "key", "type", "shortcut" which were really confusing (and I wrote this code), because it was hard to tell what exactly they describe.
From now, we will use only "accelerator" (borrowed from Electron) and "action" words.
For example, in a shortcut "Command+1": "tab-1":
- "Command+1" is "accelerator"
- "tab-1" is "action"
* Use "+" instead of "-" as a separator
With "-" we are not able to use this symbol as a valid key code.
* Rename some config keys to follow the same naming pattern
* Rename keyboard shortcuts to match config keys
* Extract `mapAcceleratorsToActions` to a function
* Rename other "keyboard shortcuts" to "accelerators" and "actions"
* Add in SAML IdP service provider session metadata to auth attempts.
The SAML IdP auth attempt event now contains SAML IdP service provider,
which will allow the audit logs to display which service provider the user
is attempting to log into.
Additionally, a shortcut name has been added to the SAML IdP service provider
metadata to handle auth attempts where the service provider could not be found
given a shortcut name.
* Linting fix.
* Modify the auth attempt audit log entries.
* SAML IdP audit events.
SAML IdP audit events have been added. These events have been added to the UI
for proper rendering. Additionally, service provider events will be emitted
when managing service providers.
* Align the naming more with the existing events.
* Zac's feedback.
* Add in delete all event.
* Fix typo.
* Update story snapshot.
* Linting and test fixes.
* Audit auth failures.
* Removing the nopermissions test, as it's covered in the regular create test.
* services.usagereporter to lib/usagereporter/teleport
* teleterm/daemon/usagereporter to usagereporter/daemon
* usagereporter/daemon type aliases
* Move UsageAnonymizable newtypes in a separate file
* DiscardUsageReporter should be passed by value
* Type renames in usagereporter/teleport
* Move audit event to usage event conversion to lib/usagereporter
* package import renames
* Don't break the e build for now
* move web usage report events to lib/usagereporter
* forgot license blurb
* lib/usagereporter/discover.go to types_discover.go
* Add UiConfig option to proxy service config
* Add uiConfig to GRV_CONFIG window object and use in terminal constructor
* Update configuration reference docs
* Remove extra structs and change property to scrollbackLines
* Update web/packages/teleport/src/config.ts
Co-authored-by: Jeff Pihach <hatched@users.noreply.github.com>
* Use a common struct and apply in applyProxyConfig
* Remove webclient dependency for fileconf
* Add missing doc comments
* Set individual properties of cfg.Proxy.UI
* Remove unneeded comment
* Add nolint rule
* Fix nolint
* Add test for UIConfig
* Cleanup tests
* Fix TestUIConfig context
* Allow dynamic config for web ui (#22097)
* Update protofiles
---------
Co-authored-by: Jeff Pihach <hatched@users.noreply.github.com>
* Connect: Remove resource cache
This commit refactors parts of the Electron app which still depend on
the resource cache, that is cluster sync and `tsh ssh` executed from the
command bar.
A number of adjustments has been made to executing `tsh ssh` from the
command bar, namely the logic of resolving the hostname has been moved
from the command launcher to useDocumentTerminal. The UI was also
adjusted to allow the user to reconnect to an SSH server if resolving
the hostname fails. This has a nice benefit of also allowing them to
retry if the PTY couldn't be created for some reason.
---
Before gravitational/webapps#1307, Connect was pulling all resources
from the cluster on app start and cluster login. Then it'd show them to
you in tables if you opened a new tab with cluster resources. There were
at least two problems with this approach:
1. It was slow for big clusters as pagination, filtering and sorting
were all done client-side and blocked the main thread.
2. It wasn't possible to implement advanced search unless we copied the
implementation from the backend to tshd.
gravitational/webapps#1307 made it so that instead of depending on that
resource cache to show resource tables, Connect would pull paginated
resources from the backend.
However, the resource tables were not the only part of the app depending
on that cache. Due to time constraints, we weren't able to refactor all
of them. We managed to refactor autocomplete (gravitational/webapps#1406)
and the remaining places are listed in #21800.
This PR refactors those remaining places to not use the cache by either
not depending on resource details or by making a call to the proxy
instead.
* Add missing license
* Removes desktop logins from the ACL and adds them to each Desktop resource
as returned to the frontend. This behavior parallels what's currently being
done with other similar resources such as Nodes, and fixes a bug where
users were able to see all the logins permitted by their roles on every
desktop "connect" dropdown, even if the role permitting that login didn't
apply to a given desktop.
* Extracts common logic out of GetWindowsDesktopLogins (now GetAllowedWindowsDesktopLogins), uses it to create a GetAllowedServerLogins as well, tests both of them together, removing EnumerateServerLogins
* reduce unnecessary looping by using maps
* fixes flakiness by sorting lists
* uses require.ElementsMatch rather than manually sorting lists
* consolidates duplicated logic
* Consolidates separate server and desktop logic into a single GetAllowedLoginsForResource
* fixes tests
* fixes import order and test
Without this early return, createPtyProcess of PtyHostService would call
the callback twice on error. This doesn't have much negative implications
since the gRPC implementation will simply ignore the second call, however
it does pose some problems when trying to manually test PTY failures
by making `new PtyProcess` return an error.
* Remove sans serif from config
* Pass 'fonts.monoFamily' as style prop
* Get rid of `getSansSerif` function
* Use mono font from theme
* Add 'terminal.fontFamily' and 'terminal.fontSize' config options
* Require 'terminal.fontSize' size to be int
* Revert unneeded changes to mono font usage
* Add comment with a link to `ctrl.ts`
* Allow 'terminal.fontSize' to be in the range 1-256
Update the helm chart for kube-agent.
The image swap logic was already there.
Update the UI to include `enterprise: <isEnterprise>` when installing
the kube-agent.
* Create new local util lib to replace lodash.
* Replace usage of isInteger and debounce from lodash with highbar.
* Create isObject and runOnce utility methods.
* remove use of at, isObject, and once lodash method usage.
* remove map and transform lodash calls.
* Add memoize function to highbar.
* remove memoize lodash usage.
* remove merge and isEqual lodash methods and update other missing refs to highbar.
* convert the throttle to debounce.
* add throttle method to highbar.
* use the new throttle method instead of debounce where necessary.
* Add mergeDeep function for init config merge.
* remove lodash from the build process.
* Fix introduced bug in workspacesService.
* Added tests for highbar mergeDeep and expanded its functionality to support arrays.
* review updates.
* Added types to mergeDeep function.
* Add missing MapCache prototype methods.
* Add license notices, types and missing hash code.
* First pass at compare an array objects function.
* use new compareArrayObjs fn
* Add missing not
* Added types to arrayObjectIsEqual
* Add tests for arrayObjectIsEqual and fix some edge case bugs.
* update util fn name
Change the text on the MFA dialog to be less alarming.
Additionally, focus the OK button by default, so that users can
press enter to go straight to the MFA prompt without manually
clicking a button.
Closes#19042
* Update teleterm README
* Remove the Usage section in favor of linking to the docs.
* Mention that the OSS build is broken.
* Remove post-webapps-merge inconsistencies.
* Remove "Gravitational", align teleterm desc with teleport