-
Notifications
You must be signed in to change notification settings - Fork 873
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
Failing due to unrequired security check in transacted DB (in non-transacted - OK) #8067
Labels
Comments
I encountered a similar issue where non-admin users could not read a record with links to OUser. I had assumed that was deliberate behavior.
-john wright
On Feb 4, 2018, at 10:13 PM, Ilia Naryzhny <[email protected]<mailto:[email protected]>> wrote:
OrientDB Version: 2.2.30
Java Version: 8
OS: ubuntu
OrientDB require rights where security check is not needed.
There is a class with link to OUser. Suppose you are trying to create a new document of this class and point to some user under 'writer'. For unknown reason: transacted db DO require write rights for OUser disregard that fact that it's just referencing to OUser.
Here is the test. It's using Orienteer tester class for accessing DB, but it's should not be a big problem to rewrite.
@test
public void testLinkToOUser() {
ODatabaseDocument db = wicket.getTester().getDatabase();
OSchema schema = db.getMetadata().getSchema();
final OClass classA = schema.createClass("TestLinkToOUser");
classA.createProperty("name", OType.STRING);
classA.createProperty("user", OType.LINK).setLinkedClass(schema.getClass("OUser"));
ORID userRid = new ORecordId("#5:0");
ODocument doc = new ODocument(classA);
wicket.getTester().signIn("writer", "writer");
db = wicket.getTester().getDatabase();
db.begin();
ODocument userDoc = userRid.getRecord();
userDoc.field("roles");
doc.field("Admin");
doc.field("user", userDoc);
doc.save();
db.commit();
}
Expected behavior
OrientDB should allow to save documents with just links to OUser (or other RO instances)
Actual behavior
OrientDB is failing to set this link in transacted DB. In non-transacted, everything is fine.
P.S. writer should have ReadOnly rights to OUser
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#8067>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AH8lzc9ULuhFNOMjUbZhm3hKzLNKf3Ytks5tRnHwgaJpZM4R43bw>.
|
@jcwright77 , your case is also weird.
|
Let me correct that.
The case is class A with read-write, class B no access. class A has a link to a class B record. User can retrieve class A including the link rid to class B, just not retrieve linked class B record. In my hazy recollection, the first query was failing but it is works. I think this is the expected and reasonable behavior. User *cannot* do something like retrieve Person.ouser.name if ouser is not accessible by them, but they can get the rid of the ouser link field.
sorry for any confusion.
…-john wright
On Feb 6, 2018, at 12:50 AM, Ilia Naryzhny ***@***.***> wrote:
@jcwright77 , your case is also weird.
• If you have read-only rights to classA and read-write to classB: you should be able to do everything with instance of classB.
• If you dont't have any rights for classA and read-only for classB: you should be able at least read instances of classB, but links to classA should remain unresolved if you do document.field("link")
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Let me make clear for the supporters: that it's different. And in my case: I think that expected behaviour should be as I stated in my previous post. |
@tglman , what's your oppinion about the issue? |
PhantomYdn
added a commit
to OrienteerBAP/wicket-orientdb
that referenced
this issue
Feb 10, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OrientDB Version: 2.2.30
Java Version: 8
OS: ubuntu
OrientDB require rights where security check is not needed.
There is a class with link to OUser. Suppose you are trying to create a new document of this class and point to some user under 'writer'. For unknown reason: transacted db DO require write rights for OUser disregard that fact that it's just referencing to OUser.
Here is the test. It's using Orienteer tester class for accessing DB, but it's should not be a big problem to rewrite.
Expected behavior
OrientDB should allow to save documents with just links to OUser (or other RO instances)
Actual behavior
OrientDB is failing to set this link in transacted DB. In non-transacted, everything is fine.
P.S.
writer
should have ReadOnly rights to OUserThe text was updated successfully, but these errors were encountered: