mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Block shell websocket connections from non-lens renderers (#4285)
* Block shell websocket connections from non-lens renderers Signed-off-by: Sebastian Malton <sebastian@malton.name> * Add IPC based authentication tokens Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix race condition on tab start Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
a399b8ee20
commit
c09a57370e
6 files changed
+89
-40
No files matched your search
+3
-2
@@ -63,7 +63,7 @@ import { ensureDir } from "fs-extra";
|
||||
import { Router } from "./router";
|
||||
import { initMenu } from "./menu";
|
||||
import { initTray } from "./tray";
|
||||
import { kubeApiRequest, shellApiRequest } from "./proxy-functions";
|
||||
import { kubeApiRequest, shellApiRequest, ShellRequestAuthenticator } from "./proxy-functions";
|
||||
import { AppPaths } from "../common/app-paths";
|
||||
|
||||
injectSystemCAs();
|
||||
@@ -122,7 +122,7 @@ app.on("second-instance", (event, argv) => {
|
||||
WindowManager.getInstance(false)?.ensureMainWindow();
|
||||
});
|
||||
|
||||
app.on("ready", async () => {
|
||||
app.on("ready", async () => {
|
||||
logger.info(`🚀 Starting ${productName} from "${AppPaths.get("exe")}"`);
|
||||
logger.info("🐚 Syncing shell environment");
|
||||
await shellSync();
|
||||
@@ -134,6 +134,7 @@ app.on("ready", async () => {
|
||||
registerFileProtocol("static", __static);
|
||||
|
||||
PrometheusProviderRegistry.createInstance();
|
||||
ShellRequestAuthenticator.createInstance().init();
|
||||
initializers.initPrometheusProviderRegistry();
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user