venafi-connector-machine 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +93 -0
  2. package/bundle.mjs +33264 -0
  3. package/package.json +44 -0
package/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # venafi-connector-machine
2
+
3
+ An MCP (Model Context Protocol) server that provides machine connector-specific knowledge, templates, and tools for building **Venafi TLS Protect Cloud machine connectors**.
4
+
5
+ Use this with Claude Code or any MCP-compatible AI assistant to get expert guidance on SSH and REST API machine connectors — discovery, provisioning, manifest design, and all the gotchas.
6
+
7
+ ## What's Inside
8
+
9
+ | Tool | Description |
10
+ |---|---|
11
+ | `get_machine_manifest` | Complete machine connector manifest.json template with all sections explained |
12
+ | `get_machine_domain_types` | Go domain types: Connection, Keystore, Binding, CertificateBundle, Client |
13
+ | `get_machine_endpoints` | Handler and service interface templates for all 5 endpoints |
14
+ | `get_machine_best_practices` | 28+ lessons learned from building production connectors |
15
+ | `get_ssh_client_pattern` | SSH client abstraction: Connect, RunCommand, WriteFile, ReadFile |
16
+ | `get_rest_client_pattern` | REST API client: multi-auth, 3-service decomposition, uber/fx DI |
17
+
18
+ ### 5 Machine Connector Endpoints
19
+
20
+ | Endpoint | Purpose |
21
+ |---|---|
22
+ | `testConnection` | Validate connectivity to the target system |
23
+ | `discoverCertificates` | Find certificates on the target (paginated) |
24
+ | `installCertificateBundle` | Write cert + chain + key to the target |
25
+ | `configureInstallationEndpoint` | Apply the certificate (restart service) |
26
+ | `getTargetConfiguration` | Return target system info for dynamic UI dropdowns |
27
+
28
+ ### 28 Lessons Learned
29
+
30
+ Covering SSH and REST API patterns from all machine connector projects:
31
+
32
+ - DER→PEM conversion, DER→PKCS12 conversion, key type detection
33
+ - Discovery pagination, `discoveryPage: null` vs `{}`, response `messages` key
34
+ - `x-primaryKey` UI visibility, empty values causing silent MI drops
35
+ - OAuth2 token exchange (JSON vs form-urlencoded body formats)
36
+ - Null-safe JSON arrays, binding must never be nil
37
+ - Discovery label rules (`title` vs `x-labelLocalizationKey`)
38
+ - Per-profile enrichment patterns, retired certificate handling
39
+ - And more...
40
+
41
+ ## Setup
42
+
43
+ ### Claude Code
44
+
45
+ Add to your project's `.claude/settings.json`:
46
+
47
+ ```json
48
+ {
49
+ "mcpServers": {
50
+ "venafi-connector-machine": {
51
+ "command": "npx",
52
+ "args": ["-y", "venafi-connector-machine"]
53
+ }
54
+ }
55
+ }
56
+ ```
57
+
58
+ Best used alongside the core MCP:
59
+
60
+ ```json
61
+ {
62
+ "mcpServers": {
63
+ "venafi-connector-core": {
64
+ "command": "npx",
65
+ "args": ["-y", "venafi-connector-core"]
66
+ },
67
+ "venafi-connector-machine": {
68
+ "command": "npx",
69
+ "args": ["-y", "venafi-connector-machine"]
70
+ }
71
+ }
72
+ }
73
+ ```
74
+
75
+ ## Built From Experience
76
+
77
+ Knowledge extracted from building these machine connectors:
78
+
79
+ | Connector | Connection | Key Patterns |
80
+ |---|---|---|
81
+ | **Splunk** | SSH | Combined PEM, heredoc file writing, systemctl restart |
82
+ | **FortiGate** | REST API | PKCS12 provisioning, multi-VDOM discovery, API token auth |
83
+ | **IBM APIC** | REST API | OAuth2 token exchange, per-profile enrichment, PATCH vs PUT |
84
+ | **IBM DataPower** | REST API | PKCS12 provisioning, REST client patterns |
85
+
86
+ ## Related Packages
87
+
88
+ - [`venafi-connector-core`](https://www.npmjs.com/package/venafi-connector-core) — Shared architecture, templates, deployment, troubleshooting
89
+ - [`venafi-connector-ca`](https://www.npmjs.com/package/venafi-connector-ca) — CA connector endpoints, certificate issuance/import/revocation
90
+
91
+ ## License
92
+
93
+ Apache-2.0