Skip to main content

Products.NoDuplicateLogin

Project description

This PAS plugin will reject multiple logins with the same user at the same time. It ensures that only one browser may be logged with the same userid at one time.

Implementation

The implementation works like this: Suppose that Anna and Karl are two people who share a login annaandkarl in our site. Anna logs in, authenticating for the first time. We generate a cookie with a unique id for Anna and remember the id ourselves. For every subsequent authentication (i.e. for every request), we will make sure that Anna’s browser has the cookie.

Now Karl decides to log in into the site with the same login annaandkarl, the one that Anna uses to surf the site right now. The plugin sees that Karl’s browser doesn’t have our cookie yet, so it generates one with a unique id for Karl’s browser, remembers it and forgets about Anna’s cookie.

What happens when Anna clicks on a link on the site? The plugin sees that Anna has our cookie but that it differs from the cookie value that it remembered (Karl’s browser has that cookie value). Anna is logged out but the plugin and sees the message “Someone else logged in under your name”.

Usage

This product, when active, will automatically prevent users from staying logged in if they attempt to open a second session. This works well for all authentication schemes that have a concept of credential reset, but for users logged in with Basic Auth this will not work as expected, and both sessions will interfere with eachother without one being permanently ended. This is a limitation of the Basic Auth technology, so we recommend not using this plugin in combination with Basic Auth sites.

This plugin also provides a revoke_session view on itself, which can be accessed by visiting http://www.example.com/acl_users/no_duplicate_login/revoke_session, which can be used by site administrators to manually invoke the forced logout mechanism.

Installation

Add Products.NoDuplicateLogin to the eggs parameter of your plone.recipe.zope2instance section:

[plone]
recipe = plone.recipe.zope2instance
eggs =
    Plone
    ...
    Products.NoDuplicateLogin

Now run buildout and restart Plone. Once Plone has started, login and browse to Site Setup -> Zope Management Interface -> acl_users and add a No Duplicate Login Plugin from the drop down menu in the upper right.

After that, click on the No Duplicate Login Plugin object in the acl_users folder listing. For each of the Authentication, Credential Update and Reset Credentials objects in the No Duplicate Login Plugin folder listing, click, then move the no_duplicate_login plugin from the Available Plugins display widget on the left to the Active Plugins display widget on the right using the arrow buttons in the middle.

It you will also need to “arrow up” the no_duplicate_login plugin in the Active Plugins display listing for both Authentication and Reset Credentials.

If you are using a policy product to install this as part of your deployment you can perform these actions by including an empty noduplicatelogin.xml file in your profile directory.

History

2.0 (2014-11-25)

  • Security and performance improvements [matthewwilkes]

  • Remove reimplementation of plone.session [matthewwilkes]

  • Change internal data structures to avoid unnecessary object stores [matthewwilkes]

  • Add tests to test harness [matthewwilkes]

  • Fix pure Zope compatibility [matthewwilkes]

1.0a2 (02/18/2011)

  • Add more installation instructions

1.0a1 (12/17/2010)

  • Add test harness [aclark]

  • Rip out “experimental” session storage, too many ZODB conflicts. [aclark]

  • Plone 4 compat [aclark]

  • Re-package as egg [aclark]

1.0 svn/dev

  • Plone 3 compat [perrito]

  • Original implementation [nouri]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Products.NoDuplicateLogin-2.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Products.NoDuplicateLogin-2.0-py2-none-any.whl (16.6 kB view details)

Uploaded Python 2

File details

Details for the file Products.NoDuplicateLogin-2.0.tar.gz.

File metadata

File hashes

Hashes for Products.NoDuplicateLogin-2.0.tar.gz
Algorithm Hash digest
SHA256 a76e61e617b2d2d7ec9c4f3cf20a41127ff8186d6396757fe0d1cb9571d089f5
MD5 869de94370a9b859a305c16f4cd939f4
BLAKE2b-256 8b01c7062bb5b167f8f7c0a95cfc2f697c4af269c24187b23bed56dfc1e44e7d

See more details on using hashes here.

File details

Details for the file Products.NoDuplicateLogin-2.0-py2-none-any.whl.

File metadata

File hashes

Hashes for Products.NoDuplicateLogin-2.0-py2-none-any.whl
Algorithm Hash digest
SHA256 62f09667209480f4d04b3224ba35966e6667ec8604dda0bee4410cbbc12fa684
MD5 46e0b26fc53219c5a40d6de28540bb9f
BLAKE2b-256 a589cb79a23c60f53e116ef83486d0dd36b4bb7d1b4ab873e4e68e5fddea5ef2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page