Related Topics |
---|
You can restrict services by storing permissions in a JDBC-based set of data tables. Before setting up these tables, see Restricting access to ArcIMS services for an overview of authentication.
ArcIMS relies on JDBC drivers for connecting to a relational database. On the Windows platform, Open DataBase Connectivity (ODBC) is a common, freely-available solution used for database access. You can connect to a JDBC-based database through a JDBC-ODBC Bridge, which allows Java programs such as the ArcIMS Servlet Connector to use JDBC with many ODBC drivers. Common databases are Microsoft Access and SQL Server.
All platforms support a direct JDBC connection to a database. The required drivers can be found at the corresponding software manufacturer support sites. When using these drivers, ensure that the driver is available in the servlet engine's common library directory (common/lib). Typically, a set of JAR files associated with the JDBC drivers needs to be copied into this directory.
The procedure for setting up authentication using a JDBC-based ACL is:
When enabling the JDBC-ODBC bridge to implement ArcIMS authentication with an Oracle or SQLServer database, the JDBC-ODBC connection cannot be restored without restarting the Servlet Engine when the physical connection becomes unavailable. An example is when the database is taken off-line for backing up.
Create your configuration file (AXL) and then design the look of the Web site with Designer. Note: Designer is not able to access restricted services; thus, you should design your Web site before restricting access to a service.
Locate Esrimap_prop installed in your Web server's servlet directory and edit it with a text editor. See Common servlet engine file locations for a list of common Web servers and their servlet directory location.
Note: ArcIMS installs a backup copy of all the files that comprise the Servlet Connector in \Connectors\Servlet on Windows or /Middleware/Servlet_Connector on UNIX and Linux. You should not edit the Esrimap_prop file at this location because it will have no impact on the operation of the Servlet Connector.
Set the properties as shown below. You can set many of these properties by removing the comment character (#) before them. The properties are case sensitive but the values assigned to the properties are not case sensitive. The following values are recommended.
enable=True authenticate=True authMethods=Digest authenticateWithSessions=True sessionTimeout=120 realm=ArcIMS Network |
If you have a Web application that uses the Java Connector, you must edit authenticate.properties instead of Esrimap_prop. The authenticate.properties file is located in the Web application's WEB-INF/classes directory.
Set the common properties as shown below for either Esrimap_prop or authenticate.properties.
useJdbc=True JdbcDriver=<name of the JDBC driver>
|
If you are using Microsoft Access, you should place the file on the same machine as the Servlet or Java Connector, depending on which connector you are using.
If you are using SQL Server, start Enterprise Manager/Management Studio and create a new database named "ArcIMS_ACL".
The name of the table should be the same as the name you specified for JdbcUserTable, and "acl_users" is the recommended value. This table contains the list of usernames and passwords for the services. It also contains a unique user ID that ArcIMS will use to relate this table to the permissions table. The table should contain the following columns:
Column name | Datatype (width) | Microsoft Access database types |
---|---|---|
userid | number (32) | Data type "Number", Field size "Long Integer", Format "General Number", and Decimal Places "0" |
username | varchar (64) | Data type "Text", Field size "64" |
password | varchar (64) | Data type "Text", Field size "64" |
For added flexibility, you can name the user ID column anything you want, as long as it's the same name you specified for JdbcUidColumn. The recommended value is "userid". The other two columns should be named "username" and "password".
Populate the user table with usernames and passwords. Make sure the userid is unique. You can use an asterisk (*) to indicate services that all clients can access without entering a username and password.
userid | username | password |
---|---|---|
1 | myuser | mypassword |
2 | aUser | aPassword |
The name of this table should be the same as the name you specified for JdbcPermTable, and the recommended value is "acl_permissions". This table associates each Service with one or more usernames and passwords and contains the following columns:
Column name | Datatype (width) | Microsoft Access database types |
---|---|---|
userid | number (32) | Data type "Number", Field size "Long Integer", Format "General Number", and Decimal Places "0" |
service | varchar (64) | Data type "Text", Field size "64" |
active | number (32) | Data type "Number", Field size "Long Integer", Format "General Number", and Decimal Places "0" |
expiration | date (format 'MM/DD/YYY HH:MM:SS') | Data type "Date/Time", Format "General date" |
tclients | varchar (1024) | Data type "Memo" |
ftags | varchar (1024) | Data type "Memo" |
roles | varchar (1024) | Data type "Memo" |
The user ID column name should match the name you specified in the user table and for JdbcUidColumn. The other columns should be named as shown above.
For a complete description of all columns, see the ACL attribute reference.
Populate the permissions table with the user ID, service names, and active state. Each record may contain only one service name. The user ID relates the service to the username and password. You can enter additional records with the same user ID to associate more than one service with a particular username and password. The table below shows a basic configuration of the permissions table.
userid | service | active | expiration | tclients | ftags | roles |
---|---|---|---|---|---|---|
1 | SanFrancisco | 1 | ||||
2 | Map1 | 1 | GET_FEATURES | metadata_browser | ||
2 | Map2 | 1 | metadata_publisher |
You can optionally fill in the other columns to add additional restrictions on the service. For example, you might add an expiration date (10/16/2001 11:24:30), a comma-separated list of trusted clients by IP address (198.102.62.1,198.102.62.22) and a comma-separated list of forbidden tags (GET_GEOCODE,GET_EXTRACT).
Note: Windows XP users may find Digest authentication turned on, but grayed out and unable to be deactivated. In this case, contact ESRI technical support.