Tightening portal security

Currently, Unwired Accelerator does not encrypt the user name and password used to log in to the RDBMS server containing the portal database tables. If anyone knows the database user name and password, they can use ISQL to access the database tables directly. To safeguard portal security, you can:

StepsChanging the password, and optionally the PortalDB table owner

The simplest safeguard is to change the database password, using the ISQL GUI. The ISQL GUI requires the jConnect JDBC driver, which is packaged separately under the SYBASE\tomcat\common\lib directory.

Optionally, another safeguard is to create a custom database user to own the portal database tables, rather than using the dba user (ASA) or the sa user (Adaptive Server). This prevents unauthorized users from using ISQL directly into your database to look at PortalDB tables.

If you create the custom database owner, also change the default database user name found in this entry in SYBASE\tomcat\conf\server.xml:

<GlobalNamingResources>
    <Resource name="jdbc/portaldb"

Coordinate these changes between the PortalDB and the server.xml file.

  1. From the command line, navigate to the following directory:

    cd SYBASE\asa\java

  2. Access isql using the command that follows. The command adds the jConnect JDBC driver to the class path.

    java -classpath ..\..\tomcat\common\lib\ jconn3.jar;jisql.jar com.sybase.jisql.Jisql

    The jisql login screen displays.

  3. Log in, and change the dba or sa password from the defaults (“SQL” for ASA and “  ” for Adaptive Server).

    // Change the password. sp_password <oldpassword>, <newpassowrd>

  4. Optionally, use isql to create a new database user in the portal database and make this user the owner of PortalDB. Here is the input using isql:

StepsLimiting global.properties.xml access to the portal server owner

Another safeguard is to make the global.properties.xml file readable only by the computer user the portal server (Tomcat) runs in.

  1. Make the global.properties.xml file readable only by the computer user for the portal server.

  2. Modify database account information in the server.xml file, and limit access to the file.

StepsModifying database account information in server.xml

As a final safeguard, modify the database account information in the server.xml file, then limit access to the server.xml file as you did in the preceding procedure.

NoteThese instructions are for Tomcat.

  1. In Windows Explorer, navigate to the following directory:

    cd SYBASE\tomcat\conf

  2. In a text editor, open server.xml.

  3. Search for “Global JNDI resources.” This section defines a Java Naming and Directory Interface (JNDI) connection pool to the PortalDB. The XML looks like:

    <!-- Global JNDI resources -->
    <GlobalNamingResources>
        <Resource name="jdbc/portaldb" auth="Container" 
          type="javax.sql.DataSource"
          driverClassName="com.sybase.jdbc3.jdbc.SybDriver"
          url="jdbc:sybase:Tds:labxp.sybase.com:4747?
          servicename=portaldatabase"
          username="dba"
          password="SQL"
            maxActive="20"
            maxIdle="10"
            maxWait="20000"/
    
        <Resource name="jdbc/agdb" auth="Container"
          type="javax.sql.DataSource"
          driverClassName="com.sybase.jdbc3.jdbc.SybDriver"
          url="jdbc:sybase:Tds:labxp.sybase.com:8099"
          username="dba"
          password=""
            maxActive="20"
            maxIdle="10"
            maxWait="20000"/>
    
        <Resource name="jdbc/uaml" auth="Container"
          type="javax.sql.DataSource"
          driverClassName="com.sybase.jdbc3.jdbc.SybDriver"
          url="jdbc:sybase:Tds:labxp.sybase.com:4747?servicename=uaml" 
          username="DBA"
          password="SQL"
            maxActive="20"
            maxIdle="10"
            maxWait="20000"/>
    </GlobalNamingResources>
    
  4. Change the appropriate set of user name and password parameters to the new database user owner and password that you set up, and optionally change the database connections for the new database (see “Setting up a JNDI data source resource” for information).

  5. Save and close the server.xml file.

  6. Make the server.xml file readable only by the computer user for the portal server (Tomcat).

  7. Restart the application server to apply the changes you made to global.properties.xml and server.xml.