-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Cases] RBAC #95058
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
Merged
Merged
[Cases] RBAC #95058
Changes from all commits
Commits
Show all changes
111 commits
Select commit
Hold shift + click to select a range
7f1a7dd
Adding feature flag for auth
jonathan-buttner 164582d
Hiding SOs and adding consumer field
jonathan-buttner 7eaf41e
First pass at adding security changes
jonathan-buttner f8e62c6
Consumer as the app's plugin ID
cnasikas 09589c3
Create addConsumerToSO migration helper
cnasikas eb75eb0
Fix mapping's SO consumer
cnasikas a930f03
Add test for CasesActions
cnasikas d6f3b09
Declare hidden types on SO client
cnasikas b82e686
Restructure integration tests
cnasikas 4d05175
Init spaces_only integration tests
cnasikas 75d72ae
Implementing the cases security string
jonathan-buttner e65838b
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner 1fd66af
Adding security plugin tests for cases
jonathan-buttner 4560d42
Rough concept for authorization class
jonathan-buttner ef9b3b2
Adding comments
jonathan-buttner b22a032
Fix merge
cnasikas ddc2280
Get requiredPrivileges for classes
cnasikas 9d008d8
Check privillages
cnasikas 7bb23dd
Ensure that all classes are available
cnasikas 65d4c6b
Success if hasAllRequested is true
cnasikas 59e4045
Failure if hasAllRequested is false
cnasikas 4092733
Adding schema updates for feature plugin
jonathan-buttner 311e3f4
Seperate basic from trial
cnasikas f2a50d3
Enable SIR on integration tests
cnasikas 00d89ca
Starting the plumbing for authorization in plugin
jonathan-buttner 40cfcce
Merge branch 'master' into cases-rbac-poc
cnasikas 644a7ac
Unit tests working
jonathan-buttner 9bb1b86
Merge branch 'cases-rbac-poc-plugin-changes' into cases-rbac-poc
jonathan-buttner 12d6e2e
Move find route logic to case client
cnasikas 84d9167
Create integration test helper functions
cnasikas 4bed458
Adding auth to create call
jonathan-buttner ecb3135
Create getClassFilter helper
cnasikas fe1d8c8
Add class attribute to find request
cnasikas 22e7752
Create getFindAuthorizationFilter
cnasikas 96f81a4
Ensure savedObject is authorized in find method
cnasikas e3ae097
Merge branch 'master' into cases-rbac-poc
cnasikas 06d7c64
Include fields for authorization
cnasikas 2ca4134
Combine authorization filter with cases & subcases filter
cnasikas 17110b1
Fix isAuthorized flag
cnasikas bc06264
Fix merge issue
cnasikas a04e0d7
Create/delete spaces & users before and after tests
cnasikas 7fe4e40
Add more user and roles
cnasikas 2847861
[Cases] Convert filters from strings to KueryNode (#95288)
cnasikas a2e1da8
[Cases] RBAC: Rename class to scope (#95535)
cnasikas 9263d7d
Merge branch 'master' into cases-rbac-poc
cnasikas afff0cc
Merge branch 'master' into cases-rbac-poc
cnasikas 7cf9172
[Cases][RBAC] Rename scope to owner (#96035)
cnasikas 0a95e55
[Cases] RBAC: Create & Find integration tests (#95511)
cnasikas 1a895e5
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner 9ffc3db
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner 4f3c37e
[Cases] Cases client enchantment (#95923)
cnasikas 36781db
[Cases] Authorization and Client Audit Logger (#95477)
jonathan-buttner 73a4bfc
[Cases] Migrate sub cases routes to a client (#96461)
jonathan-buttner ae918cc
Merge branch 'master' into cases-rbac-poc
cnasikas e59602c
Merge branch 'cases-rbac-poc' of github.com:elastic/kibana into cases…
cnasikas 34f2d86
[Cases] RBAC: Migrate routes' unit tests to integration tests (#96374)
cnasikas 613e859
[Cases] Move remaining HTTP functionality to client (#96507)
jonathan-buttner 676173e
[Cases] Refactoring authorization (#97483)
jonathan-buttner 6cdfa84
[Cases] Add authorization to configuration & cases routes (#97228)
cnasikas 7b21b7a
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner 103388e
[Cases] Attachments RBAC (#97756)
jonathan-buttner 18e75d9
[Cases] Add RBAC to remaining Cases APIs (#98762)
jonathan-buttner d99d9f8
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner b121662
Fixing some type errors
jonathan-buttner 42162e3
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner 298ba34
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner c0fb868
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner 21d173d
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner b910889
[Cases] Add space only tests (#99409)
jonathan-buttner 78dfac4
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner bf583a8
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner 3fd893f
[Cases] Add security only tests (#99679)
jonathan-buttner 86568ed
Adding sub feature
jonathan-buttner 952e2a3
[Cases] Cleaning up the services and TODOs (#99723)
jonathan-buttner e26de43
Integration tests for cases privs and fixes (#100038)
jonathan-buttner 2d8601b
[Cases] RBAC on UI (#99478)
cnasikas 570cddb
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner 3c7670b
Fixing case ids by alert id route call
jonathan-buttner dafb4fe
[Cases] Fixing UI feature permissions and adding UI tests (#100074)
jonathan-buttner b7c5ebd
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner 698e8e2
Fixing type error
jonathan-buttner 22abf1f
Merge branch 'master' into cases-rbac-poc
kibanamachine 71225eb
Adding some comments
jonathan-buttner f7a816b
Validate cases features
cnasikas 2ed0a99
Merge branch 'master' into cases-rbac-poc
cnasikas fd39b25
Fix new schema
cnasikas a193138
Merge branch 'master' into cases-rbac-poc
kibanamachine 1f9059c
Merge branch 'master' into cases-rbac-poc
kibanamachine 2085a3b
Merge branch 'master' into cases-rbac-poc
kibanamachine 66c1d43
Adding owner param for the status stats
jonathan-buttner 018dcb5
Merge branch 'master' into cases-rbac-poc
kibanamachine 34b16c5
Fix get case status tests
cnasikas 9ba1243
Adjusting permissions text and fixing status
jonathan-buttner 315a6e4
Address PR feedback
jonathan-buttner 02ad6a4
Adding top level feature back
jonathan-buttner e8c3532
Merge branch 'master' into cases-rbac-poc
kibanamachine 8881899
Fixing feature privileges
jonathan-buttner dd62656
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner acf550b
Renaming
jonathan-buttner 148623e
Removing uneeded else
jonathan-buttner 7acf83a
Fixing tests and adding cases merge tests
jonathan-buttner b03fa4c
Merge branch 'master' into cases-rbac-poc
kibanamachine 445c846
[Cases][Security Solution] Basic license security solution API tests …
jonathan-buttner c08ac43
Merge branch 'master' of github.com:elastic/kibana into cases-rbac-poc
jonathan-buttner 373cd68
Merge branch 'master' into cases-rbac-poc
kibanamachine d59dbad
renaming to unsecuredSavedObjectsClient (#101215)
jonathan-buttner 7ef02f4
Merge branch 'master' into cases-rbac-poc
kibanamachine 739fd6f
[Cases] RBAC Refactoring audit logging (#100952)
jonathan-buttner e66eb40
[Cases] Cleaning up RBAC integration tests (#101324)
jonathan-buttner 5bd080b
Merge branch 'master' into cases-rbac-poc
kibanamachine 56e0f0d
Merge branch 'master' into cases-rbac-poc
kibanamachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| /** | ||
| * This field is used for authorization of the entities within the cases plugin. Each entity within Cases will have the owner field | ||
| * set to a string that represents the plugin that "owns" (i.e. the plugin that originally issued the POST request to | ||
| * create the entity) the entity. | ||
| * | ||
| * The Authorization class constructs a string composed of the operation being performed (createCase, getComment, etc), | ||
| * and the owner of the entity being acted upon or created. This string is then given to the Security plugin which | ||
| * checks to see if the user making the request has that particular string stored within it's privileges. If it does, | ||
| * then the operation succeeds, otherwise the operation fails. | ||
| * | ||
| * APIs that create/update an entity require that the owner field be passed in the body of the request. | ||
| * APIs that search for entities typically require that the owner be passed as a query parameter. | ||
| * APIs that specify an ID of an entity directly generally don't need to specify the owner field. | ||
| * | ||
| * For APIs that create/update an entity, the RBAC implementation checks to see if the user making the request has the | ||
| * correct privileges for performing that action (a create/update) for the specified owner. | ||
| * This check is done through the Security plugin's API. | ||
| * | ||
| * For APIs that search for entities, the RBAC implementation creates a filter for the saved objects query that limits | ||
| * the search to only owners that the user has access to. We also check that the objects returned by the saved objects | ||
| * API have the limited owner scope. If we find one that the user does not have permissions for, we throw a 403 error. | ||
| * The owner field that is passed in as a query parameter can be used to further limit the results. If a user attempts | ||
| * to pass an owner that they do not have access to, the owner is ignored. | ||
| * | ||
| * For APIs that retrieve/delete entities directly using their ID, the RBAC implementation requests the object first, | ||
| * and then checks to see if the user making the request has access to that operation and owner. If the user does, the | ||
| * operation continues, otherwise we throw a 403. | ||
| */ | ||
| export const OWNER_FIELD = 'owner'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.