Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

110
Vistas
dealing with passwords in javascript client - neo4j driver

I am using neo4j and am considering to query the db directly from the frontend, using the APIs via HTTP.

Usually, I had a different approach and kept the backend to connect to the neo4j driver, format the results and expose them to API endpoints, and the frontend to only fetch those results.

I wonder if I could skip the formatting part by querying directly the database from the client, like: https://neo4j.com/docs/javascript-manual/current/client-applications/#js-driver-configuration-examples or : How to query neo4j graph with jQuery or other users wondering about security aspects with javascript querying directly the db: https://github.com/neo4j-contrib/neovis.js/issues/245

Since my use case is an application for internal use, I am considering that APIs endpoints do not necessarily need to be exposed (there are not third parties querying those endpoints) and I could eventually factor them out (not sure if this is a good practice) and code the necessary queries in the javascript scripts of the frontend.

The neo4j example shows (in this case for nodejs):

const driver = neo4j.driver(uri, neo4j.auth.basic(user, password))

but the same applies to other web clients libraries for neo: https://github.com/neo4j-contrib/neovis.js/issues/245

My concern is sending the credentials for accessing to the db: I don't want to store it on the javascript file...

  • Which is a preferred method to query directly the db from the client, but keeping the connection secure ?
  • are there other issues, like CORS, I should take into account, compared to expose the api in endpoints as: /apis/ on the same domain ? As example, I am using python flask and wonder if I can avoid to serve the frontend files from it.
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda