How do I configure security in a Relational Database
Using Zope3 Security with a Relational Database
0. Preamble
The tutorial explains how to configure Zope3 Security when you are storing your data on an external database. You will need to complete the tutorial HowDoIUseSQLScript in the Zope3 Wiki (Zope in Anger Section) before going through this tutorial.
To install the code for this tutorial:
- Install the code for the HowDoIUseSQLScript tutorial
- Download the code from the wiki and extract it HowDoIConfigureSecurityViaSQL.shar
- Move the mysecurity to the sqldemo/src folder
- Edit sqldemo/src/sqldemo/configure.zcml and add the mysecurity package (the syntax is the same as the mytest package entry).
- Create the demo table in your database as follows:
create table principal ( id serial, -- creates sequence principal_id_seq loginname varchar(50), password varchar(50), active boolean, fullname varchar(100), email_address varchar(50), bio varchar(5000), rolemap_allowed varchar(200), rolemap_denied varchar(200), groups varchar(200), created timestamp ); alter table principal add primary key (id); create unique index principal_idx1 on principal (loginname);
Sections:
- PAUDemo1 : Create a Principal Folder
- PAUDemo2 : Configure your Pluggable Authentication Utility (PAU)
- PAUDemo3 : Configure your Skin to display Security Information
- PAUDemo4 : Managing Principals with Groups
- PAUDemo5 : Create a Site
- PAUDemo6 : Manage Roles in a Context with PrincipalRoleMap
