Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-18-2019 01:52 AM
Copied from initial slack discussion to keep track of the outcome:
Currently I have a database with multiple sub graphs (disconnected from each other). This seems like a perfect fit to create a database for each sub graph.
I understand I can supply the databasename in the driver.session()
call to query the right database/subgraph.
What I am wondering about is how to use the RBAC features in addition to this. If I created multiple roles with different privileges and connect users to those roles, then I need to also login to the database with those users instead of the generic neo4j user from our API.
Does the neo4j java driver have options for this?
09-18-2019 01:54 AM
try (Session session = driver.session(SessionConfig.builder().withDatabase("someDatabase").build())) {
session.run("MATCH (m:Movie) RETURN m ORDER BY m.name ASC").stream()
.map(r -> r.get("m").asNode())
.map(n -> n.get("title").asString())
.forEach(LOGGER::info);
}
to choose the database is possible. But I think we also need something like this:
try (Session session = driver.session(SessionConfig.builder().withDatabase("someDatabase").assumeRole("reader").build())) {
session.run("MATCH (m:Movie) RETURN m ORDER BY m.name ASC").stream()
.map(r -> r.get("m").asNode())
.map(n -> n.get("title").asString())
.forEach(LOGGER::info);
}
09-18-2019 01:55 AM
Max Demarzi responded: You brought up a good point btw, now were talking about ways to pass the user in the session.
09-18-2019 01:55 AM
Is how oracle enables using a proxy user. This seems like a possible feature for the neo4j driver and db
All the sessions of the conference are now available online