Request 서명 시스템 삭제

보안에 큰 도움이 되지 않는다고 판단하여 삭제하였습니다. 판단 근거는 다음과 같습니다.

1. Web Crypto API는 HTTPS 환경에서만 사용할 수 있음
2. 프론트엔드와 백엔드가 하나의 서버에서 제공되므로, 리버스 프록시에 의한 중간자 공격을 받지 않는가에 대한 직관적인 검증이 불가능함
3. 신뢰할 수 없는 리버스 프록시는 애초에 사용하지 않는 것이 맞음

다만 MEK에 대한 서명 등은 그대로 유지됩니다.
This commit is contained in:
static
2025-01-06 03:47:33 +09:00
parent 9fad26d538
commit 6bf40e4ab4
13 changed files with 57 additions and 175 deletions

View File

@@ -1,4 +1,4 @@
import { callSignedPostApi } from "$lib/hooks";
import { callPostApi } from "$lib/hooks";
import { storeClientKey } from "$lib/indexedDB";
import { signMasterKeyWrapped } from "$lib/modules/crypto";
import type { InitialMasterKeyRegisterRequest } from "$lib/server/schemas";
@@ -46,13 +46,9 @@ export const requestInitialMasterKeyRegistration = async (
masterKeyWrapped: string,
signKey: CryptoKey,
) => {
const res = await callSignedPostApi<InitialMasterKeyRegisterRequest>(
"/api/mek/register/initial",
{
mek: masterKeyWrapped,
mekSig: await signMasterKeyWrapped(1, masterKeyWrapped, signKey),
},
signKey,
);
const res = await callPostApi<InitialMasterKeyRegisterRequest>("/api/mek/register/initial", {
mek: masterKeyWrapped,
mekSig: await signMasterKeyWrapped(1, masterKeyWrapped, signKey),
});
return res.ok || res.status === 409;
};