Git Product home page Git Product logo

loginshibboleth's Introduction

LoginShibboleth

LoginShibboleth is the Shibboleth/LDAP login plug-in for Piwik. Code Climate

Installation

The plug-in can be directly downloaded from the Piwik Marketplace. For the last developer version (unstable), just clone this repository.

Caution: This plug-in needs some configuration and will not work out of box. Read the configuration before activating the plug-in.

Usage

Make sure your Shibboleth implementation is working as it should and you have $_SERVER parameters available.

There is a very basic configuration needed to make this plug-in usable. This can be added to the piwik.conf.ini.

[LoginShibboleth]
shibboleth_user_login = "uid"
shibboleth_user_alias = "fullName"
shibboleth_user_email = "mail"
shibboleth_separator = ";"
shibboleth_superuser_groups = "cn=piwiksuper,ou=unit,o=org"
shibboleth_group = "groupMembership"

Caution 1: The SuperUser should be the member of cn=piwiksuper,ou=unit,o=org.

Caution 2: This plug-in deactivates every other plug-in installed for the Login purpose. As a result after activation, you can only login through Shibboleth.

With these settings, it is safe to activate the plug-in and then try to set the other configuration for the view and admin users with the help of configuration panel which will be available to the SuperUser in Settings Menu.

For Detailed Installation scenarios please check the Wiki.

TODO

  • Complete the test cases
  • Add caching capability
  • Finishing the Wiki
  • Have LDAP adapter as a separate plug-in
  • Make the plug-in work out of the box

Contribute

If you find any bug or error in this product please fill it in github. Merge request in github will also be accepted, if suitable. For API documentation go here. Language updates can also be added. Take the lang/en.json as template.

loginshibboleth's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

loginshibboleth's Issues

getSiteId() works only with http protocol

LoginShibbolethUser::getSiteId expects all the URLs tested against to start with http://. It won't work with https:// websites.

Possible fixes

  • Remove the protocol from $domain and use a LIKE operator:
    $domain = '%://' . $parsedDomain['path'];
    $siteId = Db::fetchOne('SELECT idsite FROM ' . Common::prefixTable('site') . ' WHERE main_url LIKE ?',
      array($domain));
    
  • Use an OR condition to check both https and http protocol at the same time
  • Use a REGEXP operator
  • Don't change the code, but document this behaviour

@pouyana I'd be happy to submit a MR based on the solution that suits you best.

PHP fatal error after activating LoginShibboleth plugin in piwik

Hi,

if i activate the plugin, the piwik webinterface only shows a blank page and i get the following php error:

PHP Fatal error: Cannot declare class Piwik\\Plugins\\LoginShibboleth\\Menu, because the name is already in use in /var/www/piwik/plugins/ShibbolethLogin/Menu.php on line 0, referer: http://webdev/index.php?module=CorePluginsAdmin&action=plugins&idSite=1&period=day&date=yesterday&activated=&mode=admin&sort=

I tested piwik 2.16.0 on debian jessie with php 5.6 and piwik 2.16.5 on ubuntu xenial with php 7.0 - same error on both systems.

The plugin was installed via Piwik Marketplace and i added the LoginShibboleth section to the config.ini.php.

Any ideas what i did wrong? Please let me know if you need some further information.

Call to undefined method error getHashTokenAuth()

Hi,

after installing version 1.1.10 i got the following error:
Call to undefined method Piwik\\Plugins\\LoginShibboleth\\LoginShibbolethAuth::getHashTokenAuth()

I tested piwik 2.16.0 on debian jessie with php 5.6 and piwik 2.16.5 on ubuntu xenial with php 7.0 - same error on both systems.

This time i installed the plugin via zip-Upload and via Marketplace...same result with both scenarios.

Problem with API calls which use authenticateWithToken()

Hi,

I use your Plugin whith shibboleth only, so all informations and permissions are obtained via the header parameters if a user visits piwik. This works fine after some configuration. But if I try to use the API with a auth_token via a script the authentication fails, because the authenticateWithToken() method in LoginShibbolethAuth.php returns an AuthResult::FAILURE.

Therefore I think this line
$user = $piwikUserModel->getUser($login);
should be treplaced with this line (as used in the Auth.php form the basic Login plugin)
$user = $piwikUserModel->getUserByTokenAuth($token);
In my case this works, is this the right way to do it?

Thanks, Simon

mandatory LDAP settings - shibboleth only scenarios not working

Hi,

there are some LDAP settings that are mandatory, even if LDAP is disabled.

I configured the plugin via config.ini.php and disabled LDAP with ldap_active = 0 Nevertheless, i get the following error message: Can not connect to the LDAP server.
If i configure an existing LDAP-Server everything is fine...

Furthermore i had to set shibboleth_view_groups_option and shibboleth_admin_groups_ldap_dn, although i set shibboleth_groups_manual_active = 1. Just as I understand the documentation in the wiki, it should only be neccessary to set shibboleth_groups_manual and shibboleth_superuser_groups. Or have I misunderstood that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.