Ad Widget

Collapse

API When Using HTTP Authentication

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gpmidi
    Member
    • Aug 2009
    • 62

    #1

    API When Using HTTP Authentication

    I've found that with 1.8 you must use Zabbix internal authentication in addition to the HTTP authentication. This means that you must use HTTP authentication and then call login with whatever username/password was set BEFORE HTTP authentication was enabled.

    I think that the current Zabbix trunk can be updated to work with HTTP authentication by setting line 379 of class.cuser.php to:
    if($login && $auth_type==ZBX_AUTH_INTERNAL){
    I've provided a patch in http://www.zabbix.com/forum/showthre...9515#post59515.

    If you use this Python API your login code would look like this:
    Code:
    api=zabbix_api('my.server.com','/zabbix',user='some-user',passwd='meh-http-password')
    api.login(user='some-user',password='meh-zabbix-internal-password')
Working...