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

remove useTransportSecurity call for spiceDB channel #1939

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ void startup() throws Exception {
} else {
channel = ManagedChannelBuilder
.forTarget(SPICEDB_TARGET)
.useTransportSecurity()
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@

public class Schema {
public static String schema = """
definition user {}

definition group {
relation creator: user
relation admin: user
relation member: user

permission administrate = admin + creator
permission membership = member + admin + creator
}

definition datum {
relation creator: user
relation admin: user | group
relation reader: user | group
relation writer: user | group

permission read = reader + reader->membership + writer + writer->membership + admin + admin->membership + creator
permission write = writer + writer->membership + admin + admin->membership + creator
permission administrate = admin + admin->membership + creator
}
definition user {}

definition group {
relation creator: user
relation admin: user
relation member: user

permission administrate = admin + creator
permission membership = member + admin + creator
}

definition project {
relation creator: user
relation admin: user | group
relation reader: user | group
relation writer: user | group

permission read = reader + reader->membership + writer + writer->membership + admin + admin->membership + creator
permission write = writer + writer->membership + admin + admin->membership + creator
permission administrate = admin + admin->membership + creator
}
""";

public enum Type {
USER("user"),
GROUP("group"),
DATUM("datum");
PROJECT("project");

private final String text;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package software.uncharted.terarium.hmiserver.utils.rebac.askem;

import software.uncharted.terarium.hmiserver.utils.rebac.AskemDatumType;
import software.uncharted.terarium.hmiserver.utils.rebac.ReBACService;
import software.uncharted.terarium.hmiserver.utils.rebac.RelationsipAlreadyExistsException.RelationshipAlreadyExistsException;
import software.uncharted.terarium.hmiserver.utils.rebac.Schema;
Expand All @@ -12,15 +11,13 @@ public class RebacProject extends RebacObject {

ReBACService reBACService;

private final AskemDatumType datumType = AskemDatumType.PROJECT;

public RebacProject(String id, ReBACService reBACService) {
super(id);
this.reBACService = reBACService;
}

public SchemaObject getSchemaObject() {
return new SchemaObject(Schema.Type.DATUM, datumType + getId());
return new SchemaObject(Schema.Type.PROJECT, getId());
}

public List<RebacPermissionRelationship> getPermissionRelationships() throws Exception {
Expand Down