Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    pyramid_multiauth 0.3.0

    Download button

    No screenshots available
    Downloads: 130  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Mozilla Services Team | More programs
    Other/Proprietary Li... / FREE
    February 3rd, 2012, 04:09 GMT [view history]
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    pyramid_multiauth description

    Stacked authentication policies for pyramid

    pyramid_multiauth is an authentication policy for Pyramid that proxies to a stack of other authentication policies.

    Overview

    MultiAuthenticationPolicy is a Pyramid authentication that proxies to a stack of other IAuthenticationPolicy objects, to provide a combined auth solution from individual pieces. Simply pass it a list of policies that should be tried in order:

    policies = [
     IPAuthenticationPolicy("127.0.*.*", principals=["local"])
     IPAuthenticationPolicy("192.168.*.*", principals=["trusted"])
    ]
    authn_policy = MultiAuthenticationPolicy(policies)
    config.set_authentication_policy(authn_policy)


    This example uses the pyramid_ipauth module to assign effective principals based on originating IP address of the request. It combines two such policies so that requests originating from "127.0.*.*" will have principal "local" while requests originating from "192.168.*.*" will have principal "trusted".

    In general, the results from the stacked authentication policies are combined as follows:

    - authenticated_userid: return userid from first successful policy
    - unauthenticated_userid: return userid from first successful policy
    - effective_principals: return union of principals from all policies
    - remember: return headers from all policies
    - forget: return headers from all policies

    Deployment Settings

    It is also possible to specify the authentication policies as part of your paste deployment settings. Consider the following example:

    [app:pyramidapp]
    use = egg:mypyramidapp

    multiauth.policies = ipauth1 ipauth2 pyramid_browserid

    multiauth.policy.ipauth1.use = pyramid_ipauth.IPAuthentictionPolicy
    multiauth.policy.ipauth1.ipaddrs = 127.0.*.*
    multiauth.policy.ipauth1.principals = local

    multiauth.policy.ipauth2.use = pyramid_ipauth.IPAuthentictionPolicy
    multiauth.policy.ipauth2.ipaddrs = 192.168.*.*
    multiauth.policy.ipauth2.principals = trusted


    To configure authentication from these settings, simply include the multiauth module into your configurator:

    config.include("pyramid_multiauth")

    In this example you would get a MultiAuthenticationPolicy with three stacked auth policies. The first two, ipauth1 and ipauth2, are defined as the name of of a callable along with a set of keyword arguments. The third is defined as the name of a module, pyramid_browserid, which will be procecesed via the standard config.include() mechanism.

    The end result would be a system that authenticates users via BrowserID, and assigns additional principal identifiers based on the originating IP address of the request.


    Product's homepage

    Requirements:

    · Python

    What's New in This Release: [ read full changelog ]

    · Support for Python3 via source-level compatibility.
    · Fire a MultiAuthPolicySelected event when a policy is successfully used for authentication.

      


    TAGS:

    stacked authentication | authentication policy | Pyramid authentication | Pyramid | stacked | authentication

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM