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

RBAC #1214

Merged
merged 75 commits into from
Jan 29, 2025
Merged

RBAC #1214

Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
cf9c1c6
Models
tomchop Dec 29, 2024
0a0ee93
db changes
tomchop Dec 29, 2024
5af5d75
RBAC schema tests
tomchop Dec 29, 2024
a5a64ad
API changes for Entities
tomchop Dec 29, 2024
7b09a4e
Add RoleRelationship graph
tomchop Dec 31, 2024
f0d13e2
Add username to filter / neighbor functions
tomchop Dec 31, 2024
5d409b2
Merge branch 'main' into rbac
tomchop Jan 2, 2025
18eaec7
chill out ruff
tomchop Jan 2, 2025
c5c9f0b
Add global role
tomchop Jan 2, 2025
a31edac
Add global writer test
tomchop Jan 2, 2025
3466bf5
Fix test
tomchop Jan 2, 2025
28313ba
Config default roles & toggle
tomchop Jan 2, 2025
71890c2
Only filter when rbac is enabled
tomchop Jan 2, 2025
ea8684c
Global function renaming
tomchop Jan 2, 2025
0344002
Fix test
tomchop Jan 2, 2025
b3c838a
Move comment up
tomchop Jan 2, 2025
9928d94
Ensure all refs to deleted object are removed from graphs
tomchop Jan 3, 2025
d41205a
Add helper function to get groups
tomchop Jan 3, 2025
e726214
Cleanup / updates
tomchop Jan 3, 2025
2e52582
Return groups when querying user
tomchop Jan 3, 2025
3b0ed77
Groups API
tomchop Jan 3, 2025
8240722
Grand ownership to user creating entity
tomchop Jan 3, 2025
5958ace
Pass in user object instead of username string
tomchop Jan 3, 2025
bee98e1
Admins bypass rbac
tomchop Jan 3, 2025
9b45e8a
Group search
tomchop Jan 4, 2025
3d1bfe4
Dynamically compute ACLs
tomchop Jan 7, 2025
d056aff
New group endpoints
tomchop Jan 7, 2025
53cfad2
Fix test
tomchop Jan 7, 2025
8f4e533
Fix typo
tomchop Jan 7, 2025
9899dbb
Don't send timeline db changes to events
tomchop Jan 7, 2025
ce49b5b
Enable RBAC for rbac schema tests
tomchop Jan 7, 2025
f14d9e1
Enable RBAC in file that matters
tomchop Jan 7, 2025
801f027
Fix tests
tomchop Jan 7, 2025
e7ed2f5
Move ACL fields to their own class
tomchop Jan 13, 2025
12c96f0
Fix imports
tomchop Jan 13, 2025
91f4e1e
Formatting
tomchop Jan 17, 2025
d1fa01a
Function to populate ACLs
tomchop Jan 17, 2025
769a935
move get_acls function to mixin
tomchop Jan 17, 2025
c632178
YetiAclMixin to other models
tomchop Jan 17, 2025
50cb78c
Connect ACLs to newly created objects
tomchop Jan 17, 2025
dfa5806
Formatting
tomchop Jan 17, 2025
17dc12f
Fix tests
tomchop Jan 17, 2025
40e49f7
Move Permissions and Role to own file
tomchop Jan 17, 2025
b3d098c
Better imports
tomchop Jan 17, 2025
98f2163
Ruff format
tomchop Jan 17, 2025
473f5db
Move import to type checking
tomchop Jan 17, 2025
7fe5d12
Add rbac acls to endpoints
tomchop Jan 17, 2025
2c804c3
Add endpoint to update user's profiles
tomchop Jan 18, 2025
59b6663
Update tests
tomchop Jan 18, 2025
85de6ec
Do not serialize ACLs to database
tomchop Jan 22, 2025
abea945
Get all ACLs for objects
tomchop Jan 22, 2025
0fa4085
Remove global role checks when checking for granular perms
tomchop Jan 22, 2025
d0ac3ab
Add RBAC endpoints
tomchop Jan 22, 2025
c7f1fe3
Remove RBAC logic from groups API
tomchop Jan 22, 2025
819f6be
Move role patching to its own endpoint
tomchop Jan 22, 2025
d599da7
Fix tests
tomchop Jan 22, 2025
eabcc0e
Fix more tests
tomchop Jan 22, 2025
298810d
bugfix
tomchop Jan 22, 2025
10e0094
Don't overwrite ACLs
tomchop Jan 22, 2025
2a08223
Add endpoint to actually delete a RoleRelationship
tomchop Jan 22, 2025
c9e7f64
Serialize IDs in relationships
tomchop Jan 22, 2025
13f581c
Test that relationships are actually deleted
tomchop Jan 22, 2025
fd2e0a3
Add uniq indexes on groups and users
tomchop Jan 27, 2025
7af7fa4
use a set_acls that also handles default permissions
tomchop Jan 27, 2025
2e8f02c
fix DFIQ ACL setting
tomchop Jan 27, 2025
6dbc0eb
Fix tests
tomchop Jan 28, 2025
d3faca1
account for multiple potential key aggregations
tomchop Jan 28, 2025
b51f2ce
optinally skip setting default acls
tomchop Jan 28, 2025
af5d343
add ACL to graph
tomchop Jan 28, 2025
0c588ce
typo
tomchop Jan 28, 2025
ed21f97
Add RBAC to content of system call
tomchop Jan 28, 2025
49da684
Add mirgation
tomchop Jan 28, 2025
e398bde
Add users to groups upon creation
tomchop Jan 28, 2025
9604b99
add WITH statement for ACL checks
tomchop Jan 29, 2025
aab3c27
Fix WITH statement generation
tomchop Jan 29, 2025
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
Prev Previous commit
Next Next commit
bugfix
  • Loading branch information
tomchop committed Jan 22, 2025
commit 298810d5b55d924d7de6d3ebb3081bdcacc4132b
2 changes: 1 addition & 1 deletion core/web/apiv2/observables.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def patch(httpreq: Request, request: PatchObservableRequest, id) -> ObservableTy
update_data = request.observable.model_dump(exclude_unset=True)
updated_observable = db_observable.model_copy(update=update_data)
new = updated_observable.save()
new.get_acls(httpreq.state.user)
new.get_acls()
audit.log_timeline(httpreq.state.username, new, old=db_observable)
return new

Expand Down