Sun Java System Portal Server 7.1 Update 1 Community Guide

Chapter 12 Configuring File Sharing Portlet

The file sharing (JSF-based) application offer a hierarchical view of a file repository similar to file system browsing applications provided by the OS.

This chapter contains the following:

Configuring Security for File Sharing Portlet Datasource

For each service using a relational database, a separate database instance is configured with a default userid and password. The default userid is portal and the password is a random string generated at the time of installation. Change the default password and the access permissions of the properties files containing the password.

ProcedureTo Change the Default Database Password

  1. Restart Java DB.

    See Starting, Stopping, and Disabling the Java DB in Sun Java System Portal Server 7.1 Configuration Guide for more information.

  2. Change the password for the default user, portal, by connecting to the filesharingdb_portal-ID database.

    For example, if you are using a GUI like SQuirrel-j, use the SQL editor to execute the following command after connecting to the database:


    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.authentication.provider',
     'BUILTIN');
    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.connection.requireAuthentication',
     'true');
    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.user.portal',
     'your-new-password');
    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.fullAccessUsers',
     'portal');
    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.defaultConnectionMode',
     'noAccess');
  3. Restart Java DB.

    See Starting, Stopping, and Disabling the Java DB in Sun Java System Portal Server 7.1 Configuration Guide for more information.

  4. Verify that the password was set correctly by connecting to the filesharingdb_portal-ID database with new password.

  5. For each portal instance:

    1. Refer to the web container's documentation and set the password for the jdbc/FileSharingDB datasource to the new password that was set in step 2.

    2. Open the PortalServer-DataDir/portals/portal-ID/portletapps/filesharing/tokens.properties file and change the password value for the DB_ADMIN_PASSWORD and DB_PASSWORD properties to the new password that you set in step 2.

    3. Change the permissions for the PortalServer-DataDir/portals/portal-ID/portletapps/filesharing/tokens.properties file so that it is readable and writable only by the owner.

      For example, type chmod 600 tokens.properties.

    4. Restart the web container.

Configuring Tokens for File Sharing Portlet

The file sharing portlet includes the following tokens in the PortalServer-DataDir/portals/portal-ID/portletapps/filesharing/tokens.properties file:

REPOSITORY_TYPE

Specifies the type of file repository. By default, file system and database are supported. The default value is Database.

FILE_SYSTEM_REPOSITORY_ROOT_DIR

Specifies the absolute directory for the file repository. By default, this is set to PortalServer-DataDir/portals/portal-ID/filesharing.

UPLOAD_FILES_TEMP_DIR

Specifies the absolute directory for file upload staging. By default, this is set to PortalServer-DataDirtmp.

UPLOAD_FILES_MAXSIZE

Specifies the maximum allowed upload size in bytes. By default, this is set to 5000000.

DELETE_COMMUNITY_REPOSITORY_ON_UNPROVISION

Indicates if the contents of a community repository should be deleted when the community is unprovisioned. The valid values are true or false and by default, this is set to false.

DB_ADMIN_DRIVER_CLASS, DB_ADMIN_DRIVER_CLASSPATH, DB_ADMIN_URL, DB_ADMIN_USER, DB_ADMIN_PASSWORD

Specifies tokens for src/conf/common.dbadmin.

DB_JNDI_NAME, DB_URL, DB_DRIVER_CLASS, DB_USER, DB_PASSWORD, DB_MAX_ACTIVE, DB_MAX_IDLE, DB_MAX_WAIT, DB_DATASOURCE, DB_DATASOURCE_IBMWAS5

Specifies tokens for src/conf/surveydb.datasource and web/WEB-INF/sun-web.xml used as configuration for database repository.

DB_DRIVER_JAR

Specifies tokens for src/conf/server.classpath file. By default, this is set to derby.lib.location/derbyclient.jar.

PORTAL_DATA_DIR

Specifies tokens used in web/WEB-INF/classes/log4j.properties file. By default, this is set to PortalServer-DataDir.

COMMUNITYMC_JNDI_NAME

Specifies tokens for community management API. By default, this is set to communitymc.