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

inspector: add --inspect-allow-host option #31071

Closed
wants to merge 1 commit into from

Conversation

legendecas
Copy link
Member

@legendecas legendecas commented Dec 23, 2019

Related #28470

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Dec 23, 2019
@legendecas legendecas added the inspector Issues and PRs related to the V8 inspector protocol label Dec 23, 2019
@legendecas legendecas force-pushed the pr/28470 branch 3 times, most recently from 11ee4a4 to 43ba813 Compare December 23, 2019 16:59
@eugeneo
Copy link
Contributor

eugeneo commented Dec 23, 2019

My main concern is that this increases the attack surface. Is the SSH tunnel (as described on this page - https://nodejs.org/de/docs/guides/debugging-getting-started/) not enough?

@yinzara
Copy link

yinzara commented Dec 23, 2019

@eugeneo Take a look over at #28470 for more information as to why it's not enough.

I'm not sure how this "increases the attack surface". There was a whole debate about this in the other PR which originally was just to allow all addresses that are ".local" which was argued did increase the attack vector and this was made as a suggested alternative that satisfied critics.

@yinzara
Copy link

yinzara commented Dec 23, 2019

With no additional configuration (i.e. the default state), this does not change the functionality of inspector at all. However it allows for a configuration where you specify the hostname inspector is allowed to receive connections on. This prevents the DNS rebind attacks which caused the change to inspector that prevented all connections using hostnames other than localhost.

@Trott
Copy link
Member

Trott commented Dec 26, 2019

@bnoordhuis @nodejs/security @nodejs/inspector

doc/api/cli.md Outdated Show resolved Hide resolved
doc/api/cli.md Outdated
added: REPLACEME
-->

Specify allowed HTTP GET host on the inspector websocket port.
Copy link
Member

@bnoordhuis bnoordhuis Dec 27, 2019

Choose a reason for hiding this comment

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

This sentence is confusingly worded, IMO.

Suggested change
Specify allowed HTTP GET host on the inspector websocket port.
Have the HTTP endpoint accept HTTP GET requests addressed to this host name.
This option can be specified more than once.

It's still no Hemingway but hey.

const std::string& path,
const DebugOptions& options,
std::shared_ptr<HostPort> host_port,
std::shared_ptr<std::vector<std::string>> allowed_http_get_hosts,
Copy link
Member

Choose a reason for hiding this comment

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

I think you can obtain this from DebugOptions instead of passing it in explicitly? Of course explicit > implicit but then again DRY > redundancy.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it can be obtained from the DebugOptions.

But if we'd like to support changing the allow list at runtime from JavaScript API, it would be better to not directly accessing the one in DebugOptions.

Copy link
Member

Choose a reason for hiding this comment

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

But changing it programmatically is not what's being asked. I'm not even sure that's a good idea, there might be security implications.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@legendecas
Copy link
Member Author

I can reproduce the failed inspector ipv6 case locally. I'll dig into it these days.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@legendecas
Copy link
Member Author

@bnoordhuis may I have your review on the PR again?

@BridgeAR BridgeAR force-pushed the master branch 2 times, most recently from 8ae28ff to 2935f72 Compare May 31, 2020 12:19
@jasnell jasnell added the stalled Issues and PRs that are stalled. label Jun 25, 2020
@jasnell
Copy link
Member

jasnell commented Jun 25, 2020

Ping @bnoordhuis @legendecas ... looks like this stalled out and needs a rebase and further review to move forward

@bnoordhuis
Copy link
Member

@legendecas Sorry, missed your ping. Can you rebase and add me as a reviewer? Cheers.

@aduh95 aduh95 added stalled Issues and PRs that are stalled. and removed stalled Issues and PRs that are stalled. labels Oct 19, 2020
@github-actions
Copy link
Contributor

This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open.

@github-actions
Copy link
Contributor

Closing this because it has stalled. Feel free to reopen if this PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions.

@github-actions github-actions bot closed this Nov 19, 2020
@yinzara
Copy link

yinzara commented Nov 19, 2020

@legendecas sad to see this not come to fruition. would have made attaching to pods running in a locally running k8s cluster so much easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. inspector Issues and PRs related to the V8 inspector protocol lib / src Issues and PRs related to general changes in the lib or src directory. stalled Issues and PRs that are stalled.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants