Problem:
In some PostgreSQL-type Cloud service provider (CSP) environments, the user account provided by the CSP may not have the SUPERUSER privilege. This will cause the database scripts of the Spotfire installation package to fail, accompanied by error "must be member of role "<SPOTFIREDB_USERNAME>" or similar error in Spotfire script's log.txt file. The failure will occur in the 'create_server_env.sql' script - either in 'create database' command or 'alter database owner' command.
Solution:
The published Spotfire Server System Requirements recommends a workaround to avoid this issue. Referring to the content of create_databases.sh (see the below Appendix), set the value of SPOTFIREDB_USERNAME to be the same value as the CSP-provided user: DBSERVER_ADMIN_USERNAME.
Details:
The 'create_server_env.sql' script is designed to connect as the provided database admin user and create your new Spotfire Server schema, then create a Spotfire-specific database user account, and then make your new user account the owner of your new Spotfire schema. This allows for Spotfire connecting to its database as a user with lower privilege (SPOTFIREDB_USERNAME) than the given admin user account has, which carries some security advantages. The workaround here is a bit of a compromise in that respect. It is necessary to comment out a portion of the 'create_server_env.sql' database script, and also modify a parameter in the create_databases.sh (or create_databases.bat) script.
This workaround is described in the below content, pasted here from the database section of the Spotfire System Requirements (14.0 LTS).
RULE "Internal Users Write Access to Reagents"
IF
user group in "TEST USERS"
attribute "Material Library Type" match
resource attribute "Material Library Type" in "Reagents (SNB)"
resource type equal "asset"
THEN
grant "entity.write"
Here is a link to the full set of the Spotfire Server System Requirements documentation: Spotfire Server 14.0 LTS
Appendix:
An excerpt of the create_databases.sh database script is shown below (this is the default content).
# Uncomment to set variables:
# PGHOST=<PGHOST>
# PGPORT=<PGPORT>
# DBSERVER_ADMIN_USERNAME=postgres
# DBSERVER_ADMIN_PASSWORD=<DBSERVER_ADMIN_PASSWORD>
# PGDATABASE=postgres
# SPOTFIREDB_DBNAME=spotfire_server
# SPOTFIREDB_USERNAME=<SPOTFIREDB_USERNAME>
# SPOTFIREDB_PASSWORD=<SPOTFIREDB_PASSWORD>
Comments
0 comments
Article is closed for comments.