iPortal configuration file description
|
Feedback
|
SuperMap iPortal's main configuration information is located in WEB-INF ([SuperMap iPortal installation directory]\webapps\iportal\WEB-INF) directory, for more information about catalog description please refer to The catalog description after installation.
iPortal Configuration File Introduction
iPortal Configuration files include two parts: configuration files of portal functions and basic configuration files the same as used by iServer (For information about basic configuration files, see: Introduction to iServer configuration files ).
The former files show as the following table:
Configuration files of portal functions
File Name |
Description |
iportal.xml |
The main configuration information of the iPortal, including the configuration of the database and portal functions. |
iportal-monitor.xml |
Node monitoring configuration information, including configuring the database for storing monitoring data, and the iServer node information. For details, see: Monitoring Configuration. |
iportal-storage.xml
|
Configuring the storage for uploaded data. Details, see: Hosted Data Storage Configuration. |
iportal-ehcache.xml
|
The sharing settings of the cache of the proxied service access permission. The cache is saved locally by default, no need to configure. When you are configuring high availability structure for iPortal, see: How to share the cache of the proxied service access permission. |
iPortal configuration file structure
The root node <IportalConfig> of iportal.xml currently contains:
Before starting SuperMap iPortal service, it is recommended that you read the following configuration file instructions carefully so that you can configure your product according to your business needs.
1. <dataSourceConnectionPoolInfo>
Used to set the SuperMap iPortal database connection pool, the default sql configuration is SQLite database. It's recommended to use the MySQL/Oracle/PostgreSQL database.
- <dbType>: database type, characters need to be capitalized, such as SQLITE, MYSQL, ORACLE, POSTGRESQL.
- <driverClass>: The full name of database-driven class.
- <jdbcUrl>: The driver url to 0connect to. For SQLite database path, if use relative path, it is relative to the iPortal home path; In addition, iPortal provides two language-version database file, iportal.db and iportal_en.db, you need to choose one according to the language of the contents of your portal. For MYSQL, the JDBC URL format is: jdbc: mysql: //[host: port]/[ database]? [parameter name 1]=[parameter value 1]&[parameter name 2]=[parameter value 2] .... The default port for MySQL: 3306, database is the database name, parameters are optional. Note that in xml configuration file, the "&" in the url need to be transformed into "&". While for Oracle, the JDBC URL format is: jdbc:oracle:thin:@[host:port]:[database]. The default port is 1521, and database refers to the name of the created database instance. For PostgreSQL, the JDBC URL is: jdbc:postgresql://[host:port]/[database]?[parameter name 1]=[value 1]&[parameter name 2]=[value 2]…. And the default port is 5432, database refers to the database name.
- <maxPoolSize>: The maximum number of active connections provided by the connection pool at the same time.
- <initialPoolSize>: The initialized connection pool size.
- <minPoolSize>: The number of minimum active connections provided by the connection pool at the same time.
- <maxIdleTime>: Maximum free time. If the connection is not been used over maxIdleTime seconds, it will be discarded. 0 means never discarded, the default value is 0.
- <maxWait>: The maximum milliseconds that database waits for when an exception occurs (when no connection is available).
- <username>: The username for SQLite can be empty. For MySQL, the initial administrator account is root. And a user who has the DBA authority is employed for the Oracle. While for PostgreSQL, the initial administrator account is postgres.
- <password>: The password for SQLite can be empty. While MySQL database does not have the initial password. For Oracle, it should use the password in the <username> configuration item. And for PostgreSQL, fill in the administrator password entered when the database is installed.
2. <uploadSetting>
- <userMaxCapacity>: The maximum data size limit that users can upload, unit:MB.
- <fileSuffixBlackList>: used to set the blacklist of data files to be uploaded. The data format types set in the blacklist mean the matched data files are not allowed to be uploaded. The suffixes of data files that are not allowed to be uploaded must be included in different <string> nodes.
3. <serviceSetting>
- <showOffline>: Whether to show the offline services in Service Resource Center, defaults to false, means only the available services are listed. Offline services mean the original services are paused, or stopped, or deleted.
4. <serviceCheckSetting>
Used to set how often to detect the status of the original services, which has been registered in iPortal. If there are services changed, for example, paused, or stopped, or deleted, iPortal will synchromize the state of these services. Unit is in minutes.
- <singleCheckInterval>: Automatic detecting time for single registered services, defaults to 30 minutes.
- <batchCheckInterval>: Automatic detecting time for batch registration services, defaults to 60 minutes.
5. <serviceAuditSetting>
- <allowServiceAudit>: used to set whether to open the service audit function, the default value: false, do not open the service audit function.
- <auditedAttributes>: used to set the service attributes that need to be re-audited after being modified. Deaults to all, that is, if normal users modified an audited service, even if only one attribute, this service needs to be audited by the administrator before the modification takes effect. When configuring the attributes to be audited, remember they should be separated by the English ", ", such as: resTitle, thumbnail. The service attributes include: name (resTitle), description (idAbs), thumbnail, tags, reference system (refSysInfo), identifier (exDesc), extent (geoBndBox), and provider (mdContact).
6. <registerSetting>
- <allowRegister>: Whether to enable the function of registering users. Defaults to true, ie., open the user registration function.
- <allowUserAudit>: Whether to enable the audit function for registered users. Defaults to false, ie., disable this function.
- <sendEmailNotification>: Whether to enable mail notification to send audited results to registered users. Defaults to false, ie., disable the mail notification function.
- <extendUserFields>: Used to configure extended informations when registering a user, such as: department, email. Each information should be contained in a <field> node. One <field> node consists of two subnodes:
- <name>: The extended field name for filling in when registering users. Currently supports Department, Email.
- <required>: Marks whether this field name is required. true means required, false indicates optional.
- <defaultRole>: Used to set the default role for the new registered user. Default value: PORTAL_USER. Currently supports PORTAL_USER or PORTAL_VIEWER roles.
- <allowDataCenterRole>: Whether to assign the DATA_CENTER role to the registered user. Default is true.
- <reservedUserNames>: Used to set the username blacklist. The names in the blacklist can't be used when adding/registering users. Multiple names should be separated with English comma, for example: user1,user2,user3
7. <loginSetting>
- <captchaConfig>: The login verification code configuration. (Expired, please refer to: Login verification code setting)
- <enable>: Whether to enable the function of login verification code. Default is false.
- <length>: The code length, which can be set to 4-6 digits. Default is 4.
- <expire>: The expiration time of the code in second. Default is 120.
8. <shareSetting>
- <allowListUsers>: Whether to list all the users when sharing resources with specified users. Default: false, all users won't be listed. Note: When set to true, listing all users in iPortal is incompatible with listing users by department, ie., if you allow all users to be listed when sharing to specified users, listing according to different departments is disabled.
- <scope>: Used to configure the sharing scope for the resources in iPortal.
- <toUser>: Whether to configure the function of sharing with specified users. Defaults to true.
- <toGroup>: Whether to configure the function of sharing with specified group. Defaults to true.
- <toDepartment>: Whether to configure the function of sharing with specified department. Defaults to false.
9. <mapsSetting>
- <showBatchAddMaps>: Whether to display the Bulk Register Maps button on the Map Resource Center page. Default: true.
- <allowMapAudit>: Wwhether to open the map audit function, the default: false.
- <auditedAttributes>: used to set the map attributes that need to be re-audited after being modified. Deaults to all, that is, if normal users modified an audited map, even if only one attribute, this map needs to be audited by the administrator before the modification takes effect. When configuring the attributes to be audited, remember they should be separated by the English ", ", such as: title, description. The map attributes include: title, description, thumbnail, tags, central points and zoom level (geoAttr), and layers.
10. <serviceProxy>
Used to set whether the service registered in iPortal use a proxy. By default, the built-in service proxy is enabled.
If the service proxy is disabled, the following safety issue exists:
User A registered a service and shared it with user B, now user B can access the service information and knows the service address. Then user A wants to change the sharing scope to exclude user B. After user A modified the sharing settings of the service, now user B can not see the service in the shared service list, but he still can access the service because he has already known the service address.
While if the service proxy is enabled, only the registrant of the service and administrators can see the original service address, the other users who have access to the service can only see the proxied service address, thus the access control of the registration service is implemented at the portal level.
- <enable>: used to set whether to enable the service proxy, the default: true, i.e., the service proxy is enabled.
- <enableBuiltinProxy>: used to set whether to enable the built-in service proxy. Default is true. If you will use the independent service proxy, this value should be false.
- <port>: used to set the port number of the proxy service address, default: 8195. You can also customize the port number, as long as you ensure that the port number you set is not occupied.
- <httpConnPoolInfo>: The connection pool settings for the proxy service that are used to set the HttpClient connection pool inside the proxy service. Adjust the node under the various settings, so as to enhance the concurrent performance of the proxy service.
- <maxTotal>: used to set the maximum number of connections. The default value is: 100.
- <defaultMaxPerRoute>: For a routing address, set up maximum number of several connections. The default value is: 10.
- <connectionTimeout>: The timeout period for establishing a connection with the server when the proxy forwards a request, in ms. The default is 30000. You can set it according to the network environment.
- <socketTimeout>: The timeout period for reading data from the server when the proxy forwards a request, in ms. The default is 30000. You can set it according to the network environment.
- <enableAccessStatistics>: used to set whether to open the proxy service access statistics, the default: true.
- <cacheConfig>: used to set the proxy service cache. iPortal offers two types of caching methods: Ehcache caching and Redis caching. The system uses Ehcache cache by default, so you can use it without any configuration. The built-in service proxy supports Ehcache and Redis cache, while the independent service proxy only supports Redis cache.
- <enable>: used to set whether to enable the service proxy cache. The default value is true.
- <type>: used to set the cache type, the characters need capitalization, the default value: EHCACHE, meaning using Ehcache cache, you can also set to: REDIS, meaning using the Redis cache.
- <cacheServerConfig>: used to set configure cache server.
- <ehcacheConfigPath>: used to set the path of the Ehcache configuration file, which defaults to the iportal-ehache.xml configuration file of the Ehcache built into the iPortal system under the [SuperMap iPortal installation directory]\webapps\iportal\WEB-INFdirecotry. And you also can write your own independent cache configuration file.
The Redis cache configuration is provided by way of comments as follows:
- <nodes>: used to set the Redis server node. If Redis uses cluster, the nodes node supports to configure multiple " host:port" which need to be separated by "|".
- <timeout>: used to set Redis service connection timeout, in ms
- <password>: used to set the access password for the Redis service
- <maxTotal>: used to set the maximum number of the connections for Redis instances
- <maxIdle>: used to set the maximum number of idle Jedis instances of a Pool
- <maxWaitMillis>: used to set the maximum time to wait for available connection in ms, default: -1, meaning never expires
- <testOnBorrow>: used to determine wether to perform validate operation in advance when borrowing a Jedis instance, default is true, indicating that the borrowed Jedis instance is available.
Note:
- Among the type of registered services, SuperMap REST service, OGC service (WMS, WMTS, WFS, WCS, WPS), ArcGIS REST service support the service proxy, while the "other service" type does not support the service proxy.
- After you deactivate the proxy service, you need to restart the iPortal service before the settings take effect.
11. <customDirectorySetting>
Whether to enable the custom directory function. The resource types that support the custom directory function are: map (MAP), service (SERVICE), data (DATA), scene (SCENE), project (APP), insight (INSIGHTS). The default value is false, i.e., the custom directory is not displayed. You can enable the custom directory function for certain types of resources. For more information about custom directory configuration, see: Custom directory configuration.
12. <defaultInternetBuildinMapSetting>
- <googleMapsAPIKey>: used to set the Google Maps JavaScript API Key, you need to apply one from Google Developers.
13. <httpHeaderSetting> (Deprecated)
Used to set up domains that allow access to iPortal resources. From iPortal 9D(2019) and later versions, this item doesn't work any longer. iPortal supports all cross-domain access by default. If you need to limit the domains that can be accessed, modify the default "*" (which means support for all domain access) of the cors.allowed.origins in the %SuperMap iPortal_HOME%\webapp\iportal\WEB-INF\web.xml file to the specified accessible domains. If you want to carry cookies during cross-domain access, you also need to set the value of cors.support.credentials to true.
- <accessControlAllowOrigins>: set the allowed fields to preferentially match these fields, and if do not match the settings using defaultAccessControlAllowOrigin.
- <defaultAccessControlAllowOrigin>:By default, all domains are allowed, you can configure specific domains.
14. <departmentSetting>
- <enable>:Whether to enable the organizational structure function. Defaults to false. If you want to manage resources by departments, we recommend you enable organizational configuration function.
- <orderBy>: Used to set the sort field for the department in the organization. Default: CREATETIME, sorted by department creation time. You can also set by NAME (by department name), ORDERNUM (sorted by the department number).
- <orderType>: Sort in ascending or descending order. Default: ASC, ie., sort in ascending order. DESC is for descending order.
15. <mapApps>
Map App collection. Used to configure the Map App used in iPortal for making maps. Default value is mapViewer_v2, ie., using iPortal built-in V2 version (new version) DataViz APP.
16. <groupSetting>
Configure to show or hide the function of group-related information displayed on the "My application" and "My authorization" pages. Default: true.
17.<portalCustomSetting>
Portal custom settings.
- <supportMultiLanguages>: Set multiple languages for the custom contents of iPortal, for example: custom directory. iPortal supports one language by default, but you can configure as follows to make your portal support multiple languages.
- <enable>: Whether to enable multi-language settings. Default: false. You need to set it to true to configure multi-languages.
- <languages>: Set the language to support, currently supports Chinese and English. Value range: zh, CN, en-US.
18.<mapViewerSetting>
Used to set the maximum allowed vector features to be added on Map when making maps with DataViz. Defaults to 3000.
19.<cookieStorage>
Cookie storage configuration of the logged-in user, used for session sharing between iPortal and proxy service. iPortal offers two types of caching methods: Ehcache caching and Redis caching. The system uses Ehcache cache by default, so you can use it without any configuration. The built-in service proxy supports Ehcache and Redis cache, while the independent service proxy only supports Redis cache.
- <type>: used to set the cache type, the characters need capitalization, the default value: EHCACHE, meaning using Ehcache cache, you can also set to: REDIS, meaning using the Redis cache.
- <cacheServerConfig>: used to set configure cache server.
- <ehcacheConfigPath>: : used to set the path of the Ehcache configuration file, which defaults to the iportal-ehache.xml configuration file of the Ehcache built into the iPortal system under the [SuperMap iPortal installation directory]\webapps\iportal\WEB-INFdirecotry. And you also can write your own independent cache configuration file.
The Redis cache configuration is provided by way of comments as follows:
- <nodes>: used to set the Redis server node. If Redis uses cluster, the nodes node supports to configure multiple " host:port" which need to be separated by "|".
- <timeout>: used to set Redis service connection timeout, in ms
- <password>: used to set the access password for the Redis service
- <maxTotal>: used to set the maximum number of the connections for Redis instances
- <maxIdle>: used to set the maximum number of idle Jedis instances of a Pool
- <maxWaitMillis>: used to set the maximum time to wait for available connection in ms, default: -1, meaning never expires
- <testOnBorrow>: used to determine wether to perform validate operation in advance when borrowing a Jedis instance, default is true, indicating that the borrowed Jedis instance is available. It is not recommended to modify this parameter.
20.<appsConfig>
Used to set the usage rights of the WebApps built into iPortal.
- <editableAppsLimitToAdmin>: The WebApps only can be accessed by the administrator.
- <PortalAppType>: The WebApp name. Currently only supports to configure DATAVIZ, DATAINSIGHTS, MAPSTYLER, EARTH, MAPDASHBOARD and APPBUILDER.
21.<proxyUriRuleConfig>
Used to configure the SSF defense for getURLResource resource.
- <includes>: Regular expression rules for URLs that are allowed to be accessed.
- <excludes>: Regular expression rules for URLs that are denied to be accessed.
- <lanConfig>: Local area network (LAN) configuration item.
- <whiteList>: IP whitelist, that is, the list of allowed IPs.
- <blackList>: IP blacklist, that is, the list of denied IPs.
- <denyProxySameDomain>: Whether to deny access to the same domain name as the proxy host. The default is false, allowing access from the same domain name.
22.<searchModuleConfig>
Used to set the global search function of iPortal.
- <enable>: Whether to enable the global search function. Default value: true.
- <reindexAllResources>: Whether to reindex existing iPortal resources. After the index is rebuilt, this value is automatically set to false.
- <startElasticSearch>: Whether to use iPortal's built-in Elasticsearch. Default value: true. If you want to use your own Elasticsearch server, set it to false
- <port>: The port of the built-in global search service. The default port number: 8192.
23.<httpsConfig>
The https certificate trust setting of iPortal.
- <trustAllHttpsCertificates>: Whether to trust all https certificates. Default value: true, all certificates are trusted.
24.<keyConfig>
The quota setting of the Resource Key in iPortal.
- <allowQuotaAudit>: Set whether to enable quota review. The default value is false.
- <defaultMaxCount>: Set the default access quota of the key. The default value is 10000, you can modify it according to business needs.
- <defaultMaxCountType>: Set the time unit of the default access quota for the key. The default value is DAY, you can modify it to HOUR,DAY,MONTH,YEAR as needed.