Table of Contents
The content of the configuration file should be similar to the following:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE security PUBLIC "//MMBase - security//" "http://www.mmbase.org/dtd/security.dtd"> <security active="true"> <authentication class="org.mmbase.security.implementation.context.ContextAuthentication" url="context/config.xml" /> <authorization class="org.mmbase.security.implementation.context.ContextAuthorization" url="context/config.xml" /> <sharedsecret>my_secret_access_code</sharedsecret> </security>
Within this document you can alter the following:
The first worry is that you have to authenticate yourself. You can do this when you obtain the cloud object from the 'CloudContext' object..
You will have to specify a 'cloud name' which is alway 'mmbase' in current mmbase implementations. Then you need to give a second string 'authentication type' which corresponds to the authentication modules. And the last and most important argument is a map of credentials. The credentials which need to be given are dependent on the chosen implementation and module of it.
The MMBase taglib entrance to this method is the mm:cloud tag. The 'autentication type' or 'module' string is present here as the 'authentication' attribute. The other attribute of importance is the 'method' attribute, which tells the cloud tag something about how the map of credentials must be filled. Most 'methods' produce name/password combinations. The important exceptions are method="anonymous", which produces a cloud without using credentials (the 'anonymous' cloud), and you will normally have very limited rights, and method="delegate" which make the tag put the request and response objects in the credential map, which then can be used for further acquisition of credentials (like redirecting to an external authentication server).
A new 'authentication module' in MMBase 1.8 (and available for 1.7 as a 'wrapper'), is the 'class' module , which is supported by most authentication implementations. Using this method of authentication you don't need to supply any credentials, because you are authenticated using the java strack-trace. The cloud which you obtain is then determined by an extra configuration file <config dir>classsecurity.xml, which connects classes to users.
This is part of the MMBase documentation.
For questions and remarks about this documentation mail to: documentation@mmbase.org