Skip to content

Remove logoff option when using basic authentication #4180

Closed

Description

@TheWitness

Describe the bug

When using SSO methods in Cacti with Basic Authentication, Cacti has not way to invalidate the session as it's controlled by the SSO provider, so there should not be a logoff link on the Cacti pages.

Expected behavior

Less confusion user interface.

Activity

  1. added this to the v1.2.17 milestone on Mar 19, 2021
  2. added a commit that references this issue on Mar 19, 2021
  3. netniV commented on Mar 22, 2021

    @netniV
    Member

    Actually, you can make Basic Auth sign out using a bit of javascript. You clear the auth cache and that should do it, something like:

    <script type="text/javascript">
    function logout() {
        var xmlhttp;
        if (window.XMLHttpRequest) {
            xmlhttp = new XMLHttpRequest();
    
            xmlhttp.open("GET", '/ERROR/401', true, "logout", "logout");
            xmlhttp.send("");
            xmlhttp.onreadystatechange = function() {
                if (xmlhttp.readyState == 4) {window.location.href='/';}
            }
        } else if (window.ActiveXObject) { // code for IE
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    
            // IE clear HTTP Authentication
            document.execCommand("ClearAuthenticationCache");
            window.location.href='/where/to/redirect';
        }
    
        return false;
    }
    </script>
  4. TheWitness commented on Mar 23, 2021

    @TheWitness
    MemberAuthor

    When using siteminder, your only choice is to have the siteminder logoff URL and redirect the client to that location. At that point I suspect that the client would be again redirected to the corporate sign in page.

  5. changed the title [-]When using 'basic' authentication, there should be no logoff link as it's not possible[/-] [+]Remove logoff option when using basic authentication since Cacti can't always honor the feature[/+] on Apr 12, 2021
  6. changed the title [-]Remove logoff option when using basic authentication since Cacti can't always honor the feature[/-] [+]Remove logoff option when using basic authentication[/+] on Apr 12, 2021
  7. locked and limited conversation to collaborators on Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions