-
Notifications
You must be signed in to change notification settings - Fork 80
Run opendistro alerting plugin background jobs securely #215
Comments
Option 2 definitely sounds better to me. Option 1 sounds much too fragile since users are likely to come and go, but roles will be more permanent. |
I agree with smlx. In our configuration most of the alerts are shared between users who are in the same department (role). If security are user-oriented we will be duplicating alerts. And looks like administration will be easier with alerts role-oriented. |
Thanks. Tagging more folks to comment @fabiocorneti @contato318 @MedoDome @nborisenko |
Hey hey, I agree with smlx and fbaberia. Monitors should be connected with roles because users are sharing data between each other inside groups/tenants. If the user losses his role to his tenant/group, he/she should lose access to the created monitor. |
Thanks for the feedback. Adding @dinusX @hardik-k-shah to this discussion. |
Option#2 makes more sense. As roles is the final entity who will provide authorization. Additionally, in option#1 if user role gets changed, all his/her monitor will stop running. Lets say an example where chip move to another team and his role changed. Now all monitor configured by chip will suddenly stopped working (unless it is properly handled and moved/copied to some other user). Option#2 gives protection against this. For option#2 Cons #1 and #3 can be fixed.
We can ask user explicitly, which role user want to create alert/monitor with. You can fetch all available role (assigned to user through account API and show them in drop down on kibana. User can choose specific role to create a monitor. There is a dry run option to validate if monitor has required permission to run.
Additionally, we can safely say |
@lucaswin-amzn What are your thoughts? |
@hardik-k-shah Thanks for the detailed comments. On "asking user explicitly to select which role he wants to use to create alert monitor with". I see couple of challenges:
Yes, agreed on the "super admin always have permissions to assume any role and scope down the permissions." |
For (1) above I think the users who are that unsophisticated probably only have one role available. If there's only one role, then don't make it a drop-down select, just show that one role as unconfigurable in the form. That will make the UX relatively unchanged for them, in terms of the number of things they have to know/set in order to submit. On (2) I don't understand the concern... Can you elaborate on how you think scoping alerts to roles would be conflating security and business? |
@mogul Thanks for the comments. |
FYI @praveensameneni |
Can we add this to the roadmap - which release is this planned to be available for the Alerting plug-in? |
Sure. Will do. |
Available in version 1.11 |
Hi all, See you soon. |
Background
Also refer to issue (#6)
OpenDistro plugins have background jobs which run periodically, like alerting monitors. This issue explores approaches to securely run these jobs.
Consider below sample configuration:
OpenDistro Roles :
ops_role
,hr_role
Mapping Role to Index :
-
ops_role
index_permissions hasapp_logs_index
.-
hr_role
index_permissions hassalaries_index
.Users:
chip_user
,dale_user
chip_user
is part of IT operations team and can access onlyapp_logs_index
, he isassigned
ops_role
.dale_user
is part of HR department and can access onlysalaries_index
, so he is assignedhr_role
.Approaches:
Option 1: ImpersonateUser
the search.
chip_user
can search onlyapp_logs_index
andcan't search on
salaries_index
. Similarly, monitor createddala_user
can't searchapp_logs_index
.Pros:
chip_user
hadadmin_role
when he created monitor and latter has only ops_role.Cons:
explicitly move the monitors from
chip_user
tomickey_new_user
.Option 2: RolesInject (a.k.a ImpersonateRole/AssumeRole)
chip_user
can search onlyapp_logs_index
, sincechip_user
hasops_role
when its created.Pros
chip_user
leaves the organization, the monitor continues to run as long as theops_role
is present.Cons
permissions changes. For example:
chip_user
hadadmin_role
when he created monitor and latter has onlyops_role
. Monitor will continue to run withadmin_role
.The text was updated successfully, but these errors were encountered: