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

adding health warning about insecure protocols for LOAD CSV #1006

Merged
merged 4 commits into from
Aug 12, 2024

Conversation

phil198
Copy link
Contributor

@phil198 phil198 commented Jul 18, 2024

adds a warning against allowing insecure protocols for LOAD CSV

this PR is the docs counterpart to https://github.com/neo-technology/neo4j/pull/26403

I will add a duplicate warning to
https://neo4j.com/docs/cypher-manual/current/clauses/load-csv/
https://neo4j.com/docs/operations-manual/5/authentication-authorization/load-privileges/
and possibly
https://neo4j.com/docs/getting-started/data-import/csv-import/

once the wording of this one is finalised.

Copy link
Contributor

@OliviaYtterbrink OliviaYtterbrink left a comment

Choose a reason for hiding this comment

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

The information is good, I'll leave the wording to the docs team.

(missing the is after the first It)

@phil198 phil198 added the dev label Jul 23, 2024
@renetapopova renetapopova self-requested a review July 24, 2024 13:08
Copy link
Contributor

@renetapopova renetapopova left a comment

Choose a reason for hiding this comment

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

Thanks, @phil198. I added an editorial suggestion.

@@ -90,6 +90,12 @@ You can import data from a CSV file hosted on a remote path.
`LOAD CSV` supports accessing CSV files via HTTPS, HTTP, and FTP (with or without credentials).
It also follows redirects, except those changing the protocol (for security reasons).

[IMPORTANT]
====
It is strongly recommended to only allow secure protocols like HTTPS in favour of allowing insecure protocols like HTTP. If allowing an insecure protocol is completely unavoidable, then Neo4j internally takes some measures to make these requests as secure as possible within their limitations. However, this means that insecure URLs which are located somewhere which uses virtual hosting will not work. The only way to load an insecure resource from a virtually hosted URL is to add the JVM argument `-Dsun.net.http.allowRestrictedHeaders=true` to the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/configuration/configuration-settings/#config_server.jvm.additional/[jvm.additional] config setting. For the sake of security, it is strongly recommended that this be avoided at all cost and that you only permit loading of resources over secure protocols. This can be achieved by limiting link:{neo4j-docs-base-uri}/operations-manual/{page-version}/authentication-authorization/load-privileges/#access-control-load-cidr/[load privileges] to trusted sources that use secure protocols.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
It is strongly recommended to only allow secure protocols like HTTPS in favour of allowing insecure protocols like HTTP. If allowing an insecure protocol is completely unavoidable, then Neo4j internally takes some measures to make these requests as secure as possible within their limitations. However, this means that insecure URLs which are located somewhere which uses virtual hosting will not work. The only way to load an insecure resource from a virtually hosted URL is to add the JVM argument `-Dsun.net.http.allowRestrictedHeaders=true` to the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/configuration/configuration-settings/#config_server.jvm.additional/[jvm.additional] config setting. For the sake of security, it is strongly recommended that this be avoided at all cost and that you only permit loading of resources over secure protocols. This can be achieved by limiting link:{neo4j-docs-base-uri}/operations-manual/{page-version}/authentication-authorization/load-privileges/#access-control-load-cidr/[load privileges] to trusted sources that use secure protocols.
It is strongly recommended to permit resource loading only over secure protocols such as HTTPS instead of insecure protocols like HTTP by limiting the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/authentication-authorization/load-privileges/#access-control-load-cidr/[load privileges] to trusted sources that use such protocols and avoid using resources from untrusted sources.
If allowing an insecure protocol is absolutely unavoidable, Neo4j has internal measures to enhance the security of these requests within their limitations.
However, this means that insecure URLs on virtual hosts will not function unless you add the JVM argument `-Dsun.net.http.allowRestrictedHeaders=true` to the configuration setting link:{neo4j-docs-base-uri}/operations-manual/{page-version}/configuration/configuration-settings/#config_server.jvm.additional/[jvm.additional].

Copy link
Contributor

Choose a reason for hiding this comment

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

How about this wording?

@neo-technology-commit-status-publisher
Copy link
Collaborator

Thanks for the documentation updates.

The preview documentation has now been torn down - reopening this PR will republish it.

@JPryce-Aklundh JPryce-Aklundh merged commit 79cbee9 into neo4j:dev Aug 12, 2024
5 checks passed
renetapopova added a commit to neo4j/docs-operations that referenced this pull request Aug 12, 2024
adds a warning against allowing insecure protocols for `LOAD CSV`

this PR is the operations manual copy of the [cypher manual
equivalent](neo4j/docs-cypher#1006)

---------

Co-authored-by: Reneta Popova <[email protected]>
NataliaIvakina pushed a commit to NataliaIvakina/docs-operations that referenced this pull request Aug 22, 2024
adds a warning against allowing insecure protocols for `LOAD CSV`

this PR is the operations manual copy of the [cypher manual
equivalent](neo4j/docs-cypher#1006)

---------

Co-authored-by: Reneta Popova <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants