mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-12 18:37:20 +00:00
Be able to pull users from the proxy
This commit is contained in:
@@ -64,18 +64,23 @@ export default async function SshPage() {
|
||||
target = res.data.data;
|
||||
|
||||
if (target.pamMode === "push") {
|
||||
const { privateKeyPem, publicKeyOpenSSH } =
|
||||
generateEphemeralKeyPair();
|
||||
privateKey = privateKeyPem;
|
||||
const res = await priv.post<AxiosResponse<SignSshKeyResponse>>(
|
||||
`/org/${target.orgId}/ssh/sign-key`,
|
||||
{
|
||||
publicKey: publicKeyOpenSSH,
|
||||
resource: target.niceId
|
||||
}
|
||||
);
|
||||
signedKeyData = res.data.data;
|
||||
console.log("Received signed SSH key:", signedKeyData);
|
||||
try {
|
||||
const { privateKeyPem, publicKeyOpenSSH } =
|
||||
generateEphemeralKeyPair();
|
||||
privateKey = privateKeyPem;
|
||||
const res = await priv.post<AxiosResponse<SignSshKeyResponse>>(
|
||||
`/org/${target.orgId}/ssh/sign-key`,
|
||||
{
|
||||
publicKey: publicKeyOpenSSH,
|
||||
resource: target.niceId
|
||||
}
|
||||
);
|
||||
signedKeyData = res.data.data;
|
||||
console.log("Received signed SSH key:", signedKeyData);
|
||||
} catch (err) {
|
||||
console.error("Error signing SSH key:", err);
|
||||
error = "Failed to sign SSH key for PAM push authentication.";
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error fetching browser target:", error);
|
||||
|
||||
Reference in New Issue
Block a user