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

[core-p2p] Restrict internal routes to whitelisted forger(s) #3838

Closed
air1one opened this issue Jun 26, 2020 · 0 comments
Closed

[core-p2p] Restrict internal routes to whitelisted forger(s) #3838

air1one opened this issue Jun 26, 2020 · 0 comments
Assignees

Comments

@air1one
Copy link
Contributor

air1one commented Jun 26, 2020

Implement the internal route restriction to whitelisted forger(s) : it is implemented on 2.6 branch so you might have a look (search for isForgerAuthorized).

On 3.0 this would need to be done as a plugin (like packages/core-p2p/src/socket-server/plugins/accept-peer.ts for example, you would plug the plugin on the same onPreHandler hook).

Basically all incoming requests for internal routes (see packages/core-p2p/src/socket-server/routes/internal.ts) should be only allowed to whitelisted forger (we whitelist forger using remoteAccess config parameter, see packages/core-p2p/src/defaults.ts)

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

No branches or pull requests

3 participants