mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-07 08:08:55 +00:00
Push mode and sign key adjustments for native mode
This commit is contained in:
@@ -467,14 +467,14 @@ export async function signSshKey(
|
|||||||
const validFor = 300n;
|
const validFor = 300n;
|
||||||
expiresIn = Number(validFor); // seconds
|
expiresIn = Number(validFor); // seconds
|
||||||
|
|
||||||
const cert = signPublicKey(caKeys.privateKeyPem, publicKey, {
|
cert = signPublicKey(caKeys.privateKeyPem, publicKey, {
|
||||||
keyId: `${usernameToUse}@${resource.niceId}`,
|
keyId: `${usernameToUse}@${resource.niceId}`,
|
||||||
validPrincipals: [usernameToUse, resource.niceId],
|
validPrincipals: [usernameToUse, resource.niceId],
|
||||||
validAfter: now - 60n, // Start 1 min ago for clock skew
|
validAfter: now - 60n, // Start 1 min ago for clock skew
|
||||||
validBefore: now + validFor
|
validBefore: now + validFor
|
||||||
});
|
});
|
||||||
|
|
||||||
const messageIds: number[] = [];
|
messageIds = [];
|
||||||
for (const siteId of siteIds) {
|
for (const siteId of siteIds) {
|
||||||
// get the site
|
// get the site
|
||||||
const [newt] = await db
|
const [newt] = await db
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ export type GetUserResourcesResponse = {
|
|||||||
domain: string;
|
domain: string;
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
protected: boolean;
|
protected: boolean;
|
||||||
mode: string;
|
ode: string;
|
||||||
}>;
|
}>;
|
||||||
siteResources: Array<{
|
siteResources: Array<{
|
||||||
siteResourceId: number;
|
siteResourceId: number;
|
||||||
|
|||||||
@@ -196,6 +196,7 @@ function querySiteResourcesBase() {
|
|||||||
disableIcmp: siteResources.disableIcmp,
|
disableIcmp: siteResources.disableIcmp,
|
||||||
authDaemonMode: siteResources.authDaemonMode,
|
authDaemonMode: siteResources.authDaemonMode,
|
||||||
authDaemonPort: siteResources.authDaemonPort,
|
authDaemonPort: siteResources.authDaemonPort,
|
||||||
|
pamMode: siteResources.pamMode,
|
||||||
subdomain: siteResources.subdomain,
|
subdomain: siteResources.subdomain,
|
||||||
domainId: siteResources.domainId,
|
domainId: siteResources.domainId,
|
||||||
fullDomain: siteResources.fullDomain,
|
fullDomain: siteResources.fullDomain,
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ type Resource = {
|
|||||||
domain: string;
|
domain: string;
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
protected: boolean;
|
protected: boolean;
|
||||||
mode: string; // "http", "tcp", "udp", "rdp", "vnc", "ssh"
|
// mode: string; // "http", "tcp", "udp", "rdp", "vnc", "ssh"
|
||||||
// Auth method fields
|
// Auth method fields
|
||||||
sso?: boolean;
|
sso?: boolean;
|
||||||
password?: boolean;
|
password?: boolean;
|
||||||
|
|||||||
Reference in New Issue
Block a user