====== Project Generator Configuration ====== The Mervis Project Generator requires specific credentials to access the Project Manager and Data Hub. These credentials must be defined within a local `params.txt` configuration file before generating your project. > **⚠️ WARNING: DEPRECATION OF "TODO" CREDENTIALS** > Previously, the placeholder value `TODO` was accepted for Data Hub credentials (`--dataHubLogin TODO` and `--dataHubPass TODO`). **This is no longer supported.** > * **Current Phase:** A real Data Hub username and password must now be provided when generating new projects. Existing `params.txt` files containing `TODO` must be updated immediately to avoid failures during project generation. > * **Planned Second Phase:** In the upcoming second phase, existing generated projects that still use `TODO` credentials will entirely stop working. Updating only the configuration for newly generated projects will not be sufficient. You must review and update existing projects with valid Data Hub credentials before the second phase is activated to prevent downtime. ===== 1. Configuration File (params.txt) ===== You must define two sets of credentials in your `params.txt` file: one for the Project Manager and one for the Data Hub. **Example configuration:** --pmLogin GlobalDomain\test-generator-manage --pmPass rw --dataHubLogin GlobalDomain\test-generator-data-2 --dataHubPass rws *(Note: The exact parameter name for the Project Manager password—`--pmPass` versus `--pmPassword`—should be verified based on your specific generator version).* ===== 2. Account Separation & Security ===== For optimal security, **the Project Manager account and the Data Hub account should be separate entities**. Both accounts must follow the principle of least privilege. * **Project Manager Account:** Should be a dedicated account with limited permissions used exclusively for project generation. While it can theoretically be the personal account of the user generating the project, a separate account is highly recommended. (MFA may be supported for this account in the future). * **Data Hub Account:** Should normally be configured as a service or system account. This account will not support MFA. * **Protecting params.txt:** Because the usernames and passwords are stored in plaintext on your local disk within `params.txt`, do not use highly privileged personal accounts. The file must be protected from unauthorized access and **must never be committed to source control** (e.g., Git). ===== 3. Project Manager Account Permissions ===== The `pmLogin` account is used by the Project Generator to access the Project Manager. It requires the **Manage** permission assigned across all data nodes in the target domain. **How to configure permissions in the Portal:** - Navigate to **Manage domain**. - Select **Change datanodes permissions** from the actions menu. - Assign the **Manage** checkbox to your Project Manager account for the required nodes. {{:en:mervis-scada:30-portal:snímek obrazovky 2026-08-05 110320.png?800}} //Accessing datanodes permissions via the Manage Domain menu// {{:en:mervis-scada:30-portal:snímek obrazovky 2026-08-05 110247.png?800}} //Assigning the Manage permission to the Project Manager account// ===== 4. Data Hub Account Permissions ===== The `dataHubLogin` account is embedded into the generated project, which uses it for Data Hub operations. The required permissions depend entirely on the project's function: * **GetValues:** Required for reading data values. A read-only project only needs this permission. * **ExecuteCommand:** Required for writing values or executing commands. * **Combined Requirement:** While configuring a project with only `ExecuteCommand` is technically valid in the Portal, the project will fail to operate because it still requires the ability to read data. Therefore, any project that writes data will normally require **both** `GetValues` and `ExecuteCommand`. ===== 5. Troubleshooting Common Errors ===== If your credentials or permissions are configured incorrectly, the Project Generator will return specific error messages. ==== Missing Project Manager Login or Password ==== **Error:** `ArgumentException: Not valid arguments: Invalid project manager login. Invalid project manager password.` **Possible Causes:** * The `--pmLogin` argument is missing from `params.txt`. * The `--pmPass` (or `--pmPassword`) argument is missing. {{:en:mervis-scada:30-portal:snímek obrazovky 2026-08-04 135718.png?800}} //Example of the ArgumentException error in the Generator GUI// ==== Incorrect Project Manager Login or Password ==== **Error:** `Exception: Getting datanodes problem. Code:42-InvalidCredentials InvalidCredentials.` **Possible Causes:** * The provided username is incorrect. * The provided password is incorrect. ==== Missing Manage Permission ==== **Error:** `Exception: Getting datanodes problem. Code:40-ErrorByMessage Request cannot be completed for some of the requested data nodes:` **Possible Cause:** * The Project Manager account does not have the **Manage** permission enabled for all the data nodes requested by the generator. Return to the Portal and verify the account's datanode permissions.