MoleDB hard coded parameters

73 views
Skip to first unread message

Victor Preatoni

unread,
Nov 21, 2023, 12:45:45 PM11/21/23
to Earthworm Community Forum
Hi all,

I am trying to install MoleDB according to README file.

When I run the init_db.sh script, I can see some hard coded parameters like these:

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-- User: moleuser, Pass: molepass, PassLength: 9, Host: 10.%, GrantTemplate: tpl_grants_group_moleusers.sql
-- WARNING: password should be encrypted for user moleuser.
-- moleusers
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-- User: adsreader, Pass: adsreader, PassLength: 10, Host: 10.%, GrantTemplate: tpl_grants_group_readers.sql
-- WARNING: password should be encrypted for user adsreader.
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-- User: sismap, Pass: *877FCAB4A2A797C92BBD3FA0ABFE21A29B761CAC, PassLength: 42, Host: %.ingv.it, GrantTemplate: tpl_grants_group_sismap.sql
-- sismap
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-- User: sispick, Pass: *8E5894DB7A7CA91B53740BCC995CA8A0E67CD052, PassLength: 42, Host: %.ingv.it, GrantTemplate: tpl_grants_group_sispick.sql
-- sispick
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-- User: cmplocations, Pass: andersonPWD, PassLength: 12, Host: %.ingv.it, GrantTemplate: tpl_grants_group_cmplocations.sql
-- WARNING: password should be encrypted for user cmplocations.
-- cmplocations
-- Last SQL commands

I can see some of these parameters are defined in a grants.conf file, but there are no instructions about modifying this file.

Also file moledb_alter.sh.static.sql has a lot of hard coded parameters like "`moleuser`@`%.int.ingv.it`" on it.


I wonder if MoleDB is still maintained, and can be used outside INGV.

Thanks,
Victor

Stefan Lisowski

unread,
Nov 21, 2023, 1:57:34 PM11/21/23
to earthwo...@googlegroups.com, Victor Preatoni

I'm not sure INGV uses Mole anymore. I think you're mostly on your own if you decide to deploy and modify Mole. It worked the last time I checked, but it has been a few years. Maybe someone from INGV will speak up to correct me.

--
--
You received this message because you are subscribed to the Google
Groups "Earthworm Community Forum" group.
 
To post to this group, send an email to earthwo...@googlegroups.com
 
To unsubscribe from this group, send an email to
earthworm_for...@googlegroups.com
 
For more options, visit this group at
http://groups.google.com/group/earthworm_forum?hl=en

---
You received this message because you are subscribed to the Google Groups "Earthworm Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to earthworm_for...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/earthworm_forum/868dd32a-f1bd-49e8-9ccd-35d6a74d2ec0n%40googlegroups.com.

To follow ISTI news and updates please subscribe to our newsletter "the isti letter" at  https://www.isti.com/newsletter-sign-up.

Matteo Quintiliani

unread,
Nov 21, 2023, 4:23:58 PM11/21/23
to earthwo...@googlegroups.com
Hi Victor,

The configuration of the users and their grants is not hard coded, but can be modified, before launching the init_db.sh script, via the ./conf/grants.conf file (in which the users are defined) and the corresponding template files of the grants saved in the ./grants directory (for example ./grants/tpl_grants_group_moleusers.sql).

As an example, generic basic configurations have been left within the repository. Then you will find for example:

============================================================
cat conf/grants.conf
============================================================
# Grants configuration file, semicolons separated values
# Username;hostname;password;template_file;
# Password can be clear or encrypted by MySQL function PASSWORD()
# Spaces or tabs are allowed and will be ignored
moleuser     ; 10.%     ; molepass                                 ; tpl_grants_group_moleusers.sql;
...
============================================================

============================================================
cat grants/tpl_grants_group_moleusers.sql
============================================================
-- moleusers
GRANT SELECT  ON __DATABASENAME__.* TO '__USERNAME__'@'__HOSTNAME__';
GRANT EXECUTE ON __DATABASENAME__.* TO '__USERNAME__'@'__HOSTNAME__';
============================================================

I hope this makes it clearer how to proceed with the initial installation.

MoleDB was officially activated in May 2012 and is still functioning as a core component of the software system supporting the 24/7 Italian National Seismic Surveillance Service. It is mainly used to populate the SeisEv main database via triggers defined on its tables.

It is used as it is and no significant changes have been made to it for a long time. This is also because a new system based on microservices called Caravel was developed and activated in an experimental phase at INGV a few years ago.

(“Caravel: a New Earthworm‐Based Open‐Source Development for the Italian Seismic Monitoring System” 2021 - https://doi.org/10.1785/0220200355).

We plan to go into production from next year and we will almost certainly try to release a public version of the software components.

Matteo


Victor Preatoni

unread,
Nov 22, 2023, 8:48:58 AM11/22/23
to Earthworm Community Forum
Stefan, Matteo, thanks for your answers.

Kind of I got it working. There where a lot of errors regarding some PHP5 obsolete functions. That mostly involved changing "mysql_" to "mysqli_" text.

I look forward to the release of Caravel, looks very interesting!.

Thanks,
Victor

Reply all
Reply to author
Forward
0 new messages