-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move WebConfig from lib/web/ui to api/client/webclient
Web config was shared with the Web UI through the dynamically generated /web/config.js file available on the cluster. With the addition of Teleport Terminal (RFD 63), the Electron app needs to get a hold of this config as well. However, unlike the Web UI which directly loads the file and injects the config this way, any communication between the cluster and Teleport Terminal is done through the tsh daemon (RFD 63). The tsh daemon needs to essentially pipe this config from /web/config.js to the gRPC response it gives to Teleport Terminal. To achieve this, a GetWebConfig function was added to TeleportClient. Unfortunately, this breaks the build on Windows as lib/web (where WebConfig resides) includes code which is not meant to be compiled or run on Windows. Since we need to share the web config with another frontend application, it only makes sense to move it to the webclient package. We already have types shared between the server and the client there, for example the PingResponse struct.
- Loading branch information
Showing
5 changed files
with
23 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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