by Luca Fabbri last modified Aug 05, 2013 01:35 PM
Contributors: mamico

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

Project Description

AutoRoleFromHostHeader PAS Plugin

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


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.


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


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.


Tested with:

  • Plone 3.3
  • Plone 4.1


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

Azienda USL's logo


  • 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.


[ ] Internationalized

[X] Unit tests

[X] End-user documentation

[ ] Internal documentation (documentation, interfaces, etc.)

[X] Existed and maintained for at least 6 months

[ ] Installs and uninstalls cleanly

[ ] Code structure follows best practice

Current Release
Products.AutoRoleFromHostHeader 0.3.0

Released Oct 17, 2011 — tested with Plone 4.1, Plone 4, Plone 3

Plone 4.1 and webserverauth compatibility
More about this release…

Download file Get Products.AutoRoleFromHostHeader for all platforms
If you are using Plone 3.2 or higher, you probably want to install this product with buildout. See our tutorial on installing add-on products with buildout for more information.

All Releases

Version Released Description Compatibility Licenses Status
0.3.0 Oct 17, 2011 Plone 4.1 and webserverauth compatibility More about this release…
Plone 4.1
Plone 4
Plone 3
GPL final
0.2.0 Oct 04, 2010 Fixed some tests. More about this release…
Plone 3
GPL final
0.1.0a More about this release… GPL alpha