gr8b / zabbix-module-sqlexplorer

Zabbix UI module. Allow to make SQL queries and export results to .csv files
MIT License
14 stars 6 forks source link

Zabbix 7.0.2 Configuration and CSV have Error Access Denied #13

Open icchoc opened 1 month ago

icchoc commented 1 month ago

Zabbix 7.0.2 used module version 1.12 have Error Access Denied Configuration and CSV (but can use Preview).

image

and when saved SQL, don't show name. image

gr8b commented 1 month ago

Cannot reproduce on Zabbix tags/7.0.2 and module 1.12 version. Please ensure that content of installed module file actions/BaseAction.php in lines range 54-67 match content from this file.

icchoc commented 1 month ago

Yes, File actions/BaseAction.php in lines range 54-67 match content already and I try replace file again still the same error.

Cannot reproduce on Zabbix tags/7.0.2 and module 1.12 version. Please ensure that content of installed module file actions/BaseAction.php in lines range 54-67 match content from this file.

gr8b commented 1 month ago

Can you please provide more information on:

icchoc commented 4 weeks ago

Can you please provide more information on:

  • php version, webserver (apache, nginx, any other)

  • php version 8.3.6

  • webserver is apache

  • how you installed Zabbix (from git sources, from package)

  • install from git sources

  • do you use module "Safe mode" option yes, I use Safe mode but not work.

gr8b commented 4 weeks ago

Which one did you used to install Zabbix: tags/7.0.2 or release/7.0

icchoc commented 4 weeks ago

Which one did you used to install Zabbix: tags/7.0.2 or release/7.0

Zabbix 7.0.2

Godd67 commented 3 weeks ago

I have same issue on 6.4.17, installed in docker with version 1.10 . Any hints how to workaround? Also, side question - what is a proper way to upgrade to a new module version? Copy over/wipe first etc? Is it backward compatible ?

gr8b commented 3 weeks ago

Also, side question - what is a proper way to upgrade to a new module version? Copy over/wipe first etc?

To install a different version of the module, you need to delete the directory with the old version and add the new version. Then, click "Scan directory" on the page with the list of modules.

Is it backward compatible ?

Yes, module is backward compatible, queries created with one version will be available in other version of module.

gr8b commented 3 weeks ago

I have same issue on 6.4.17, installed in docker with version 1.10 . Any hints how to workaround?

I would suggest to install latest version of module because the issue you reported were fixed in version 1.11.

gr8b commented 3 weeks ago

I tried to reproduce the issue on version 6.4.17 using the latest version of the module (1.12) but could not. Here is what I did:

git worktree add ../tags/6.4.17 tags/6.4.17
cd ../tags/6.4.17
# create 6.4.17 database
cd ui/modules
curl -OL https://github.com/gr8b/zabbix-module-sqlexplorer/releases/download/v1.12/v1.12-zabbix-6.4-7.0.zip
mkdir zabbix-module-frontent-sqlexplorer
unzip v1.12-zabbix-6.4-7.0.zip -d zabbix-module-frontent-sqlexplorer/
Godd67 commented 3 weeks ago

I upgraded to 1.12 , but it did not help... I guess it is my setup - I run Zabbix in docker - could it be user permission issue?

Godd67 commented 3 weeks ago

Actually, now behavior is different - I am still getting "Admin " permission errors, but if I run SQL , i'm getting Cloudflare block :( Have you seen this before ? Any workarounds? We run zabbix via CF DNS record. image

gr8b commented 3 weeks ago

I upgraded to 1.12 , but it did not help... I guess it is my setup - I run Zabbix in docker - could it be user permission issue?

This sounds strange because issue is in how module determine Zabbix version it is run on. Do you have custom dockerfile? Is it possible to get minimal version, to be able to reproduce?

gr8b commented 3 weeks ago

Actually, now behavior is different - I am still getting "Admin " permission errors, but if I run SQL , i'm getting Cloudflare block :( Have you seen this before ? Any workarounds? We run zabbix via CF DNS record. image

CF is blocking request with sql similar content? 😮 If it is so i am afraid there is nothing could be done from module side because it should somehow transfer query to PHP side to execute.. Only.. I can try to make a workaround if you would help with testing it.

Godd67 commented 3 weeks ago

It may be a custom rule for company's DNS, Yes, I can test it if it does not involve any complex stuff.

gr8b commented 3 weeks ago

Can you test 1.12 from attached .zip with additional fix to hide query content from CF filters? v1.12-zabbix-6.4-7.0.zip

gr8b commented 3 weeks ago

I am still interested in reproducing the reported error. Could you help by providing the following information?

Godd67 commented 2 weeks ago

Sorry , took me long time - I still have not used new 1.12 but it starts working for me at least partially and it is fully working for my colleague .

The only difference I see is that he works from companies VPN.

Godd67 commented 2 weeks ago

I am still interested in reproducing the reported error. Could you help by providing the following information?

* Constants `ZABBIX_VERSION`, `ZABBIX_API_VERSION` and `ZABBIX_EXPORT_VERSION `defined in `defines.inc.php` file

define('ZABBIX_VERSION', '6.4.17'); define('ZABBIX_API_VERSION', '6.4.17'); define('ZABBIX_EXPORT_VERSION', '6.4');

gr8b commented 2 weeks ago

Sorry , took me long time - I still have not used new 1.12 but it starts working for me at least partially and it is fully working for my colleague .

  • CF stopped blocking SQL
  • Configuration does not work for me , but works for my coworker, our users seems similar - both have SA role and System default Frontend Access.

The only difference I see is that he works from companies VPN.

Module do not have limitation based on user type and/or role. Can you provide what is submitted to server from browser when you receive "Access denied" error?

gr8b commented 1 day ago

@Godd67 do you have any news on issue?