Search:

Apache » Lenya
project logo
  • Project
  • Developer
  • Community
  • Version 2.2
  • Version 2.0
  • Version 1.2
  • Version 1.2
    • Installation
      • Download
      • Subversion Access
      • Install Instructions
    • Tutorial
      • Introduction
      • 1. Understanding Lenya
      • 2. Installing Lenya
      • 3. Anatomy of the Pipeline
      • 4. Editing in Lenya
      • 5. Custom Navigation in Lenya
      • 6a. Mod Proxy and Lenya
      • 6b. Mod Proxy and Lenya
    • How-To
      • FAQ
      • New Publication
      • Deploy Publication
      • Look and Feel
      • Custom Resource Type
      • Adding Mime Types
      • Site Navigation
      • LDAP Authentication
      • CMS Menus
      • CMS Screens
      • Search Publications
      • External Data
      • Unit Tests
    • Components
      • Access Control
        • Basic Terms
        • Access Controllers
        • Access Controller Resolvers
        • Authenticators
        • Authorizers
        • Policies and Policy Managers
        • Accreditable Managers
        • SSL Encryption
      • Authoring
        • Adding a new document creator
        • Image Upload
        • OpenOffice
      • Deployment
        • Proxying
      • Editors
        • HTML Form Editor
        • HTML One Form Editor
        • Bitflux Editor
        • Kupu
        • Xopus
      • Layout
        • Navigation
        • XHTML templating
        • Serving static resources
        • Lenya Menubar
      • Publication
        • PageEnvelopeModule
        • Site tree
      • Resource Types
        • Resource Types
      • Revision Control
        • Revision Controller
        • RCML
        • Check In
        • Check Out
        • Revisions
        • Rollback
      • Repository
        • WebDAV Servers
      • Search
        • Searching with Lucene
      • URI Handling
        • URI Parametrizer
        • URI Scheme
        • Usecases
      • Asset Management
        • Asset Management
      • Link Management
        • Link Management
      • Meta Data
        • Meta Data Handling
      • Multilingual Documents
        • Multilingual Document Handling
      • Tasks
        • The Task Concept
        • Defining Tasks
        • The TaskAction
        • Scheduling a Task
        • Included tasks
          • AntTask
          • DefaultFilePublisher
          • StaticHTMLExporter
          • MailTask
        • Developing Tasks
      • Workflow
        • Terms
        • The State Machine
        • Configuration
        • Implementation
      • Site Management
        • Archive
        • Copy
        • Deactivate
        • Delete
        • Delete the trash
        • Move
        • Move Up/Down
        • Rename
        • Restore
    • Miscellaneous
      • Namespaces
      • Reserved Names
      • XInclude Processor
    • 1.2 API (Javadoc)

Current Event

Meeting Bad Säckingen 2009

Built with Apache Lenya

Authorizers

Table of Contents
  • Introduction
  • PolicyAuthorizer
  • UsecaseAuthorizer
  • WorkflowAuthorizer

Introduction

An Authorizer checks if an Identity is authorized to invoke a certain request.

The DelegatingAuthorizerAction tries to resolve an AccessController for the URL. If an AccessController could be resolved, its authorize(Request) method is used to authorize the request. If no AccessController could be found, the access to the request is granted for free.

The DefaultAccessController delegates the authorization to its Authorizers. Only when all Authorizers return true, the request is authorized.

PolicyAuthorizer

A PolicyAuthorizer uses Policies for authorizing. It returns true, when the current Identity has at least one Role for the requested URL.

UsecaseAuthorizer

This Authorizer looks for the lenya.usecase request parameter and checks the usecase policy file for the Roles that are allowed to execute this usecase. The location of this file is defined using the configuration parameter which points to a URL:

<authorizer type="usecase">
  <parameter name="configuration"
      value="context:///lenya/pubs/mypub/config/ac/usecase-policies.xml"/>
</authorizer>

The usecase policy file might look as follows:

<?xml version="1.0"?>
<usecases xmlns="http://apache.org/cocoon/lenya/ac/1.0">
  <usecase id="create">
    <role id="editor"/>
  </usecase>
  <usecase id="rename">
    <role id="editor"/>
  </usecase>
</usecases>

WorkflowAuthorizer

The WorkflowAuthorizer is responsible for protecting workflow transitions. Therefore it

  • looks for the lenya.event request parameter,
  • determines the current state of the workflow instance, and
  • checks if the event may be invoked by one of the current Roles in this state.

The WorkflowAuthorizer has no configuration options:

<authorizer type="workflow"/>

Copyright © 1999-2009 The Apache Software Foundation. All rights reserved.