Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-4214

Can't open a link to Observium without entering Page URL manually

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • None
    • Professional Edition
    • Web Interface

    Description

      We have another System where I implemented some of the Observium Graphs via the graph api, and i wanted to link to the corresponding page in observium. But whenever i Open the Link i get a ton of 302 redirects which then breaks because of " too many redirects".

      I don't know what to change. i allready tryed to change the CORS headers in apache, but that didn't resolve the issue.

       

      I attached the config files which i think are necessary

      Attachments

        1. 000-default.conf
          2 kB
        2. config.php
          2 kB

        Activity

          [OBS-4214] Can't open a link to Observium without entering Page URL manually

          its working with 'Lax'

          Exellent Axel Lodyga added a comment - its working with 'Lax'

          Should be fixed in r12251.

          landy Mike Stupalov added a comment - Should be fixed in r12251.

          Ohh, I not understand trouble initially.

          Can you try with set this policy to 'Lax' in code?

          landy Mike Stupalov added a comment - Ohh, I not understand trouble initially. Can you try with set this policy to 'Lax' in code?

          Hey @Mike Why is the ticket marked as resolved, and moved to helping? You just didn't get what my problem.
          The problem is not api related, the problem is that links from external websites to obersevium can't open because of the strict policy in the cookie.

          Exellent Axel Lodyga added a comment - Hey @Mike Why is the ticket marked as resolved, and moved to helping? You just didn't get what my problem. The problem is not api related, the problem is that links from external websites to obersevium can't open because of the strict policy in the cookie.

          Hy Mike, thats not quite what i wan't. I would like to have authentication needed, for the graphs as for the the normal observium view. But the "OBSID" Cookie you set has a "Strict" Site policy, that prohibits oben a link to obersvium from another webpage. and this config should be optional ( but recommendet ).

          Exellent Axel Lodyga added a comment - Hy Mike, thats not quite what i wan't. I would like to have authentication needed, for the graphs as for the the normal observium view. But the "OBSID" Cookie you set has a "Strict" Site policy, that prohibits oben a link to obersvium from another webpage. and this config should be optional ( but recommendet ).

          You can use one of this config.php option(s):

          $config['allow_unauth_graphs']      = 0;       // Allow graphs to be viewed by anyone
          $config['allow_unauth_graphs_cidr'] = []; // Allow graphs to be viewed without authorisation from certain IP ranges
          

          For example:

          $config['allow_unauth_graphs_cidr'] = [
           '10.0.0.0/8', '192.168.0.0/16'
          ];
          

          landy Mike Stupalov added a comment - You can use one of this config.php option(s): $config['allow_unauth_graphs'] = 0; // Allow graphs to be viewed by anyone $config['allow_unauth_graphs_cidr'] = []; // Allow graphs to be viewed without authorisation from certain IP ranges For example: $config['allow_unauth_graphs_cidr'] = [ '10.0.0.0/8', '192.168.0.0/16' ];

          Okay I digged a little deeper. if don't use https and don't open the link in a new tab (target="_blank");
          at least i get a login screen ( even the cookie ( remember me) is set. but whatever i do i can't login.

          Okay now i found the Problem:
          in

          html/includes/authenticate.inc.php in line 67
          
          

          the cookie is set with the following parameter:

            'samesite' => 'Strict'
          

          you should make this a configurable option.

          If you comment out this line, everything works as expected.

          Exellent Axel Lodyga added a comment - Okay I digged a little deeper. if don't use https and don't open the link in a new tab (target="_blank"); at least i get a login screen ( even the cookie ( remember me) is set. but whatever i do i can't login. Okay now i found the Problem: in html/includes/authenticate.inc.php in line 67 the cookie is set with the following parameter: 'samesite' => 'Strict' you should make this a configurable option. If you comment out this line, everything works as expected.

          General questions and device support can be discussed in our Discord channel, click here to join.


          Please make and attach additional information about the device:

          • full snmp dump from device:

            snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1 > myagent.snmpwalk
            snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk

            If device not support SNMP version 2c, replace -v2c with -v1.

          • If you have problems with discovery or poller processes, please do and attach these debugs:

            ./discovery.php -d -h <device>
            ./poller.php -d -h <device>

          • additionally attach device and/or vendor specific MIB files

          This comment is added automatically.

          bot Observium Bot added a comment - General questions and device support can be discussed in our Discord channel, click here to join . Please make and attach additional information about the device: full snmp dump from device: snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1 > myagent.snmpwalk snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk If device not support SNMP version 2c, replace -v2c with -v1. If you have problems with discovery or poller processes, please do and attach these debugs: ./discovery.php -d -h <device> ./poller.php -d -h <device> additionally attach device and/or vendor specific MIB files This comment is added automatically.

          People

            landy Mike Stupalov
            Exellent Axel Lodyga
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: