
Several scripts are available to create user and contracts.
Edit the script to replace the database connection information ($DbUser, $DbUserPasswd and $DbName)
cd tanaguru-<version>.<architecture>/install-web-app/sql-management
vi ./tg-create-user.sh
Execute the script with the wished user data.
sh ./tg-create-user.sh -e <Email> -p <password> -l <LastName> -f <FirstName>
Edit the script to replace the database connection information ($DbUser, $DbUserPasswd and $DbName)
cd tanaguru-<version>.<architecture>/install-web-app/sql-management
vi ./tg-create-contract.sh
Execute the script with the wished contract data.
sh ./tg-create-contract.sh -l <SiteLabel> -w <FQDN-url> -u <UserId> -p <ProductId>
Where <ProductId> can be one the following values :
And <FDQN-url> is the Url associated with the contract. This value can be set to "" with the "up to 10 pages" product (ProductId=1); in this case the contract has no domain restriction. This value is ignored in case of "files" product
When an audit is launched, parameters are set to define the limitations of the crawl.
For a "page" or "group of pages" audit, these parameters are defined as follows :
The two parameters PROXY_PORT and PROXY_HOST are set regarding the variables "proxyHost", "proxyPort" and "proxyUrlExclusion" defined in the tgol.conf file.
For a "site" audit, these parameters are defined by default as follows :
The two parameters PROXY_PORT and PROXY_HOST are set regarding the variables "proxyHost", "proxyPort" and "proxyUrlExclusion" defined in the tgol.conf file.
They correspond to the max value the user can fills in for each parameter (upper boundary) and can be overriden in the audit set-up form.
These default values correspond to the entries in the table "PARAMETER" in the tanaguru database. To override these default values, you can modify the field "Parameter_Value" for a given Parameter_Element. Please remind that this table MUST contain only ONE entry that combines a "Parameter_Value" with the field "Is_Default" set to true (b'1').
The site audit crawl parameters can also be specific to a contract. To override a parameter for a given contract, it is necessary to create a restriction to this contract. To do so, an entry in the "RESTRICTION" table needs to be added with the wished value and the ID of associated RESTRICTION_ELEMENT. To be applied, the code of the RESTRICTION_ELEMENT ("Cd_Restriction_Element" field) MUST be idenitical to the code of the overrident parameter ("Cd_Parameter_Element" field of the PARAMETER_ELEMENT table).
For example, to override the "MAX_DOCUMENTS" parameter for a given contract, you need to :
SELECT `Id_Restriction_Element` FROM `TGSI_RESTRICTION_ELEMENT` WHERE `Cd_Restriction_Element`='MAX_DOCUMENTS';
INSERT IGNORE INTO `TGSI_RESTRICTION` (`Id_Restriction_Element`, `Restriction_Value`) VALUES ('$Id_Restriction_Element', '1000');
SELECT `Id_Restriction` FROM `TGSI_RESTRICTION` WHERE `Id_Restriction_Element`='$Id_Restriction_Element' AND `Restriction_Value`='1000';INSERT INTO TGSI_CONTRACT_RESTRICTION (`RESTRICTION_Id_Restriction`,`CONTRACT_Id_Contract`) VALUES ('$Id_Restriction, '$Id_Contrat'');
Some contracts can be limited in terms of usage. Two limitations are possible :
This limitation can be defined thanks to a RESTRICTION entry associated with the "RESTRICTION_ELEMENT" entry defined with the "Cd_Restriction_Element" set to "ACT_LIMITATION".
For example, to limit the numbers of audits for a given contract you need to :
SELECT `Id_Restriction_Element` FROM `TGSI_RESTRICTION_ELEMENT` WHERE `Cd_Restriction_Element`='ACT_LIMITATION';
INSERT IGNORE INTO `TGSI_RESTRICTION` (`Id_Restriction_Element`, `Restriction_Value`) VALUES ('$Id_Restriction_Element', '50');
SELECT `Id_Restriction` FROM `TGSI_RESTRICTION` WHERE `Id_Restriction_Element`='$Id_Restriction_Element' AND `Restriction_Value`='50';
INSERT INTO TGSI_CONTRACT_RESTRICTION (`RESTRICTION_Id_Restriction`,`CONTRACT_Id_Contract`) VALUES ('$Id_Restriction, '$Id_Contrat'');This limitation can be defined thanks to a RESTRICTION entry associated with the "RESTRICTION_ELEMENT" entry defined with the "Cd_Restriction_Element" set to "ACT_BY_IP_LIMITATION". The period is expressed in seconds and the format is "nb_of_acts/period"
For example, to the limit the number of audits in a period for a given IP for a given contract, you need to :
SELECT `Id_Restriction_Element` FROM `TGSI_RESTRICTION_ELEMENT` WHERE `Cd_Restriction_Element`='ACT_BY_IP_LIMITATION';
INSERT IGNORE INTO `TGSI_RESTRICTION` (`Id_Restriction_Element`, `Restriction_Value`) VALUES ('$Id_Restriction_Element', '50');
SELECT `Id_Restriction` FROM `TGSI_RESTRICTION` WHERE `Id_Restriction_Element`='$Id_Restriction_Element' AND `Restriction_Value`='50';
INSERT INTO TGSI_CONTRACT_RESTRICTION (`RESTRICTION_Id_Restriction`,`CONTRACT_Id_Contract`) VALUES ('$Id_Restriction, '$Id_Contrat'');