Details
-
Suggestion
-
Resolution: Fixed
-
1
-
9
-
Description
Problem Definition
The remote agent authentication tab does not display show any association between the authentication entry, agent UUID and the real agent that this corresponds to. This make managing the authentication entries difficult with higher agent counts.
Suggested Solution
Implement a link between Agent UUID and Agent ID. The Agent Authentication tab could display:
- Existing agents (hostname) that the authentication entry applies to. If the authentication entry does not link to an existing agent, the UI should say as much.
- For hosts with multiple agents, it'd be beneficial to also display the agent home directory location in the agent summary screen.
- The agent summary should display linked UUIDs / approval. Being able to revoke authentication from this UI would also be beneficial.
BAM-18647: deletion of an agent should revoke the access as well (cleaning agent_authentication table for that agent only).
Workaround 1
The only way to map a Bamboo remote agent back to its UUID / Agent Authentication is via the filesystem on the remote agent. The details are stored in the <bamboo-agent-home>/bamboo-agent.cfg.xml. Example below:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <configuration> <buildWorkingDirectory>/root/bamboo-agent-home/xml-data/build-dir</buildWorkingDirectory> <agentUuid>ff674641-a868-43ef-9e92-c2e67fbef71b</agentUuid> <agentDefinition> <id>70189058</id> <name>localhost</name> <description>Remote agent on host localhost</description> </agentDefinition> </configuration>
Using the UUID and name of the agent, you can then track this back to the authentication entry.
Furthermore you use the information from the bamboo-agent.cfg.xml to query the following database tables like in the below example (there is no link between agent ID and UUID in the database though):
// Using agentUuid from bamboo-agent.cfg.xml SELECT * FROM AGENT_AUTHENTICATION WHERE UUID = 'ff674641-a868-43ef-9e92-c2e67fbef71b'; // Using id from bamboo-agent.cfg.xml SELECT * FROM QUEUE WHERE QUEUE_ID = 70189058;
Workaround 2
Enable TRACE log level for class com.atlassian.bamboo.buildqueue.manager.RemoteAgentManagerImpl and in logs it will print agent id and UUID from heartbeat agent messages. Then follow steps from Workaround 1 to map agent id to agent name
Attachments
Issue Links
- causes
-
BAM-10492 After revoking the authentication of a remote agent, it still can run builds.
- Closed
- incorporates
-
BAM-18647 Deleting a Remote Agent should revoke Agent Authentication
- Closed
- is duplicated by
-
BAM-16431 Display UUID of agent in the Agent Information page
- Closed
- is related to
-
BAM-20382 Bamboo admin can revoke agent authorization from agent details screen
- Gathering Interest
- supersedes
-
BAM-10492 After revoking the authentication of a remote agent, it still can run builds.
- Closed
-
BAM-19701 Allow Remote Agent to impersonate
- Closed
- is mentioned by
-
PSR-266 Loading...