Authentication and User Management

Anonymous Authentication

Updated: July 17, 2023

This plugin provides anonymous authentication. Users are automatically logged as a configurable Anonymous user. This module also includes additional actions (to be able to login when already logged as Anonymous) and a dedicated Exception handling (to automatically redirect Anonymous users to login screen after a security error).

To activate this authentication plugin:

  1. Add the plugin to the authentication chain. Contribute an XML extension from the following content. Adapt the authenticationChain element content with the list of plugins you want to use.

    <extension
     target="org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService"
     point="chain">
     <authenticationChain>
       <plugins>
         <plugin>BASIC_AUTH</plugin>
         <plugin>ANONYMOUS_AUTH</plugin>
         <plugin>THE_PLUGIN_I_WANT_TO_USE</plugin>
       </plugins>
     </authenticationChain>
    </extension>
    

    Use ANONYMOUS_AUTH.

  2. Configure the plugin via an XML descriptor (define who the anonymous user will be) in an XML extension in Nuxeo Studio or an XML file nxserver/config/anonymous-auth-config.xml.

     <?xml version="1.0"?>
     <component name="org.nuxeo.ecm.platform.login.anonymous.config">
    
       <!-- Add an Anonymous user -->
       <extension target="org.nuxeo.ecm.platform.usermanager.UserService" point="userManager">
         <userManager>
           <users>
             <anonymousUser id="Guest">
               <property name="firstName">Guest</property>
               <property name="lastName">User</property>
             </anonymousUser>
           </users>
         </userManager>
       </extension>
    
     </component>
    
    
  3. Adapt the anonymousUser id and properties.
  4. Save.