Coder Social home page Coder Social logo

HTTP Basic Auth about node-neo4j HOT 6 CLOSED

anatoliychakkaev avatar anatoliychakkaev commented on July 26, 2024
HTTP Basic Auth

from node-neo4j.

Comments (6)

gasi avatar gasi commented on July 26, 2024

Thanks for the workaround, @anatoliychakkaev. We’ve been using a firewall to protect our database but I always wondered how one could use Basic auth. One idea that comes to mind is for Neo4j to support relative URLs in their responses so the base URL given to the GraphDatabase class can be reused.

/cc @aseemk

from node-neo4j.

aseemk avatar aseemk commented on July 26, 2024

I saw a thread on the mailing list recently about Neo4j returning relative URLs, just like you propose, @gasi:

http://neo4j.org/forums/#nabble-td3353095%7Ca3375298

Parts of the discussion revolved around auth also, though. Not sure if it's totally relevant, but hopefully some of it helps?

from node-neo4j.

aseemk avatar aseemk commented on July 26, 2024

I finally got around to trying Neo4j on Heroku (love it), and did run into this too. Sorry for the delay in fixing this, but it's finally fixed upstream! Many thanks, @anatoliychakkaev, for the great report.

from node-neo4j.

gasi avatar gasi commented on July 26, 2024

Nice work, @aseemk! I had to do something similar at work recently, in my case for JIRA, and it turns out I could do it more elegantly using the Authorization HTTP header for HTTP Basic Auth using Base64 encoded credentials: https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Basic+Authentication

Would that work for Neo4j?

from node-neo4j.

aseemk avatar aseemk commented on July 26, 2024

Thanks @gasi. I did look into using the header also, but ultimately, it would still require updating every HTTP request the library makes -- in this case, to add this header instead of tweak the URL -- so it felt like it'd be better (less work, and separation of concerns) to just tweak the URL and let request generate the header. What do you think?

from node-neo4j.

gasi avatar gasi commented on July 26, 2024

I guess that works. Putting auth in the header gave me some (incorrect) sense of security since the information was Base64 encoded ;)

from node-neo4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.