Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rpc): Refactor the cookie-based RPC authentication #8940

Open
wants to merge 3 commits into
base: auth-rpc-endpoint
Choose a base branch
from

Conversation

upbqdn
Copy link
Member

@upbqdn upbqdn commented Oct 17, 2024

Motivation

Resolve #8900 (comment) and #8900 (comment).

Solution

  • Don't read the cookie from the disk at all.
  • Use a path to the cookie file when removing it.
  • Rename FixHttpRequestMiddleware to HttpRequestMiddleware since it doesn't contain only fixes anymore but also serves as an authentication layer.

Tests

No new tests.

PR Author's Checklist

  • The PR name is suitable for the change log.
  • The solution is tested.
  • The PR has a priority label.

PR Reviewer's Checklist

  • The PR resolves the issue.

@upbqdn upbqdn added C-security Category: Security issues A-rpc Area: Remote Procedure Call interfaces C-feature Category: New features A-compatibility Area: Compatibility with other nodes or wallets, or standard rules P-Medium ⚡ rust Pull requests that update Rust code labels Oct 17, 2024
@upbqdn upbqdn requested a review from arya2 October 17, 2024 12:42
@upbqdn upbqdn self-assigned this Oct 17, 2024
@upbqdn upbqdn requested a review from a team as a code owner October 17, 2024 12:42
Copy link
Contributor

mergify bot commented Oct 17, 2024

⚠️ The sha of the head commit of this PR conflicts with #8900. Mergify cannot evaluate rules on this PR. ⚠️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compatibility Area: Compatibility with other nodes or wallets, or standard rules A-rpc Area: Remote Procedure Call interfaces C-feature Category: New features C-security Category: Security issues P-Medium ⚡ rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant