9.  Installing MMBase additional applications

With the release of version 1.7 MMBase was reworked into a more modular structure. The developers decided to take several modules (i.e. CloudContext Security, Media, Email) from the MMBase tree, and make these available as separate entities. However, at this moment MMBase doesn't have a module interface at all. So, to use these additional applications, the library and other files need to be placed into the installation tree and the configuration needs to be added into the existing configuration files by hand.

9.1.  Installing the CloudContext Security module

>From the MMBase website (www.mmbase.org):

Cloud security uses the object mmbaseuser to store information used for authorisation and authentication of users. The two main advantages of this security implementation are that the user administration can be carried out by using a webbrowser (instead of editing a file on the filesystem) and that the users of your MMBase installation are available as objects in the cloud. For instance, it is possible to create groups of users, which are allowed to carry out certain tasks.

A context exists of a set of rights which describe what you can do within this context with an object of MMBase. For example you define read access to a the context which is used by anonymous visitors of your site and you can define a context with edit rights for registered users of your site.

Move the library and other files of the CloudContext Security module into the MMBase installation tree:

  
  mv -i web-app/WEB-INF/lib/* \
      /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/lib/
  mv -i web-app/WEB-INF/config/applications/* \
      /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/applications/
  mv -i web-app/WEB-INF/config/builders/* \
      /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/builders/
  
  

Save the documentation files for later reference:

  
  mv -i web-app/README.txt web-app/README-PACKAGE.txt web-app/documentation web-app/src \
      /usr/local/tomcat/webapps/mmbase-webapp/mmdocs/security/
  
  

Make sure all these new files are owned by your tomcat user as well:

  
  chown -R tomcat:tomcat /usr/local/tomcat/webapps/mmbase-webapp
  
  

Disable the existing configuration in the security configuration file /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/security/security.xml:

  
  <!--
  <authentication class="org.mmbase.security.implementation.context.ContextAuthentication" url="context/config.xml" />
  -->
  ...
  <!--
  <authorization class="org.mmbase.security.implementation.context.ContextAuthorization" url="context/config.xml" />
  -->
  
  

And add (from web-app/WEB-INF/config/security/security.xml):

  
  <!--
  Example security.xml to switch on Cloud Context Security.
  No other configuration needed
  (Cloud Context Security is configured in the cloud)
  @version $Id$
  -->
  <authentication class="org.mmbase.security.implementation.cloudcontext.Authenticate" url="" />
  <authorization  class="org.mmbase.security.implementation.cloudcontext.Verify"       url="" />
  
  

Note

Make sure to include the configuration above before the <sharedsecret> statement, or you will get an error like this:

  
  ERROR org.mmbase.util.XMLErrorHandler - security.xml line:71 column:12:
      The content of element type "security" must match "(authentication,authorization,sharedsecret)".
  
  

9.2.  Installing the Media module

<TODO>

9.3.  Installing the Email module

The Email module makes it possible to send email with MMBase, using either SendMail or JMSendMail.

Move the library and other files of the Email module into the MMBase installation tree:

  
  mv -i web-app/WEB-INF/lib/* \
      /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/lib/
  mv -i web-app/WEB-INF/config/builders/* \
      /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/builders/
  mkdir /usr/local/tomcat/webapps/mmbase-webapp/email-examples/
  cp -iR web-app/examples/* \
      /usr/local/tomcat/webapps/mmbase-webapp/email-examples/
  
  

Save the documentation files for later reference:

  
  mkdir /usr/local/tomcat/webapps/mmbase-webapp/mmdocs/email/
  mv -i web-app/README.txt web-app/README-PACKAGE.txt web-app/documentation web-app/src \
      /usr/local/tomcat/webapps/mmbase-webapp/mmdocs/email/
  
  

Make sure all these new files are owned by your tomcat user as well:

  
  chown -R tomcat:tomcat /usr/local/tomcat/webapps/mmbase-webapp
  
  

Edit the email configuration file /usr/local/tomcat/webapps/mmbase-webapp/WEB-INF/config/modules/sendmail.xml (from web-app/WEB-INF/config/modules/sendmail.xml):

  
  ...
  <status>active</status>
  ...
  <classfile>org.mmbase.applications.email.SendMail</classfile>
  ...
  
  

Add to Tomcat's root Context (in /usr/local/tomcat/conf/context.xml for Tomcat version 5, in /usr/local/tomcat/conf/server.xml for Tomcat version 4) (replace <smtp.domain.tld> with the adres of your SMTP server):

  
  Resource name="mail/Session" auth="Container"
           type="javax.mail.Session"/>
    <ResourceParams name="mail/Session">
      <parameter>
        <name>mail.smtp.host</name>
        <value>smtp.domain.tld</value>
      </parameter>
    </ResourceParams>
    <ResourceLink name="linkToGlobalResource"
                  global="simpleValue"
                  type="java.lang.Integer"/>
  
  

Failing to do this, results in a fatal error:

  
  FATAL org.mmbase.module.JMSendMail -
      JMSendMail failure: Name mail is not bound in this Context
  
  

Warning

Installing the Email module in MMBase version 1.7 running on Tomcat version 5 resulted in a fatal error:

  
  FATAL org.mmbase.servlet.MMBaseStartThread -
  Could not find the MMBase module!javax/mail/Session