mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 01:52:22 +00:00
Update ssh issue/sign fns to be based on certificate template id
This commit is contained in:
@@ -42,7 +42,7 @@ export type TDeleteSshCaDTO = {
|
||||
|
||||
export type TSignSshKeyDTO = {
|
||||
projectId: string;
|
||||
templateName: string;
|
||||
certificateTemplateId: string;
|
||||
publicKey?: string;
|
||||
certType: SshCertType;
|
||||
principals: string[];
|
||||
@@ -57,7 +57,7 @@ export type TSignSshKeyResponse = {
|
||||
|
||||
export type TIssueSshCredsDTO = {
|
||||
projectId: string;
|
||||
templateName: string;
|
||||
certificateTemplateId: string;
|
||||
keyAlgorithm: CertKeyAlgorithm;
|
||||
certType: SshCertType;
|
||||
principals: string[];
|
||||
|
||||
@@ -126,8 +126,8 @@ export const SshCertificateModal = ({ popUp, handlePopUpToggle }: Props) => {
|
||||
switch (operation) {
|
||||
case SshCertificateOperation.SIGN_SSH_KEY: {
|
||||
const { serialNumber, signedKey } = await signSshKey({
|
||||
projectId: currentWorkspace?.id || "",
|
||||
templateName: templateData.name,
|
||||
projectId,
|
||||
certificateTemplateId: templateData.id,
|
||||
publicKey: existingPublicKey,
|
||||
certType,
|
||||
principals: principals.split(",").map((user) => user.trim()),
|
||||
@@ -144,7 +144,7 @@ export const SshCertificateModal = ({ popUp, handlePopUpToggle }: Props) => {
|
||||
case SshCertificateOperation.ISSUE_SSH_CREDS: {
|
||||
const { serialNumber, publicKey, privateKey, signedKey } = await issueSshCreds({
|
||||
projectId,
|
||||
templateName: templateData.name,
|
||||
certificateTemplateId: templateData.id,
|
||||
keyAlgorithm,
|
||||
certType,
|
||||
principals: principals.split(",").map((user) => user.trim()),
|
||||
|
||||
Reference in New Issue
Block a user