mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 06:58:46 +00:00
Request 서명 시스템 삭제
보안에 큰 도움이 되지 않는다고 판단하여 삭제하였습니다. 판단 근거는 다음과 같습니다. 1. Web Crypto API는 HTTPS 환경에서만 사용할 수 있음 2. 프론트엔드와 백엔드가 하나의 서버에서 제공되므로, 리버스 프록시에 의한 중간자 공격을 받지 않는가에 대한 직관적인 검증이 불가능함 3. 신뢰할 수 없는 리버스 프록시는 애초에 사용하지 않는 것이 맞음 다만 MEK에 대한 서명 등은 그대로 유지됩니다.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { signRequestBody } from "$lib/modules/crypto";
|
||||
|
||||
export const refreshToken = async (fetchInternal = fetch) => {
|
||||
return await fetchInternal("/api/auth/refreshToken", { method: "POST" });
|
||||
};
|
||||
@@ -35,20 +33,3 @@ export const callPostApi = async <T>(
|
||||
fetchInternal,
|
||||
);
|
||||
};
|
||||
|
||||
export const callSignedPostApi = async <T>(
|
||||
input: RequestInfo,
|
||||
payload: T,
|
||||
signKey: CryptoKey,
|
||||
fetchInternal?: typeof fetch,
|
||||
) => {
|
||||
return await callApi(
|
||||
input,
|
||||
{
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: await signRequestBody(payload, signKey),
|
||||
},
|
||||
fetchInternal,
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user