Overview

DirX Identity Web Center’s file upload feature supports the following actions:

  • Uploading one or more files to the Web server.

  • Storing the files in a folder on the server.

  • Starting a handler program to process uploaded files.

  • Displaying status records produced by handler programs.

An upload page might allow for uploading just a single file, or for uploading multiple files. You can define the maximum number of files to upload in a single step. You can also set a limit for the overall file size to prevent users from uploading huge files. The files must also pass various checks to prevent malicious content to be uploaded to the server.

File upload is governed by menu access policies. These policies control whether a user gets the menu items to upload files. They are also checked when a user attempts to upload files to prevent unauthorized users from uploading files by bypassing the Web Center menu.

File upload can be temporarily blocked on the server side; for example, to allow an operator to perform some cleanup or management tasks on the upload folder.

The uploaded files are stored in a folder on the server. You can define the name of the folder, the names and extensions of the target files, and whether existing files are overwritten. To avoid naming conflicts and to be able to easily map files to users, the target file name template can include placeholders for the uploading user’s DN, one or more of his attributes (like last name and first name), a timestamp, the original file name, and a counter.

After a file has been uploaded and stored on the server, Web Center can start a program to process the file. The program must be provided by the customer. It is started per uploaded file. You can configure the program name, the list of arguments to be passed to the program, its working directory and its standard input, output, and error file. Web Center just starts the program; it doesn’t wait for it to finish. The handler programs also run independently of the Tomcat process; for example, they are not affected by Tomcat restarts.

A handler program can write status records about its progress to an LDAP attribute of the uploading user. The user can then view the status records in Web Center.

Alternatives to starting a handler program include:

  • A watch service which is notified on changes of the upload folder and initiates appropriate actions.

  • Manually checking for uploaded files.

Pre-Configured Variants

DirX Identity and Web Center come with three pre-configured file upload variants. Each variant has an identifier (fileUpload1, fileUpload2, fileUpload3) which serves to associate configuration data with the corresponding variant.

You can easily customize the pre-configured variants. For example, you can configure all three variants to implement file uploads with different handler programs. Additional variants are supported but are more complex to configure.

Sample Use Cases

The standard Web Center application uses the pre-configured file upload variants to demonstrate different file upload use cases:

  • Uploading a single file which is then stored on the server (fileUpload1).

  • Uploading multiple files which are then stored on the server (fileUpload2).

  • Uploading multiple files which are stored on the server and processed by a sample program. The Java program generates upload state records which can be displayed in Web Center as a list (fileUpload3).

The folder install_path*/web/webCenter-technical_domain/samples/fileUpload* contains the files and folders used to run the sample program. These items are:

  • inputFiles – some sample input files for the program. Subfolder fileUpload1 contains some Excel files to test the first upload variant, which by default accepts excel files only. The input files in subfolders fileUpload2 and fileUpload3 match the configuration of the upload state form (displaying the status records) of the corresponding variant. But note that only variant fileUpload3 is pre-configured to write status records.

  • java – the program’s classes and source code.

  • work – the program’s working directory used to store uploaded files and for the program’s standard output and error file.

Notation Conventions

In this document, we use shortcuts for some frequently referenced folders:

  • install_path – the DirX Identity installation folder.

  • SAMPLES_FOLDER – the file upload samples folder install_path*/web/webCenter-domain/samples/fileUpload*.

  • TOMCAT_HOME – the root folder of the Tomcat installation into which the Web Center application is deployed.

The following documents provide additional details about the concepts and procedures referenced in this use case document:

  • DirX Identity Web Center Reference, chapters "Configuration" and "User Interface Configuration".

  • DirX Identity User Interfaces Guide, especially the chapters on Web Center.

  • DirX Identity Provisioning Administration Guide, chapter "Managing Policies".