TMS - Manuale
1. Guide for inserting new client
In the Google Drive folder you can find all the inserts needed for 1 client to be inserted.
Inserts are needed to be made in 2 databases: tms-oauth and tms.
The tms-oauth is used for logging in, OAuth login while the tms DB is used by the application.
Here are the details for the DBs in INT and PROD accordingly:
INT tms DB
Url
jdbc:mysql://10.253.195.19:3306/tms?serverTimezone=CET
Username
root
Password
Alosys1!
INT tms-oauth DB
Url
jdbc:mysql://10.253.195.19:3306/tms-oauth?serverTimezone=CET
Username
root
Password
Alosys1!
PROD tms DB
Url
jdbc:mysql://10.31.184.149:3306/tms?serverTimezone=CET
Username
root
Password
Alosys1!
PROD tms-oauth DB
Url
jdbc:mysql://10.31.184.149:3306/tms?serverTimezone=CET
Username
root
Password
Alosys1!
For example now we have a new user LA01039806 PREXTA and the following SQL commands should be executed:
INSERT INTO `tms-oauth`.oauth_user
(id, last_name, name, password, username)
VALUES
(106, 'BANCA MEDIOLAN', 'BANCA MEDIOLAN', '{bcrypt}$2a$12$R/4VhqYCszPo5dIBkO2JzOR6aKS89S2//sf4TD5akOArxIhXEROi2', 'banca-mediolan');
INSERT INTO `tms-oauth`.oauth_client
(id, access_token_validity, additional_information, authorities, authorized_grant_types, autoapprove, client_id, client_secret, refresh_token_validity, resource_ids, scope, web_server_redirect_uri)
VALUES
(106, 3600, null, 'ROLE_CLIENT', 'password,authorization_code,refresh_token,client_credentials', false, '0095914', '{bcrypt}$2a$12$olpBQ.8N20167qSEppUSuuPEEb7vk./no.CTmiDEu4KDuXF/8gTVC', 360000, 'tms_api',
'useraccount', 'http://localhost:3000/welcome');
INSERT INTO tms.tms_client
(id, client_code, name, description, associated_comapnies, flag_email_ttsla, email_noc_ttsla, flag_email_asm, email_noc_asm, sender, can_call_udp_cst, can_call_ticket_transactions, can_call_all_ticket, can_call_udp, is_active, created_at)
VALUES (106, '0095914', 'BANCA MEDIOLAN', 'Customer that FastWeb sent to make a user for', 'LA01039806' , false, 'fastweb-test-1@alosys.it', false, 'fastweb-test-1@alosys.it', 'test@alosys.it', false, false, true, false, true, now());
It is important to change the username, password and client secret according to the new client.
The client_secret and password need to be encrypted with b-crypt (usually we use 12 rounds).
You can use the following link for encrypting with b-crypt:
https://bcrypt-generator.com/
After doing all the steps above, it is important to make inserts for the parameters (WS parameters) used by the client. Here you are telling which parameters are mandatory for certain client and which are not.
Here is an example of the inserts for the client Prexta:
INSERT INTO tms.cfg_param_validation (id, ws_id, client_id, param_id, param_default_value, is_mandatory) VALUES (601, 1, 106, 1, null, true); -- open_ticket customerCode
INSERT INTO tms.cfg_param_validation (id, ws_id, client_id, param_id, param_default_value, is_mandatory) VALUES (602, 1, 106, 2, null, true); -- open_ticket aliasSede
In the case of Banca Mediolan client at the moment of writing the guide there is no problem_type sent to be configured for the client but if they provide an Excel with problem types then the insert should be the following:
INSERT INTO tms.tms_problem_type
(id, code, client_id, category, subcategory, area, id_tripletta, ws_id, is_active, ts_created, ts_modified)
VALUES (1100, 'SICUREZZA_DEVICE_CHANGE_MNG', 106, null, null, null, '942972402', 1, true, DEFAULT, null);
After all of these procedures have been completed, it is needed to update the documentation which is attached on Google Drive.
The link for Google Drive folder for Banca Mediolan client is the following:
https://drive.google.com/drive/u/1/folders/13KzFehAKvonT_9zxWlDldqciotva3m6d
You can see example from the other clients present in the other folders how it should look like.
The last step is to update this excel document on google drive:
https://docs.google.com/spreadsheets/d/1Nal3pcmdwi4TioaGuoIBjM2VathTsLrg6TvDy4LUt_8/edit#gid=0
Esempio di ticket risolto da Jove