Repository navigation
Closed
Description
ArcadeDB Version: ArcadeDB Server v22.12.1 (build 08eb71f/1672872283148/UNKNOWN)
JDK Version: openjdk 11.0.16 2022-07-19
OS: debian11
Expected behavior
A user specified with no group or group with empty access list or with only "readRecord" should not be able to insert database records. In general, it seems to me that user group mechanism is ignored at all, may be I am doing something wrong. How to restrict a user to not create nay record or just records of certain types..
Actual behavior
I have user 'test' in config/server-users.jsonl assigned to a single 'tmp' database (this works as expected). I tried empty and "noaccess"(see below) groups, but the user can still create records:
{"databases":{"tmp":[]}, "password":"PBKDF2WithHmacSHA256$65536$n5YWl487BgXz+b4fkrjRoqTDTq2bE5Y26iKqXGjX8dk=$y6oqAKX0AuCAS8//jvnHNOigJtkfNhLCEhIVdRrML/g=","name":"test"}
I have the following in config/server-groups.json:
{
"databases": {
"tmp": {
"groups": {
"admin": {
"access": [
"updateSecurity",
"updateSchema"
],
"resultSetLimit": -1,
"readTimeout": -1,
"types": {
"*": {
"access": [
"createRecord",
"readRecord",
"updateRecord",
"deleteRecord"
]
}
}
},
"noaccess": {
"access": [],
"resultSetLimit": -1,
"readTimeout": -1,
"types": {
"*": {
"access": ["readRecord"]
}
}
}
}
},
"*": {
"groups": {
"admin": {
"access": [
"updateSecurity",
"updateSchema"
],
"resultSetLimit": -1,
"readTimeout": -1,
"types": {
"*": {
"access": [
"createRecord",
"readRecord",
"updateRecord",
"deleteRecord"
]
}
}
},
"*": {
"access": [],
"resultSetLimit": -1,
"readTimeout": -1,
"types": {
"*": {
"access": []
}
}
}
}
}
},
"version": 1
}
Activity
lvca commentedon Jan 26, 2023
Strange, we have a specific test case for it:
arcadedb/server/src/test/java/com/arcadedb/server/security/ServerProfilingIT.java
Line 54 in 007dc91
lvca commentedon Jan 26, 2023
I was able to reproduce the issue. Our test cases on security are mostly unit tests, we're missing some integration test cases. Working on it.
fix: user was not set in current database from the HTTP server
lvca commentedon Jan 26, 2023
It's fixed in
mainbranch. Leaving this issue open to finalize new test cases to avoid future regressions.test: added test cases to check security from HTTP server
lvca commentedon Jan 26, 2023
Added new test cases to check on that. The issue is closed. Thanks for the report @mik1234mc
fix: user was not set in current database from the HTTP server
test: added test cases to check security from HTTP server