Skip to main content

Plone PAS plugin for adding roles (or groups) to anonymous or logged-in visitors looking for HTTP Headers.

Project description

Add roles to (anonymous or logged-in) visitors based on browser HTTP header

Introduction

The AutoRoleFromHostHeader plugin allows to assign roles to users looking at client HTTP headers.

There is an extraction and authentication plugin included, to enable additional roles for anonymous users. They are required since PAS does not support roles (or properties or groups) for anonymous users. You can disable these interfaces if only logged-in users should get additional roles.

AutoRoleFromHostHeader furthermore provides a groups plugin interface, allowing you to assign groups instead of roles.

Configuration

The plugin is configured by editing the Header name, regexp and roles property on the plugin’s Properties screen. Each line represents a mapping from an header value (using a regexp match) to one or more roles. The format is as follows:

http_header_name; regular expression; role[, role ...]

Assign groups, not roles

This plugin can be used to assign groups instead of roles if used as a group plugin instead of a role plugin:

http_header_name; regular expression; group

Caveat

If you have AutoRoleFromHostHeader configured for anonymous users and come from a network matching one of its rules, you will NOT be able to log in with an account from a higher-up user folder. This is because AutoRole authenticates the Anonymous User which stops the lookup process.

Dependencies

Tested with:

  • Plone 3.3

  • Plone 4.1

Credits

Developed with the support of Azienda USL Ferrara; Azienda USL Ferrara supports the PloneGov initiative.

Azienda USL's logo

Authors

  • This product was developed by RedTurtle Technology team.

    RedTurtle Technology Site
  • AutoRoleFromHostHeader is not an original idea but is taken from the work made by Jarn company for the AutoRole plugin.

  • Special thanks to Mauro Amico (mamico) for giving us the main direction.

Changelog

0.3.0 (2011-10-17)

  • Fixed compatibliy with webserverauth [yurj]

  • Updates tests on Plone 4.1 [keul]

0.2.0 (2010-10-04)

  • Fixed project URL on plone.org [keul]

  • Added plugin icon [keul]

  • Fixed broken tests [keul]

  • Added z3c.autoinclude support [keul]

0.1.0a (2010-03-24)

  • Initial release

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.AutoRoleFromHostHeader-0.3.0.tar.gz (16.6 kB view details)

Uploaded Source

File details

Details for the file Products.AutoRoleFromHostHeader-0.3.0.tar.gz.

File metadata

File hashes

Hashes for Products.AutoRoleFromHostHeader-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4e721800a416846d00ecc46ae4a970f556708d6bbb949da7c08c789f50bb082a
MD5 c7cbe950c9e3ff303b431a7232a9d9ae
BLAKE2b-256 8f08cd31d85972f6b7412ea80be7dfb40a91575d2bd3652b026b6cd15817f0d9

See more details on using hashes here.

Supported by

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