mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 12:38:36 +00:00
Address greptile suggestions
This commit is contained in:
@@ -71,7 +71,6 @@ export enum ProjectPermissionSshHostActions {
|
||||
Create = "create",
|
||||
Edit = "edit",
|
||||
Delete = "delete",
|
||||
IssueUserCert = "issue-user-cert",
|
||||
IssueHostCert = "issue-host-cert"
|
||||
}
|
||||
|
||||
|
||||
@@ -214,14 +214,6 @@ export const sshHostServiceFactory = ({
|
||||
tx
|
||||
);
|
||||
|
||||
await sshHostLoginUserDAL.insertMany(
|
||||
loginMappings.map(({ loginUser }) => ({
|
||||
sshHostId: host.id,
|
||||
loginUser
|
||||
})),
|
||||
tx
|
||||
);
|
||||
|
||||
// (dangtony98): room to optimize
|
||||
for await (const { loginUser, allowedPrincipals } of loginMappings) {
|
||||
const sshHostLoginUser = await sshHostLoginUserDAL.create(
|
||||
@@ -524,7 +516,7 @@ export const sshHostServiceFactory = ({
|
||||
await sshCertificateDAL.transaction(async (tx) => {
|
||||
const cert = await sshCertificateDAL.create(
|
||||
{
|
||||
sshCaId: host.hostSshCaId,
|
||||
sshCaId: host.userSshCaId,
|
||||
sshHostId: host.id,
|
||||
serialNumber,
|
||||
certType: SshCertType.USER,
|
||||
|
||||
@@ -543,7 +543,7 @@ export const createSshCaHelper = async ({
|
||||
// use external SSH CA key pair
|
||||
if (!externalPk || !externalSk) {
|
||||
throw new BadRequestError({
|
||||
message: "Public and private keys are required if generateSigningKey is false"
|
||||
message: "Public and private keys are required when key source is external"
|
||||
});
|
||||
}
|
||||
publicKey = externalPk;
|
||||
|
||||
Reference in New Issue
Block a user