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

Module doesn't seem to log all IDs #3

Closed
mtdeguzis opened this issue Jul 20, 2018 · 9 comments
Closed

Module doesn't seem to log all IDs #3

mtdeguzis opened this issue Jul 20, 2018 · 9 comments
Labels
enhancement New feature or improvement
Milestone

Comments

@mtdeguzis
Copy link

mtdeguzis commented Jul 20, 2018

I tested a login from myself in Chrome, then Firefox. This shows up fine:

[root@icinga icingaweb2]# tailf audit.json
{"activity_time":1532037082,"activity":"logout","message":"User logged out","identity":"mtdeguzis"}
{"activity_time":1532037094,"activity":"login","message":"User logged in","identity":"mtdeguzis"}
{"activity_time":1532107837,"activity":"login","message":"User logged in","identity":"mtdeguzis"}
{"activity_time":1532107845,"activity":"logout","message":"User logged out","identity":"mtdeguzis"

However, I had a user log in (who has read access), and his ID was not recorded.

Here is my configuration screen:

image

image

I grepped for his name and confirmed the login attempt at least in the typicaly icingaweb2 log:

/var/log/icingaweb2/icingaweb2.log:2018-07-20T13:29:13-04:00 - DEBUG - Issueing LDAP search. Use 'ldapsearch -P 3 -H "ldaps://host.domain.com:636" -D "CN=some_user,OU=some_ou=,DC=domain,DC=com" -W -b "DC=domain,DC=com" -s "sub" -z 0 -l 0 -a "never" "(&(&(objectCategory=person)(objectClass=user)(|(department=some_dept)(sAMAccountName=other_admin_user)(sAMAccountName=some_user)))(&(objectClass=user)(sAMAccountName=the_other_user)))"'
@mtdeguzis mtdeguzis changed the title Will not log all IDs Module doesn't seem to log all IDs Jul 20, 2018
@mtdeguzis
Copy link
Author

mtdeguzis commented Jul 20, 2018

Confirmed this is a user rights issue after added the test user to the admin group:

{"activity_time":1532108759,"activity":"login","message":"User logged in","identity":"other_uer"}

The rights of a user should not affect their login/logout being recorded. Sounds like a bug

@mtdeguzis
Copy link
Author

Rights for test-role group:

[test-role]
users = "other_user"
director/filter/hostgroups = "tech-team"
permissions = "module/doc, module/graphite, module/monitoring, monitoring/command/schedule-check, monitoring/command/acknowledge-problem, monitoring/command/remove-acknowledgement, monitoring/command/comment/*, monitoring/command/comment/add, monitoring/command/comment/delete, monitoring/command/downtime/*, monitoring/command/downtime/schedule, monitoring/command/downtime/delete, monitoring/command/process-check-result, monitoring/command/send-custom-notification"
monitoring/filter/objects = "hostgroup_name=tech-team|hostgroup_name=tech-team-servers-443|hostgroup_name=tech-team-servers-22"

@mtdeguzis
Copy link
Author

Hi, any update?

@mtdeguzis
Copy link
Author

Any update?

@nilmerg
Copy link
Member

nilmerg commented Mar 21, 2019

Hi,

sorry for the late response. You're right, this is a user rights issue. A user requires at least the permission module/audit so that his/her actions are logged.

While this is surely not optimal, it's neither a bug. It's due to the architectural design of modules and can't be changed without changing Icinga Web 2 as well. (And possibly other modules)

Though, mentioning it in the documentation is of course a start.. So, as long as it's not possible to avoid, I consider this a documentation related issue.

@nilmerg nilmerg added the enhancement New feature or improvement label Mar 21, 2019
@mtdeguzis
Copy link
Author

mtdeguzis commented Mar 25, 2019

So would the suggestion be to create a base permission set that include this permission for all users?

@nilmerg
Copy link
Member

nilmerg commented Mar 26, 2019

Essentially, yes.

@mtdeguzis
Copy link
Author

That worked. Thank you for the workaround

@nilmerg
Copy link
Member

nilmerg commented Jul 11, 2019

Will be no issue anymore with Icinga Web 2.7. (Icinga/icingaweb2#3849)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants