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

Graph database (Dgraph, Neo4j) support #660

Closed
alifpay opened this issue Jul 15, 2021 · 6 comments
Closed

Graph database (Dgraph, Neo4j) support #660

alifpay opened this issue Jul 15, 2021 · 6 comments
Labels
stale Feedback from one or more authors is required to proceed.

Comments

@alifpay
Copy link

alifpay commented Jul 15, 2021

Is your feature request related to a problem? Please describe.

I think, graph database fits for access management. Dgraph, Neo4j

https://gist.github.com/achmadns/40fe5073cadd2f6dd797f67872d93420

@zepatrik
Copy link
Member

Thanks for that link 👍
I assume this is similar to what @christian-roggia was talking about?

The basic idea of zanzibar/Keto is exactly that, modeling ACL as a graph of permissions. We should definitely evaluate using a graph database further, but from a quick research there is none really capable of the globally distributed operation we have at CRDB, Yugabyte or Spanner. Effectively we are doing graph queries over typical SQL databases with all of their features.
Also I don't see how one could implement something as subject set rewrites #263 because the graph database can only work with data it already has right?

CC @jon-whit @aeneasr maybe interesting read for you as well

@aeneasr
Copy link
Member

aeneasr commented Jul 15, 2021

Probably a better fit would be https://github.com/cayleygraph/cayley as - iirc - allows different storage backends and just abstracts the querying. Was originally in the gGH google org. Website is currently down though :/

@christian-roggia
Copy link

christian-roggia commented Jul 20, 2021

I would like to suggest dgraph as a native graph database for experimentations as it can scale horizontally (and I believe it has multi-region support) and is ready for production. Additionally, this database was originally developed internally at Google (same as cayley) and received a multi-million round of investment to continue with their development. A downside of dgraph is that it doesn't support SQL as it is a native graph database with no underlying RDBMS (it uses a key-value known as BadgerDB instead, also developed by the dgraph team) but uses instead DQL and GraphQL as query languages.

You can find our experimental RBAC implementation with dgraph here if you are interested to learn more about it and play around: https://github.com/grbac/grbac.

The way we solve authorization query checks is through the Dijkstra's algorithm to find the shortest path in a graph from a resource (object) to a principal (subject) given a permission (relation).

@zepatrik zepatrik changed the title database. Dgraph, Neo4j Graph database (Dgraph, Neo4j) support Jul 30, 2021
@raymondbernard
Copy link

Just my two cents, I have worked with both and really like https://entgo.io/ . It's a orm for graphs supported by Facebook. 100 percent open source. Makes Simple API for modeling any database schema as Go objects
Easily Traverse Any Graph →
Run queries, aggregations and traverse any graph structure easily
Statically Typed And Explicit API →
100% statically typed and explicit API using code generation

@christian-roggia
Copy link

We experimented with entgo half a year ago and migrated all our ORMs to that framework. My only regret was not discovering it earlier.

@github-actions
Copy link

Hello contributors!

I am marking this issue as stale as it has not received any engagement from the community or maintainers a year. That does not imply that the issue has no merit! If you feel strongly about this issue

  • open a PR referencing and resolving the issue;
  • leave a comment on it and discuss ideas how you could contribute towards resolving it;
  • leave a comment and describe in detail why this issue is critical for your use case;
  • open a new issue with updated details and a plan on resolving the issue.

Throughout its lifetime, Ory has received over 10.000 issues and PRs. To sustain that growth, we need to prioritize and focus on issues that are important to the community. A good indication of importance, and thus priority, is activity on a topic.

Unfortunately, burnout has become a topic of concern amongst open-source projects.

It can lead to severe personal and health issues as well as opening catastrophic attack vectors.

The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone.

If this issue was marked as stale erroneous you can exempt it by adding the backlog label, assigning someone, or setting a milestone for it.

Thank you for your understanding and to anyone who participated in the conversation! And as written above, please do participate in the conversation if this topic is important to you!

Thank you 🙏✌️

@github-actions github-actions bot added the stale Feedback from one or more authors is required to proceed. label Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Feedback from one or more authors is required to proceed.
Projects
None yet
Development

No branches or pull requests

5 participants