mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-18 10:12:55 +02:00
Fix target pulling still being private
This commit is contained in:
@@ -7,6 +7,7 @@ export async function logAccessAudit(data: {
|
||||
type: string;
|
||||
orgId: string;
|
||||
resourceId?: number;
|
||||
siteResourceId?: number;
|
||||
user?: { username: string; userId: string };
|
||||
apiKey?: { name: string | null; apiKeyId: string };
|
||||
metadata?: any;
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
/*
|
||||
* This file is part of a proprietary work.
|
||||
*
|
||||
* Copyright (c) 2025-2026 Fossorial, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This file is licensed under the Fossorial Commercial License.
|
||||
* You may not use this file except in compliance with the License.
|
||||
* Unauthorized use, copying, modification, or distribution is strictly prohibited.
|
||||
*
|
||||
* This file is not licensed under the AGPLv3.
|
||||
*/
|
||||
|
||||
export * from "./getBrowserTarget";
|
||||
@@ -17,13 +17,8 @@ import * as orgIdp from "#private/routers/orgIdp";
|
||||
import * as billing from "#private/routers/billing";
|
||||
import * as license from "#private/routers/license";
|
||||
import * as resource from "#private/routers/resource";
|
||||
import * as ws from "@server/routers/ws";
|
||||
import * as browserTarget from "#private/routers/browserGatewayTarget";
|
||||
|
||||
import {
|
||||
verifySessionUserMiddleware,
|
||||
verifyUserFromResourceSessionMiddleware
|
||||
} from "@server/middlewares";
|
||||
import { verifySessionUserMiddleware } from "@server/middlewares";
|
||||
|
||||
import { internalRouter as ir } from "@server/routers/internal";
|
||||
|
||||
@@ -45,11 +40,3 @@ internalRouter.post(
|
||||
internalRouter.get(`/license/status`, license.getLicenseStatus);
|
||||
|
||||
internalRouter.get("/maintenance/info", resource.getMaintenanceInfo);
|
||||
|
||||
internalRouter.get(
|
||||
"/ws/round-trip-message/:messageId",
|
||||
verifyUserFromResourceSessionMiddleware,
|
||||
ws.checkRoundTripMessage
|
||||
);
|
||||
|
||||
internalRouter.get("/resource/browser-target", browserTarget.getBrowserTarget);
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* This file is part of a proprietary work.
|
||||
*
|
||||
* Copyright (c) 2025-2026 Fossorial, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This file is licensed under the Fossorial Commercial License.
|
||||
* You may not use this file except in compliance with the License.
|
||||
* Unauthorized use, copying, modification, or distribution is strictly prohibited.
|
||||
*
|
||||
* This file is not licensed under the AGPLv3.
|
||||
*/
|
||||
|
||||
import { build } from "@server/build";
|
||||
import { startRemoteExitNodeOfflineChecker } from "./routers/remoteExitNode";
|
||||
import { startExitNodeReconnectScheduler } from "./routers/remoteExitNode/exitNodeReconnectScheduler";
|
||||
|
||||
-13
@@ -1,16 +1,3 @@
|
||||
/*
|
||||
* This file is part of a proprietary work.
|
||||
*
|
||||
* Copyright (c) 2025-2026 Fossorial, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This file is licensed under the Fossorial Commercial License.
|
||||
* You may not use this file except in compliance with the License.
|
||||
* Unauthorized use, copying, modification, or distribution is strictly prohibited.
|
||||
*
|
||||
* This file is not licensed under the AGPLv3.
|
||||
*/
|
||||
|
||||
import { Request, Response, NextFunction } from "express";
|
||||
import { z } from "zod";
|
||||
import { db, resources, targets } from "@server/db";
|
||||
@@ -1 +1,2 @@
|
||||
export * from "./types";
|
||||
export * from "./getBrowserTarget";
|
||||
|
||||
@@ -13,6 +13,8 @@ import {
|
||||
verifySessionUserMiddleware,
|
||||
verifyUserFromResourceSessionMiddleware
|
||||
} from "@server/middlewares";
|
||||
import * as ws from "@server/routers/ws";
|
||||
import * as browserTarget from "@server/routers/browserGatewayTarget";
|
||||
|
||||
// Root routes
|
||||
export const internalRouter = Router();
|
||||
@@ -71,3 +73,11 @@ internalRouter.use("/badger", badgerRouter);
|
||||
badgerRouter.post("/verify-session", badger.verifyResourceSession);
|
||||
|
||||
badgerRouter.post("/exchange-session", badger.exchangeSession);
|
||||
|
||||
internalRouter.get("/resource/browser-target", browserTarget.getBrowserTarget);
|
||||
|
||||
internalRouter.get(
|
||||
"/ws/round-trip-message/:messageId",
|
||||
verifyUserFromResourceSessionMiddleware,
|
||||
ws.checkRoundTripMessage
|
||||
);
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
Resource,
|
||||
SiteResource
|
||||
} from "@server/db";
|
||||
import { logAccessAudit } from "#private/lib/logAccessAudit";
|
||||
import { logAccessAudit } from "#dynamic/lib/logAccessAudit";
|
||||
import response from "@server/lib/response";
|
||||
import HttpCode from "@server/types/HttpCode";
|
||||
import createHttpError from "http-errors";
|
||||
@@ -32,7 +32,7 @@ import { canUserAccessResource } from "@server/auth/canUserAccessResource";
|
||||
import { canUserAccessSiteResource } from "@server/auth/canUserAccessSiteResource";
|
||||
import { signPublicKey, getOrgCAKeys } from "@server/lib/sshCA";
|
||||
import config from "@server/lib/config";
|
||||
import { sendToClient } from "#private/routers/ws";
|
||||
import { sendToClient } from "#dynamic/routers/ws";
|
||||
import { ActionsEnum } from "@server/auth/actions";
|
||||
import type { SignSshKeyResponse } from "@server/routers/ssh/types";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user