Introduction to session management
The SuperMap GIS server supports the configuration
of centralized sessions. Centralized session means that the session information
is saved to a third-party database, and when the same session needs to
be established again, it can be obtained directly from the database.
For GIS servers, opening a centralized session means
that users can directly access multiple different addresses using the
same browser with only one login. GIS server no need to log in repeatedly.
Relatively speaking, using a single session mode without opening a centralized
session means that users need to log in once every time they access a
GIS server, even if the same user needs to log in, which increases duplication
of work.
SuperMap GIS server supports Redis, PostgreSQL, Kingbase,
GaussDB, Vastbase, and GBase 8c databases Store session information.
Note:
- The centralized session function only works
between SuperMap GIS servers of the same type, such as the iServer
server with different addresses. But centralized sessions cannot be
realized between the iServer and the iPortal;
- Only the same account (the same user name
and password) between SuperMap GIS servers can realize centralized
conversation.
Configure a centralized session
Before starting a centralized session, you need to
prepare the available database services. Use the centralized session method:
- Centralized sessions need to be enabled in
the GIS server as well
- The session needs to be stored to the same
database server
To enable a centralized session for a GIS server, the
administrator needs to perform the following operations on the Security->Security Config->Session
info management page:
- Enable centralized session, check Enable
- Select whether to enable the remote login
warning. When enabled, you can set the iServer session timeout. The
default value is the 18000000, in millisecond
- To connect to a database, select storage
type.
- Redis database supports the following three connection modes:
- Redis service address: The service address
of the Redis database used to store session information, in
the format of {IP}:{port}, such as 192.168.17.116:6379
- Redis service address + Password
- Redis service address + Username + Password
(Note: Redis 6.0 introduced support for ACL (Access Control
List). In previous versions of Redis, it was not possible
to set usernames. If you want to use this connection method,
you should first upgrade Redis to 6.x. If you still cannot
connect normally after configuring usernames and passwords,
you need to confirm whether Redis is in disabled protected
mode. If it is not disabled, you can execute "CONFIG
SET protected-mode no" to disable it.)
- Postgresql database, Kingbase database, GaussDB database, Vastbase
database and GBase 8c database are configured in the same way,
and only one connection mode is supported: service address + user
name + password. Take PostgreSQL as an example, the page parameter
settings are as follows:
- Service address: required, the PostgreSQL database service
address used to store session information, in the format of
{IP}:{port}/{database}. For example, 172.16.120.212:5432/databasename,
where the database must be an existing database
- User name: required, user name of PostgreSQL account
- Password: Required, password for PostgreSQL account
- Mode Name: optional. It is the mode in which the session
information table is stored. It is stored in the public mode
by default. If you need to store session information in a
non-public mode, please entered the specified schema name.
- Session Information Storage Table Name: The table name
of the table that stores session information. It defaults
to the iserver_session.
4.Click Save
to make the configuration effective
In addition, you can set
up a centralized session through the in the config file, as described
in iServer
config file .