Optima passwords management
In Optima it is necessary to manage passwords:
- In different Optima areas
-
In different operations and mainly during:
- Installation activities.
- Configuration activities.
- Upgrading activities.
The table summarizes all links associated to areas and operations involving different types of passwords:
Areas/Operations |
Installation |
Upgrade |
Configuration |
---|---|---|---|
Password associated to GeoServer and WildFly AS. |
|
|
|
Password associated to Postgre DB and WildFly AS. |
|
|
|
Password associated to Postgre DB and WildFly AS. |
|
|
|
|
Password associated to different Optima components. |
|
|
|
Password associated to Optima DB and Optima Admin User. |
|
|
Password associated to the licenses check system. |
|
|
|
Password of HERE user to get data feeds. |
|||
Password for the FTP server. |
|||
|
|
Password to connect Optima DB. |
|
|
|
Password associated to DS_MAIN. |
|
|
|
Password associated to DS_MAIN. |
|
|
|
Password associated to LDAP AD system. |
|
|
|
Password to connect the DB. |
|
→ DBWorker configuration |
|
|
Password to connect the DB. |
When you install or update Optima, you must follow some conventions.

The Optima standard credentials are listed in the table:
Component |
User |
Group |
Password |
---|---|---|---|
Optima AS (WildFly) |
ptv-optima-as |
ptv-optima-as |
Set during the installation process |
Optima DB (PostgreSQL) |
postgres |
Not applicable |
Set during the installation process |

There are different operations of password management that can be necessary after the ordinary Optima installation procedures.
The most common operations are associated to:
- Optima User account.
- DB connection password for WildFly AS.
- .NET connection to DB server.
- GeoServer Admin account.

To change your PostgreSQL user account password, you can adopt the indications provided in:
After changing the user password, you must restart:
- The Optima DB service.
- ALL Optima Windows services (see → Managing Optima services).
- DB connection password for WildFly AS (see → Changing your DB connection password for WildFly AS).
- .NET connection password for DB server (see → Changing your .NET connection password for DB server).
Sql statements
To replace your old user password with the 'new_password', you can execute the query:
ALTER USER postgresql WITH PASSWORD 'new_password';
Meta-commands
To replace your user password, you can execute the meta-command:
\password postgres → insert & confirm new password

The password for the DB connection associated to Optima AS (WildFly AS), is hosted in the file:
/opt/ptv-optima-as/standalone/configuration/standalone.xml
With a text editor, open the file and locate the tag <security> and update the component NEWPASSWORDHERE in the tag <password>.
<password>${env.PGPASSWORD:NEWPASSWORDHERE}</password>
An example of the standalone.xml file:
<datasources>
<datasource jndi-name="java:jboss/datasources/optima" pool-name="optima_pool" enabled="true" use-java-context="true">
<connection-url>jdbc:postgresql_postGIS://${env.DB_HOST:172.22.201.111}:${env.DB_PORT:5432}/${env.DB_NAME:optima}</connection-url>
<driver-class>org.postgis.DriverWrapper</driver-class>
<driver>postgis</driver>
<pool>
<min-pool-size>${env.MIN_POOL_SIZE:30}</min-pool-size>
<max-pool-size>${env.MAX_POOL_SIZE:80}</max-pool-size>
<prefill>true</prefill>
</pool>
<security>
<user-name>${env.DB_USER:postgres}</user-name>
<password>${env.PGPASSWORD:NEWPASSWORDHERE}</password>
</security>
....
</datasource>
....
</datasources>

The password for the .NET connection associated to Optima DB server (PostgreSQL DB), for all .NET components, is hosted in the file:
C:\optima\<.NET component>\CommandLineTDE.csv
In the usual installation:
C:\optima\<.NET component>\CommandLineTDE.csv
For example, for the TRE component:
C:\optima\TRE\CommandLineTDE.csv
You must open the DS_MAIN parameter and modify the Pwd parameter:
# main datasource string
DS_MAIN
postgresql:Server=172.22.201.111;Port=5432;Uid=postgres;Pwd=NEWPASSWORDHERE;Database=optima;CommandTimeout=3600
Important: It is necessary to repeat the operation for ALL .NET components.

https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/geoserver/web.
Optima users don't usually need to make use of it, unlike system integrators or developers: these might occasionally have to utilize it.
Geoserver's credential system is separated from the one of Optima, hence its username and password are different from those of Optima.
How to allow the administrative user to log in
For security reasons, GeoServer only has one user by default: the administrative user. By default, it is also forbidden to log in.
However, it is possible to enable this function if necessary, by proceeding as follows:
Open the file <optima folder>/standalone/configuration/geoserver_data/security/usergroup/default/users.xml.
Locate the line which reads user enabled="false""
Change "false" to "true". GeoServer will now read the new setting immediately: there is no need to restart it.
How to reset the administrator password
You can reset the credentials of the administrative user by doing the following:
Make a copy of the file containing your username and password: <optima folder>/standalone/configuration/geoserver_data/security/usergroup/default/users.xml.
Use this copy to overwrite the original file. For example, you can overwrite the password file with the same file that you picked from the latest version of Optima you downloaded.