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

[dev.icinga.com #13991] Possible race condition in API filters #4919

Closed
icinga-migration opened this issue Jan 13, 2017 · 1 comment
Closed
Labels
area/api REST API bug Something isn't working

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/13991

Created by jflach on 2017-01-13 08:51:24 +00:00

Assignee: jflach
Status: New
Target Version: (none)
Last Update: 2017-01-13 08:51:24 +00:00 (in Redmine)

Icinga Version: 2.6.0
Backport?: Not yet backported
Include in Changelog: 1

There is a possible race condition when running multiple API requests, causing a user to be able to access objects they are not allowed to.

Example:

$ for i in {1..10}; do (curl -k -s -u "test:7kPXq7iaqRUo3mk4" -H 'Accept: application/json' -X POST 'https://localhost:5665/v1/actions/schedule-downtime?type=Service' -d '{"comment": "test", "author": "test", "start_time": 1400000000, "end_time": 1500000000, "duration": 0}' | python -m json.tool | grep -F '"name":' | grep -vF '"name": "ns1!' &); done; sleep 10
            "name": "gateway!ping4!icinga2test-1461616884-3013",
            "name": "foo!ping6!icinga2test-1461616884-3023",
            "name": "foo!http!icinga2test-1461616884-3036",
            "name": "foo!swap!icinga2test-1461616884-3088",
            "name": "ns2!ping6!icinga2test-1461616884-3094",
@icinga-migration icinga-migration added bug Something isn't working area/api REST API labels Jan 17, 2017
@Crunsher
Copy link
Contributor

Crunsher commented Nov 9, 2017

I was unable to reproduce this with the current master.

I tried the example with 10 requests, 200 requests, working requests simultaneously

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api REST API bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants