Agent management is one of the solutions for connecting public cloud with the enterprise's internal app services. Installing an agent on the enterprise side enables interconnection between Tencent OneID on the public cloud and the enterprise's internal systems such as data sources and identity providers (IdPs).
This document guides you through configuring an agent. After the configuration is complete, you can connect to your IdPs or data sources through the agent to synchronize data from enterprise data sources to the OneID directory, or use enterprise IdPs to authenticate users.
To meet the requirements of your installation and deployment environment, agent management provides installation packages for multiple operating systems and CPU architectures.
Step 1: Creating an Agent on the OneID Side
1. Log in to the OneID admin console, click Agent Management under Settings, and then click Add Agent on the page that appears. 2. On the agent creation page, enter the Agent Name and Agent Description, and then click Confirm to create the agent.
3. After the agent is created, you are automatically redirected to the agent details page. Click Download Installer.
4. On the Download Installer page, select the installation package that matches the environment you want to deploy. Note that the agent installation package is currently available in three types: Linux (AMD64), Linux (ARM64), and Windows (AMD64). For installation instructions, see Agent Deployment on the Client Side. 5. Click the Download Configuration File button to download the configuration file.
Attention:
The configuration file contains the private key used for agent connection authentication. For security reasons, OneID does not store the agent private key, so the configuration file can be downloaded only once. Keep the configuration file safe after downloading it, as it cannot be recovered if lost.
Step 2: Deploying the Agent on the Client Side
Preparing the Agent Installation Environment and Downloading Installation Packages
1. You need to prepare a Linux or Windows machine as the agent installation machine.
Recommended Configuration:
CPU: 1 core
Memory: 1 GB or more
Disk: 500 MB or more
Minimum Configuration:
CPU: 1 core
Memory: 500 MB
Disk: 200 MB
2. Log in to the OneID admin console, click Agent Management under Settings, and on the page that appears, select the installation package that matches your prepared deployment environment, then click Copy Link. (Note: You can also go to the agent details page as described in Step 1 to copy the link.) We recommend downloading by copying the link. Alternatively, you can click the installation package directly to download it locally and then copy it to the target installation server.
3. Log in to the target server and enter the copied link to download the installation package. On Windows, enter the copied link in a browser to download it. On Linux, use the wget command to download it.
Agent Installation
Linux Environment Installation
Attention:
On Linux, the agent service is managed by systemd, so you need to have systemd and root permissions.
1. Based on the download address from the previous step, locate the downloaded installation package.
2. Grant permissions to the installation package. The authorization command is as follows:
chmod +x installation_package_name
3. Install the agent. The installation command is as follows:
./installation_package_name
4. If the display matches the following figure, the installation is successful:
Windows Environment Installation
Attention:
On Windows, the agent service is managed by the system service manager, so you need to have admin permissions.
1. Based on the download address from the previous step, locate the downloaded installation package.
2. Right-click the installation package and select Run as administrator to install it.
3. If the display matches the following figure, the installation is successful:
Agent Configuration and Startup
Linux Configuration and Startup
1. Import the configuration file. Import the configuration file downloaded in the first step into the following directory:
2. Rename the configuration file to config.json.
3. Start the agent. The startup command is as follows:
systemctl start oneid-agent
4. Check the agent startup status. The check command is as follows:
systemctl status oneid-agent
If the display matches the following figure, the startup is successful.
Windows Configuration and Startup
1. Import the configuration file. Import the configuration file downloaded in the first step into the following directory:
C:\\Program Files\\oneid\\agent\\conf
2. Rename the configuration file to config.json.
Attention:
.json is the file extension. If your Windows is set to hide file extensions, rename the configuration file to config and note this distinction.
3. Double-click start-OneID-agent to start the agent.
4. Open Task Manager and check the agent startup status.
Step 3: Common Agent Ops
Linux Ops knowledge
Start: systemctl start oneid-agent
Stop: systemctl stop oneid-agent
Check status: systemctl status oneid-agent
Installation directory: /etc/oneid/agent
Configuration file directory: /etc/oneid/agent/conf/config.json
Log directory: /etc/oneid/agent/logs
Windows Ops knowledge
Start: Double-click start-oneid-agent.
Stop: Double-click stop-oneid-agent.
Check status: Open Task Manager and check the status of the oneid-agent service.
Installation directory: C:\\Program Files\\oneid\\agent
Configuration file directory: C:\\Program Files\\oneid\\agent\\conf
Log directory: C:\\Program Files\\oneid\\agent\\logs
Step 4: Agent Management Configuration
Scheduled and Manual Agent Status Checks
1. The agent supports scheduled status checks. You can view the current running status of an agent on the agent list page or agent details page. (Note: The agent checks its status every 5 minutes.)
2. If you need to check the current agent status immediately, click Manual test on the agent details page.
3. Automatic agent upgrade
To meet customer requirements for improved agent capabilities, the agent will be updated from time to time. Therefore, the agent provides an automatic update feature. When you enable scheduled updates, the system performs updates based on the time interval you configure.
Step 5: Granting Agent Network Access
External Domains that Require Access for the Agent
The following are the external domain addresses that the agent must use. You need to add these domains to the allowlist of your firewall (internet behavior management).
|
account.tencent.com | 443 | TCP | SSO login - Tencent OneID | Non-SSO login page |
oauth2.account.tencent.com | 443 | TCP | SSO login - Tencent OneID | Login access domain |
relay.oneid.tencent.com | 5671/5672 | TCP | Login/data sync - Tencent OneID | Required when using authentication or data synchronization deployed on the customer's private network, such as AD, OpenLDAP, and WeCom (On-Premises). |
Diagram of Agent Access to AD/OpenLDAP/WeCom (On-Premises) over a Private Network
Diagram of Agent Access to WeCom Network
FAQs
Q1: Why Can't I Create More Agents After Creating Three in the Admin Console?
OneID limits each tenant to a maximum of three agents. Each agent can be used by multiple data sources and IdPs simultaneously.
Q2: Why Does Installation Fail in a Linux Environment?
1. Check whether you have root and systemd permissions.
2. Check whether the installation package has been authorized.
3. Check whether the installation package matches the installation environment.
Q3: Why Can't I Download the Configuration File More Than Once?
The configuration file contains the private key used for agent connection authentication. For security reasons, OneID does not store the agent private key, so the configuration file can be downloaded only once. Keep the configuration file safe after downloading it, as it cannot be recovered if lost.
Q4: Why Does the Admin Console Show "Not Running" When My Agent Is Already Running?
The agent running status is checked every 5 minutes, so there may be a time difference. To check the agent status immediately, go to the agent details page and click Manual Test.
Q5: Errors Occur When the Agent Is Decompressed on Linux
trying to install oneid-agent to [/etc/oneid/agent]
cp: cannot stat '/tmp/
selfextract.oneid.agent.JGio7bWGx/*': No such file
or directory
The agent installation package is essentially a .tar.bz2 archive, which requires bzip2 for decompression during installation. Some Linux distributions (such as CentOS 7.2 series) do not have bzip2 installed by default, causing an error during decompression. Check whether bzip2 is installed by running the command: type bzip2 or which bzip2. If it is not installed, you need to install it yourself using a package manager such as yum/dnf/apt.
Q6: Errors Occur When the Agent Is Started on Windows: StartService Failed 1053
The configuration file is named incorrectly. Check whether the config.json file exists in the C:\\Program Files\\oneid\\agent\\conf directory. Note: .json is the file extension. If you cannot determine whether the file name is correct, open cmd (Command Prompt) in Windows and run the following command to check:
Go to the agent configuration file directory: cd C:\\Program Files\\oneid\\agent\\conf
View the file name in the configuration file directory: dir
The config.json file must exist in the directory. If the file is missing or the file name is incorrect (for example, it appears as config.json.json), you must correct it. The following figure shows an example of an incorrect file name: