### Example keyfactor-setup command with sample values Source: https://docs.redtrust.com/docs/getting-started/installation/linux-installation Example command for user cris@local.users on agent01.example.com. The password can be left empty and set later; when set later it will be masked as asterisks. ```bash keyfactor-setup hostname=agent01.example.com clientid=T4N3r2WBbvKfyYe8/z+SVW5N= username=cris@local.users password=ChangeMe123 loglevel=LOW ``` -------------------------------- ### Verify installation with systemctl status Source: https://docs.redtrust.com/docs/getting-started/installation/linux-installation Verifies the installation by checking the status of the KeyfactorService.service. The output shows the service is active (running) and enabled. ```bash systemctl status KeyfactorService.service ``` ```bash ● KeyfactorService.service - Long running KeyfactorService service/daemon created by Keyfactor. Loaded: loaded (/etc/systemd/system/KeyfactorService.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2024-01-30 16:22:33 UTC; 20min ago Main PID: 5472 (KeyfactorServic) Tasks: 15 (limit: 4668) Memory: 40.9M CPU: 960ms CGroup: /system.slice/KeyfactorService.service └─5472 /usr/local/keyfactor/service/KeyfactorService ``` -------------------------------- ### Example output of PowerShell GUID query Source: https://docs.redtrust.com/docs/getting-started/installation/windows-installation Shows the expected output from the PowerShell command, including the DisplayName, DisplayVersion, and PSChildName (the GUID). ```plaintext DisplayName : RedTrust DisplayVersion : 4.10.5 PSChildName : {5F567E45-9801-4122-9213-1731DBC44E11} ``` -------------------------------- ### Show stored configuration with keyfactor-setup show Source: https://docs.redtrust.com/docs/getting-started/installation/linux-installation Displays the stored configuration details. ```bash keyfactor-setup show ``` -------------------------------- ### Retrieve Redtrust product GUID via PowerShell Source: https://docs.redtrust.com/docs/getting-started/installation/windows-installation Queries the Windows registry to find the installed Redtrust agent and display its name, version, and product code (PSChildName). The PSChildName value is the GUID to use with msiexec. ```powershell Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object { $_.DisplayName -like "*Redtrust*" } | Select-Object DisplayName, DisplayVersion, PSChildName ``` -------------------------------- ### Install Redtrust agent package (apt/dnf) Source: https://docs.redtrust.com/docs/getting-started/installation/linux-installation Installs the Redtrust agent package on Debian/Ubuntu (apt) or Red Hat (dnf). The placeholder RUTA_AL_PAQUETE_REDTRUST is replaced with the actual path; examples show .deb and .rpm files. ```bash sudo apt install RUTA_AL_PAQUETE_REDTRUST ``` ```bash sudo apt install ./agent/amd64_ubuntu22.04_keyfactor-agent-4.20.0-457bb50-Standalone.deb ``` ```bash sudo dnf install RUTA_AL_PAQUETE_REDTRUST ``` ```bash sudo dnf install ./amd64_rhel8_keyfactor-agent-4.20.0-457bb50-Standalone.rpm ``` -------------------------------- ### Instalar el agente con UNATTENDED_BROWSERS=1 Source: https://docs.redtrust.com/docs/how-tos/unattended-browsers Comando msiexec para instalar el agente de Windows en modo navegadores desatendidos. El parámetro UNATTENDED_BROWSERS=1 hace que el instalador omita todos los componentes de la extensión del navegador. Reemplaza SERVIDOR_PRIMARIO, SERVIDOR_SECUNDARIO y TU_CLIENT_ID con los valores de tu entorno. ```bash msiexec /i rt-agent-x64-VERSIÓN-SUFIJO.msi RTPRIMARY=SERVIDOR_PRIMARIO RTSECONDARY=SERVIDOR_SECUNDARIO CLIENTID=TU_CLIENT_ID AuthMode=LocalUsers LANGUAGE=es-ES UNATTENDED_BROWSERS=1 ``` -------------------------------- ### GET /signapi/v1/sp-config Source: https://docs.redtrust.com/docs/apis/sign/sign-api-reference Retrieves the SharePoint configuration parameters (client ID and tenant ID) associated with the Redtrust installation. Requires a bearer token obtained via centralized OAuth 2.0 flow. ```APIDOC ## GET /signapi/v1/sp-config ### Description Devuelve los parámetros de configuración de SharePoint asociados a la instalación de Redtrust. Estos valores se usan para la integración de Signtrust con SharePoint. ### Method GET ### Endpoint /signapi/v1/sp-config ### Parameters #### Authentication - **Authorization** (string) - Required - `Bearer TU_ACCESS_TOKEN` ### Response #### Success Response (200) - **message** (string) - Response message. - **messageType** (string) - Type of message, e.g., "SUCCESS". - **errorCode** (string) - Error code, e.g., "OK". - **data** (object) - Contains SharePoint configuration. - **sharepoint_clientid** (string) - ID de cliente de la aplicación registrada en Azure para la integración con SharePoint. - **sharepoint_tenantid** (string) - ID del tenant de Azure asociado a la organización. #### Response Example { "message": "string", "messageType": "SUCCESS", "errorCode": "OK", "data": { "sharepoint_clientid": "string", "sharepoint_tenantid": "string" } } ``` -------------------------------- ### Autenticación con usuario local usando rtsetup.exe Source: https://docs.redtrust.com/docs/getting-started/installation/windows-installation Comando para autenticarse con un usuario local. Requiere nombre de usuario en formato nombre@dominio y contraseña. ```bash rtsetup.exe -authMode=LocalUsers -username=TU_USUARIO -password=TU_CONTRASEÑA ``` -------------------------------- ### Install opensc on Debian/Ubuntu Source: https://docs.redtrust.com/docs/getting-started/installation/linux-installation Installs the pkcs11-tool utility on Debian/Ubuntu systems. ```bash sudo apt install opensc ``` -------------------------------- ### Instalar el agente Redtrust en Windows con msiexec y configurar autenticación local Source: https://docs.redtrust.com/docs/getting-started/installation/windows-installation Comando de instalación del agente Redtrust en Windows. Utiliza msiexec con parámetros como RTPRIMARY, RTSECONDARY, CLIENTID, AuthMode y AGENTMODE. Después de la instalación, se ejecuta rtsetup.exe para configurar la autenticación local y se reinicia el servicio RTService. El comando timeout 120 espera a que la instalación termine antes de ejecutar rtsetup. ```bash msiexec /i rt-agent-x64-VERSIÓN-SUFIJO.msi RTPRIMARY=SERVIDOR_PRIMARIO RTSECONDARY=SERVIDOR_SECUNDARIO CLIENTID=TU_CLIENT_ID AuthMode=LocalUsers AGENTMODE=SERVER /l*v log_verbose.txt /qn echo Exit Code is %errorlevel% timeout 120 "C:\Program Files\Redtrust\rtsetup.exe" -authMode=LocalUsers -username=TU_USUARIO -password=TU_CONTRASEÑA net stop RTService && net start RTService ``` -------------------------------- ### Install opensc on Red Hat Source: https://docs.redtrust.com/docs/getting-started/installation/linux-installation Installs the pkcs11-tool utility on Red Hat systems. ```bash sudo yum install opensc ``` -------------------------------- ### List keyfactor-setup parameters and operations Source: https://docs.redtrust.com/docs/getting-started/installation/linux-installation Shows available parameters and operations for the keyfactor-setup command. ```bash keyfactor-setup ``` -------------------------------- ### Ejecutar rtsetup para configurar el agente Source: https://docs.redtrust.com/docs/getting-started/installation/windows-installation Comando para ejecutar la herramienta rtsetup.exe, que configura el agente de Redtrust. Muestra la salida con opciones de uso y parámetros opcionales. ```bash > rtsetup ``` ```text Tool to configure the Redtrust Server Agent. Usage: rtsetup.exe -authMode=[LocalUsers|Ldap] -username=[username] -password=[password] or rtsetup.exe -authMode=ActivationCode -code=[activation code] Optional parameters: -primaryServer=[IP or hostname] -secondaryServer=[IP or hostname] -servicePort=[Port] (default value: 443) Note: Both need to be set at once. Port is only updated when servers are set. Use this tool in order to: Set RedTrust credentials for agent (local users or activation code). Set Redtrust server addresses. After tool execution, service RTService needs to be restarted in order to refresh configuration. ``` -------------------------------- ### Install ExchangeOnlineManagement module Source: https://docs.redtrust.com/docs/how-tos/sign-email Installs the ExchangeOnlineManagement PowerShell module for the current user. Required before connecting to Exchange Online. ```powershell Install-Module -Name ExchangeOnlineManagement -Scope CurrentUser ``` -------------------------------- ### Update system packages (apt/dnf) Source: https://docs.redtrust.com/docs/getting-started/installation/linux-installation Updates all installed packages on Debian/Ubuntu (apt) or Red Hat (dnf) before installing the agent. ```bash sudo apt update && sudo apt upgrade ``` ```bash sudo dnf update && sudo dnf upgrade ``` -------------------------------- ### Instalar Java y libnss3-tools Source: https://docs.redtrust.com/docs/how-tos/unattended-agent Comandos para instalar las dependencias necesarias de AutoFirma en Ubuntu. Se requiere Java y libnss3-tools. ```bash apt-cache search java | more sudo apt install openjdk-11-jre sudo apt install libnss3-tools ``` -------------------------------- ### Install system dependencies (apt/dnf) Source: https://docs.redtrust.com/docs/getting-started/installation/linux-installation Installs the system dependencies required by the Redtrust agent on Debian/Ubuntu (apt) or Red Hat (dnf). ```bash sudo apt install libcurl4 dotnet-runtime-8.0 aspnetcore-runtime-8.0 libssl3 libsqlite3-0 opensc -y ``` ```bash sudo dnf -y install libcurl dotnet-runtime-8.0 aspnetcore-runtime-8.0 sqlite-libs libstdc++ openssl-libs opensc ``` -------------------------------- ### Instalación en modo servidor con AGENTMODE=SERVER Source: https://docs.redtrust.com/docs/getting-started/installation/windows-installation Comando para instalar el agente en modo servidor, estableciendo AGENTMODE=SERVER. En este modo, los certificados se cargan en el almacén de certificados del equipo, no en el del usuario. ```bash msiexec /i rt-agent-x64-VERSIÓN-SUFIJO.msi RTPRIMARY=SERVIDOR_PRIMARIO RTSECONDARY=SERVIDOR_SECUNDARIO CLIENTID=TU_CLIENT_ID AuthMode=LocalUsers AGENTMODE=SERVER LANGUAGE=es-ES ``` -------------------------------- ### Test agent configuration with keyfactor-setup test Source: https://docs.redtrust.com/docs/getting-started/installation/linux-installation Runs a test to verify the agent configuration. ```bash keyfactor-setup test ```