client api: accessing sthpw search types using non admin user - Printable Version +- TACTIC Open Source (http://forum.southpawtech.com) +-- Forum: TACTIC Open Source (http://forum.southpawtech.com/forumdisplay.php?fid=3) +--- Forum: TACTIC Discussion (http://forum.southpawtech.com/forumdisplay.php?fid=4) +--- Thread: client api: accessing sthpw search types using non admin user (/showthread.php?tid=249) |
client api: accessing sthpw search types using non admin user - LazyLeopard - 11-17-2021 I am playing with the python client api at the moment. I have been able to get this sequence going. Code: import tactic_client_lib as tcl I am also able to query other `sthpw` search types including `sthpw/file` and `sthpw/snapshot`. All of which pound the db very heavily. Actually, I can also don't need any special permissions to go ahead and delete the admin user Code: server.delete_sobject('sthpw/login?code=admin') or directly update its password without any problem! Code: user = server.get_by_search_key('sthpw/login?code=user') Is this intended behaviour? What can I do to disable this? RE: client api: accessing sthpw search types using non admin user - listy - 11-18-2021 1. Where are you running this code? From the script editor as admin ? 2. Print current login and ticket using api to make sure RE: client api: accessing sthpw search types using non admin user - LazyLeopard - 11-18-2021 (11-18-2021, 10:10 AM)listy Wrote: 1. Where are you running this code? From the script editor as admin ?I am running this code from a python repl from my host against the docker 4.8.0 image. I login using the get_ticket + set_ticket sequence. RE: client api: accessing sthpw search types using non admin user - LazyLeopard - 11-19-2021 (11-18-2021, 04:58 PM)LazyLeopard Wrote:(11-18-2021, 10:10 AM)listy Wrote: 1. Where are you running this code? From the script editor as admin ?I am running this code from a python repl from my host against the docker 4.8.0 image. For your convenience: test_tactic.py Code: #!/usr/bin/env python Windows CMD Code: (venv) D:\talha.ahmed\Workspace>python test_tactic.py RE: client api: accessing sthpw search types using non admin user - Diego - 11-22-2021 Hi LazyLeopard, this is bad security bug! I tracked it to src/pyasm/search/search.py When api_mode is open (default) there is no check for access to some security critical tables Could you open an Issue on github reporting the bug? I will make a PR to fix it... RE: client api: accessing sthpw search types using non admin user - LazyLeopard - 11-23-2021 Bug Report Posted: https://github.com/Southpaw-TACTIC/TACTIC/issues/1694 RE: client api: accessing sthpw search types using non admin user - Diego - 11-23-2021 Thanks LazyLeopard! I submitted a PR to fix the bug. I will update the docker images whenever Remko merge it. If you want to test it, it's an easy edit on src/pyasm/search/search.py Cheers. |