Skip to content

Conversation

@Karrq
Copy link
Collaborator

@Karrq Karrq commented Dec 17, 2025

This PR aims to add an authentication RPC endpoint to the gateway, allowing the Portal to communicate to it without sharing a JWT thru external services.

This is done using based_authenticateProposer (name pending) which simply releases a JWT which can be used to access the rest of the endpoints of the gateway.

The gateway supports multiple active JWTs, to allow multiple portals to talk to it, and the portal also supports a JWT per gateway, imposing no restrictions on the number of authenticated gateways to which the portal is connected.

TODO:

  • Tests

feat(portal): gateway authentication
fix(registry): remove JWT
feat(gateway): HTTP & RPC auth layers
refactor(portal): dedicated gateway client module
Copy link
Collaborator

@mempirate mempirate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, first pass

@Karrq Karrq requested a review from mempirate December 18, 2025 15:33
Copy link
Collaborator

@mempirate mempirate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mempirate mempirate linked an issue Dec 19, 2025 that may be closed by this pull request
let valid_from = Duration::from_secs(valid_from);
let valid_from = SystemTime::UNIX_EPOCH + valid_from;

// TODO: add authorization logic, verifying challenger may authenticate with this gateway
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be a check against an address in the GatewayArgs for now. something like auth_allowed_challenger.

@BrycePy BrycePy linked an issue Dec 23, 2025 that may be closed by this pull request
fix: remove gateway.address arg, use gossip key as "gateway address"
refactor: cleanup scripts and compose files
deps: portal-auth based-op-node
chore: fmt and unused imports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Authentication RPC Failed after a few block Gateway: Add Portal authentication RPC

4 participants