[P2][ux] SIWE register 실패 시 challenge 소모 정책을 명확화하고 재시도 UX 개선 #44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
문제
leases.rs::consume_verified_challenge()는/sdk/register요청 처리 시 challenge를 먼저HashMap에서remove()한 뒤 만료, message match, signature 검증을 수행합니다.즉 다음 경우에도 challenge가 즉시 소모됩니다.
siwe_messagemismatch영향
/sdk/register/challenge부터 다시 시작해야 함제안
아래 중 하나를 선택해 정책을 명확화합니다.
보안 관점에서는 replay 방어를 유지해야 하므로, 재시도 허용 시 attempt cap과 short TTL을 함께 적용하는 것이 좋습니다.
완료 기준
검토 기준:
portal-relaySIWE registration flow 정적 리뷰. 관련 코드:crates/portal-relay/src/auth/siwe.rs,crates/portal-relay/src/relay/leases.rs,crates/portal-relay/src/api/mod.rs.검토했지만 코드 변경은 하지 않습니다. register challenge는 서명 실패/메시지 mismatch에도 소모되는 one-time nonce 정책이 맞습니다. 재시도 UX보다 replay 방어가 우선이고, client는 실패 시 새 challenge를 요청해야 합니다. 이 정책을 이슈 답변으로 명확히 하고 닫습니다.