Openframe Tool Agent Nats Installation
OpenFrame Documentation
Get the most out of OpenFrame · Book 30 minutes with Conrad, 25 years in IT. He'll show you what Mingo and Fae can take off your list.
OpenFrame Documentation
Openframe Tool Agent Nats Installation is a small Spring component library used when the OpenFrame integrated-tool feature is enabled. It prepares tool command arguments by resolving a registration-secret placeholder at execution time. Its Fleet MDM implementation obtains the current Fleet enrollment secret from the configured integrated-tool API rather than storing that secret in command definitions.
The module is supplied by the OpenFrame OSS Library artifact com.openframe.oss:openframe-tool-agent-nats-installation at version 7.0.11. It runs as part of this tenant deployment when included by an application. Although its artifact name identifies the tool-agent NATS installation path, these two classes do not create NATS connections or subscriptions; they provide command-parameter resolution used by that wider workflow.
Both Spring components are conditional on openframe.integration.tool.enabled=true. When the property is absent or false, neither the resolver nor the Fleet MDM retriever is registered.
The Fleet MDM retriever additionally reads:
| Setting | Purpose | Default |
|---|---|---|
TENANT_ID |
Tenant identifier forwarded to Fleet MDM when configured | Empty value |
openframe.fleet.multi-tenancy.enabled |
Declares whether a tenant identifier is mandatory | false |
At bean initialization, FleetTenantHeader.validate rejects a multi-tenant configuration with a blank TENANT_ID. This prevents the module from making an unscoped Fleet MDM request in a deployment that requires tenant isolation.
flowchart LR
CommandDefinition["Tool command arguments"] --> Resolver["Tool Command Params Resolver"]
Resolver -->|"placeholder present"| Retriever["Fleet MDM Secret Retriever"]
Resolver -->|"no placeholder"| ResolvedArgs["Unchanged arguments"]
Retriever --> ToolConfig["Integrated Tool Service"]
Retriever --> ToolUrl["Tool URL Service"]
ToolConfig --> FleetClient["Fleet MDM Client"]
ToolUrl --> FleetClient
FleetClient --> FleetApi["Fleet MDM API"]
FleetApi --> Secret["Enrollment secret"]
Secret --> Resolver
Resolver --> ResolvedArgs
The components have distinct responsibilities:
${server.registrationSecret} in each supplied argument.fleetmdm-server. It discovers Fleet's API endpoint and API key from integrated-tool configuration, then calls Fleet MDM for an enrollment secret.ToolCommandParamsResolver exposes process(toolId, commandArgs).
${server.registrationSecret} is returned unchanged.getToolId() exactly matches toolId.IllegalStateException.This design keeps command templates declarative while resolving sensitive enrollment data as late as possible. It also means a command definition for a tool without a registered retriever must not use the registration-secret placeholder.
FleetMdmAgentRegistrationSecretRetriever implements the retrieval contract for the fixed tool identifier fleetmdm-server.
sequenceDiagram
participant Resolver as "Tool Command Params Resolver"
participant Retriever as "Fleet MDM Secret Retriever"
participant Tools as "Integrated Tool Service"
participant Urls as "Tool URL Service"
participant Fleet as "Fleet MDM API"
Resolver->>Retriever: Request secret for fleetmdm-server
Retriever->>Tools: Find integrated tool configuration
Tools-->>Retriever: API key
Retriever->>Urls: Find API tool URL
Urls-->>Retriever: Host and port
Retriever->>Fleet: Get enrollment secret
Fleet-->>Retriever: Enrollment secret
Retriever-->>Resolver: Registration secret
The retriever performs the following operation for each secret request:
fleetmdm-server integrated-tool record.FleetMdmClient, passing the tenant identifier when one is configured.Any missing tool record, missing API URL, invalid response, or Fleet MDM client failure is wrapped as an IllegalStateException. The success log confirms retrieval only; it does not log the enrollment secret.
| Boundary | Behavior | Maintainer consideration |
|---|---|---|
| Integrated-tool feature disabled | Neither component exists in the Spring context. | Enable the feature before configuring command templates that require secret substitution. |
| Null command argument list | The resolver returns null. | Callers must decide whether a null list is valid for their command model. |
| Null individual argument | The resolver preserves the null entry. | Preserve list position without attempting substitution. |
| Placeholder is absent | The argument passes through unchanged. | Secret lookup is avoided for ordinary arguments. |
| Unknown tool identifier with placeholder | Resolution fails. | Register an implementation of the retriever contract for that tool before using the placeholder. |
| Multi-tenant Fleet setup without tenant ID | Application initialization fails. | Supply TENANT_ID whenever Fleet multi-tenancy is enabled. |
| Fleet configuration or API failure | Retrieval fails and command processing cannot complete. | Verify the tool record, API URL, API key, tenant context, and Fleet API availability. |
This repository deploys NATS as a datasource and provides the OpenFrame client service with NATS configuration. The broader tenant platform uses the OpenFrame client and management services for agent lifecycle and integrated-tool operations. Openframe Tool Agent Nats Installation contributes the secret-resolution capability needed where that workflow builds Fleet MDM agent command arguments; it does not own the NATS transport configuration, persistence, or tool-installation orchestration itself.
The module relies on OpenFrame data services for integrated-tool metadata and on the OpenFrame Fleet MDM SDK for the enrollment-secret API call. Those services and SDK types are supplied by the OpenFrame OSS Library dependency set, while this tenant repository supplies the runtime configuration and service deployment.
To add registration-secret substitution for another integrated tool, provide a Spring implementation of the ToolAgentRegistrationSecretRetriever contract that:
getToolId().getSecret().The resolver will select the first registered implementation whose tool identifier exactly matches the command's tool identifier. Keep identifiers unique among retrievers to make selection deterministic.