PluggableAuthenticationUtility
Purpose
There is basically no documentation on how to set up plain old authentication in a Zope 3 instance. The purpose of this documentation is as a brief recipe for setting up simple authentication in Zope 3... presumably for use by zope 3 components that you develope.
Setting It Up
- First thing first, log in as the manager into your zope instance, and go to the main screen of the ZMI (@@contents.html).
Then Click on Manage Site in the top bar. The root level of zope is a Site and therefore can contain all sorts of utilities for managing a site. It's possible to have more than one site in the same zope instance, each with a different version of authentication.
Click Visit Default Folder or click on default in the list of contents (it should be the only one there).
Next add a Pluggable Authentication Utility which you will see as an option on the left in the Add menu.
Put in something for the prefix. Since this is your first PAU on the instance, it doesn't really matter what you use for the prefix. The prefix serves to distinquish between users (actually called principals) managed by different PAUs. And add in something for the id, like PAU. Then click Add
Now click on Register.
- I'm not sure what permissions does in this case, but I would set it to Public (at the top of the drop down list of permissions)
Next you will see a screen that shows the Prefix you put entered in earlier, along with a list of Credential Plugins and Authenticator Plugins. We have not created any Authenticator Plugins so don't worry about that yet. Select Zope Realm Basic Auth (a utility) and click on the ugly arrow button pointing to the right. This does something to the effect of making your Pluggable Authentication Utility us that Credentials Plugin. You can even add more, but I'm not sure what this does. Finally click Change
After this you want to add a Principal Folder (see the left and Add menu again).
- As before enter in a prefix, and object name. Again, I'm not sure what the prefix should be. Then click add.
Now click Register.
Enter in something for Register As and set the permission to Public. Then click Add
At this point you can add as many Principal Information objects as you want. Each of these correspond to a "user". I won't go over adding them as it is really easy (username, password, title, description fields). You can always add more later too.
Now go up one level in the directory tree. If you look at the breadcrumbs, click on the link to the right of "default". It should show the name of the Pluggable Authentication Utility you created. Here I put it as PAU
- You should see that screen with the list of credential and authenticator plugins. Whereas before the Authenticator Plugins list was empty, it should now have the Principal Folder we created. Click on that, then click on the right arrow. Then click Change.
- You are now done actually setting up the authenticator. You can go back to the main @@contents.html page of your site. The next time you login, you should be able to enter in any of the usernames you added as Principal Information objects earlier and their associated password.
PluggableAuthenticationUtility (last edited 2008-08-06 16:25:21 by localhost)