Skip to main content

PostgreSQL: Node & Edge Schema

The PostgreSQL connection maps roles, users, and access permissions from a Postgres instance into the SlashID identity graph.


Node Types

Node TypeDescription
PostgresUserA Postgres user identity (IdentityTypePostgresUser)
PostgresRoleA Postgres role identity (IdentityTypePostgresRole)
CredentialAuthentication credential for a user or role
ResourceA Postgres object such as a table, schema, or database

Edge Relationships

Edge TypeFrom NodeTo NodeDescription
CAN_ACCESSPostgresUser, PostgresRoleResourceIdentity is allowed to access the resource
CAN_BE_ACCESSEDResourcePostgresUser or PostgresRoleReverse of CAN_ACCESS
CAN_READPostgresUser, PostgresRoleResourceIdentity can perform read operations
CAN_BE_READ_BYResourcePostgresUser, PostgresRoleReverse of CAN_READ
CAN_WRITEPostgresUser, PostgresRoleResourceIdentity can write to the resource
CAN_BE_WRITTEN_BYResourcePostgresUser, PostgresRoleReverse of CAN_WRITE
IS_MEMBER_OFPostgresUserPostgresRoleIndicates group/role membership
HAS_MEMBERPostgresRolePostgresUserReverse of IS_MEMBER_OF
CREATEDPostgresUser or PostgresRoleResourceIndicates the entity created the resource
CREATED_BYResourcePostgresUser, PostgresRoleReverse of CREATED
CONTAINSResourceResourceRepresents hierarchical containment (e.g. DB > table)

Examples

(PostgresUser)-[:IS_MEMBER_OF]->(PostgresRole)
(PostgresRole)-[:CAN_ACCESS]->(Resource)
(PostgresUser)-[:CAN_READ]->(Resource)
(PostgresUser)-[:CREATED]->(Resource)
(Resource)-[:CONTAINS]->(Resource) # e.g., database contains schema