@robinmordasiewicz/f5xc-api-mcp 3.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.
- package/CHANGELOG.md +74 -0
- package/README.md +234 -0
- package/dist/auth/credential-manager.d.ts +116 -0
- package/dist/auth/credential-manager.d.ts.map +1 -0
- package/dist/auth/credential-manager.js +208 -0
- package/dist/auth/credential-manager.js.map +1 -0
- package/dist/auth/http-client.d.ts +81 -0
- package/dist/auth/http-client.d.ts.map +1 -0
- package/dist/auth/http-client.js +197 -0
- package/dist/auth/http-client.js.map +1 -0
- package/dist/auth/index.d.ts +8 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +6 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/generator/index.d.ts +7 -0
- package/dist/generator/index.d.ts.map +1 -0
- package/dist/generator/index.js +7 -0
- package/dist/generator/index.js.map +1 -0
- package/dist/generator/naming/acronyms.d.ts +81 -0
- package/dist/generator/naming/acronyms.d.ts.map +1 -0
- package/dist/generator/naming/acronyms.js +253 -0
- package/dist/generator/naming/acronyms.js.map +1 -0
- package/dist/generator/naming/index.d.ts +6 -0
- package/dist/generator/naming/index.d.ts.map +1 -0
- package/dist/generator/naming/index.js +6 -0
- package/dist/generator/naming/index.js.map +1 -0
- package/dist/generator/naming/volterra-mapping.d.ts +102 -0
- package/dist/generator/naming/volterra-mapping.d.ts.map +1 -0
- package/dist/generator/naming/volterra-mapping.js +259 -0
- package/dist/generator/naming/volterra-mapping.js.map +1 -0
- package/dist/generator/openapi-parser.d.ts +339 -0
- package/dist/generator/openapi-parser.d.ts.map +1 -0
- package/dist/generator/openapi-parser.js +463 -0
- package/dist/generator/openapi-parser.js.map +1 -0
- package/dist/generator/tool-generator.d.ts +74 -0
- package/dist/generator/tool-generator.d.ts.map +1 -0
- package/dist/generator/tool-generator.js +387 -0
- package/dist/generator/tool-generator.js.map +1 -0
- package/dist/generator/transformers/index.d.ts +7 -0
- package/dist/generator/transformers/index.d.ts.map +1 -0
- package/dist/generator/transformers/index.js +7 -0
- package/dist/generator/transformers/index.js.map +1 -0
- package/dist/generator/transformers/normalize-examples.d.ts +48 -0
- package/dist/generator/transformers/normalize-examples.d.ts.map +1 -0
- package/dist/generator/transformers/normalize-examples.js +66 -0
- package/dist/generator/transformers/normalize-examples.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +70 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/index.d.ts +6 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +5 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/workflows.d.ts +59 -0
- package/dist/prompts/workflows.d.ts.map +1 -0
- package/dist/prompts/workflows.js +585 -0
- package/dist/prompts/workflows.js.map +1 -0
- package/dist/resources/handlers.d.ts +72 -0
- package/dist/resources/handlers.d.ts.map +1 -0
- package/dist/resources/handlers.js +279 -0
- package/dist/resources/handlers.js.map +1 -0
- package/dist/resources/index.d.ts +8 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +6 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/templates.d.ts +86 -0
- package/dist/resources/templates.d.ts.map +1 -0
- package/dist/resources/templates.js +248 -0
- package/dist/resources/templates.js.map +1 -0
- package/dist/server.d.ts +78 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +426 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/discovery/consolidate.d.ts +97 -0
- package/dist/tools/discovery/consolidate.d.ts.map +1 -0
- package/dist/tools/discovery/consolidate.js +200 -0
- package/dist/tools/discovery/consolidate.js.map +1 -0
- package/dist/tools/discovery/describe.d.ts +132 -0
- package/dist/tools/discovery/describe.d.ts.map +1 -0
- package/dist/tools/discovery/describe.js +206 -0
- package/dist/tools/discovery/describe.js.map +1 -0
- package/dist/tools/discovery/execute.d.ts +98 -0
- package/dist/tools/discovery/execute.d.ts.map +1 -0
- package/dist/tools/discovery/execute.js +251 -0
- package/dist/tools/discovery/execute.js.map +1 -0
- package/dist/tools/discovery/index-loader.d.ts +28 -0
- package/dist/tools/discovery/index-loader.d.ts.map +1 -0
- package/dist/tools/discovery/index-loader.js +69 -0
- package/dist/tools/discovery/index-loader.js.map +1 -0
- package/dist/tools/discovery/index.d.ts +185 -0
- package/dist/tools/discovery/index.d.ts.map +1 -0
- package/dist/tools/discovery/index.js +177 -0
- package/dist/tools/discovery/index.js.map +1 -0
- package/dist/tools/discovery/search.d.ts +41 -0
- package/dist/tools/discovery/search.d.ts.map +1 -0
- package/dist/tools/discovery/search.js +155 -0
- package/dist/tools/discovery/search.js.map +1 -0
- package/dist/tools/discovery/types.d.ts +70 -0
- package/dist/tools/discovery/types.d.ts.map +1 -0
- package/dist/tools/discovery/types.js +9 -0
- package/dist/tools/discovery/types.js.map +1 -0
- package/dist/tools/generated/ai_intelligence/index.d.ts +8 -0
- package/dist/tools/generated/ai_intelligence/index.d.ts.map +1 -0
- package/dist/tools/generated/ai_intelligence/index.js +282 -0
- package/dist/tools/generated/ai_intelligence/index.js.map +1 -0
- package/dist/tools/generated/api_security/index.d.ts +8 -0
- package/dist/tools/generated/api_security/index.d.ts.map +1 -0
- package/dist/tools/generated/api_security/index.js +1852 -0
- package/dist/tools/generated/api_security/index.js.map +1 -0
- package/dist/tools/generated/applications/index.d.ts +8 -0
- package/dist/tools/generated/applications/index.d.ts.map +1 -0
- package/dist/tools/generated/applications/index.js +1589 -0
- package/dist/tools/generated/applications/index.js.map +1 -0
- package/dist/tools/generated/bigip/index.d.ts +8 -0
- package/dist/tools/generated/bigip/index.d.ts.map +1 -0
- package/dist/tools/generated/bigip/index.js +1173 -0
- package/dist/tools/generated/bigip/index.js.map +1 -0
- package/dist/tools/generated/billing/index.d.ts +8 -0
- package/dist/tools/generated/billing/index.d.ts.map +1 -0
- package/dist/tools/generated/billing/index.js +759 -0
- package/dist/tools/generated/billing/index.js.map +1 -0
- package/dist/tools/generated/cdn/index.d.ts +8 -0
- package/dist/tools/generated/cdn/index.d.ts.map +1 -0
- package/dist/tools/generated/cdn/index.js +841 -0
- package/dist/tools/generated/cdn/index.js.map +1 -0
- package/dist/tools/generated/config/index.d.ts +8 -0
- package/dist/tools/generated/config/index.d.ts.map +1 -0
- package/dist/tools/generated/config/index.js +316 -0
- package/dist/tools/generated/config/index.js.map +1 -0
- package/dist/tools/generated/identity/index.d.ts +8 -0
- package/dist/tools/generated/identity/index.d.ts.map +1 -0
- package/dist/tools/generated/identity/index.js +5371 -0
- package/dist/tools/generated/identity/index.js.map +1 -0
- package/dist/tools/generated/infrastructure/index.d.ts +8 -0
- package/dist/tools/generated/infrastructure/index.d.ts.map +1 -0
- package/dist/tools/generated/infrastructure/index.js +5342 -0
- package/dist/tools/generated/infrastructure/index.js.map +1 -0
- package/dist/tools/generated/infrastructure_protection/index.d.ts +8 -0
- package/dist/tools/generated/infrastructure_protection/index.d.ts.map +1 -0
- package/dist/tools/generated/infrastructure_protection/index.js +2919 -0
- package/dist/tools/generated/infrastructure_protection/index.js.map +1 -0
- package/dist/tools/generated/integrations/index.d.ts +8 -0
- package/dist/tools/generated/integrations/index.d.ts.map +1 -0
- package/dist/tools/generated/integrations/index.js +1995 -0
- package/dist/tools/generated/integrations/index.js.map +1 -0
- package/dist/tools/generated/load_balancer/index.d.ts +8 -0
- package/dist/tools/generated/load_balancer/index.d.ts.map +1 -0
- package/dist/tools/generated/load_balancer/index.js +2269 -0
- package/dist/tools/generated/load_balancer/index.js.map +1 -0
- package/dist/tools/generated/networking/index.d.ts +8 -0
- package/dist/tools/generated/networking/index.d.ts.map +1 -0
- package/dist/tools/generated/networking/index.js +11289 -0
- package/dist/tools/generated/networking/index.js.map +1 -0
- package/dist/tools/generated/nginx/index.d.ts +8 -0
- package/dist/tools/generated/nginx/index.d.ts.map +1 -0
- package/dist/tools/generated/nginx/index.js +680 -0
- package/dist/tools/generated/nginx/index.js.map +1 -0
- package/dist/tools/generated/observability/index.d.ts +8 -0
- package/dist/tools/generated/observability/index.d.ts.map +1 -0
- package/dist/tools/generated/observability/index.js +6140 -0
- package/dist/tools/generated/observability/index.js.map +1 -0
- package/dist/tools/generated/operations/index.d.ts +8 -0
- package/dist/tools/generated/operations/index.d.ts.map +1 -0
- package/dist/tools/generated/operations/index.js +1759 -0
- package/dist/tools/generated/operations/index.js.map +1 -0
- package/dist/tools/generated/security/index.d.ts +8 -0
- package/dist/tools/generated/security/index.d.ts.map +1 -0
- package/dist/tools/generated/security/index.js +9111 -0
- package/dist/tools/generated/security/index.js.map +1 -0
- package/dist/tools/generated/service_mesh/index.d.ts +8 -0
- package/dist/tools/generated/service_mesh/index.d.ts.map +1 -0
- package/dist/tools/generated/service_mesh/index.js +1628 -0
- package/dist/tools/generated/service_mesh/index.js.map +1 -0
- package/dist/tools/generated/shape_security/index.d.ts +8 -0
- package/dist/tools/generated/shape_security/index.d.ts.map +1 -0
- package/dist/tools/generated/shape_security/index.js +4121 -0
- package/dist/tools/generated/shape_security/index.js.map +1 -0
- package/dist/tools/generated/subscriptions/index.d.ts +8 -0
- package/dist/tools/generated/subscriptions/index.d.ts.map +1 -0
- package/dist/tools/generated/subscriptions/index.js +778 -0
- package/dist/tools/generated/subscriptions/index.js.map +1 -0
- package/dist/tools/generated/tenant_management/index.d.ts +8 -0
- package/dist/tools/generated/tenant_management/index.d.ts.map +1 -0
- package/dist/tools/generated/tenant_management/index.js +2292 -0
- package/dist/tools/generated/tenant_management/index.js.map +1 -0
- package/dist/tools/generated/vpn/index.d.ts +8 -0
- package/dist/tools/generated/vpn/index.d.ts.map +1 -0
- package/dist/tools/generated/vpn/index.js +1183 -0
- package/dist/tools/generated/vpn/index.js.map +1 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +6 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/registry.d.ts +27 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +83 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/utils/error-handling.d.ts +109 -0
- package/dist/utils/error-handling.d.ts.map +1 -0
- package/dist/utils/error-handling.js +239 -0
- package/dist/utils/error-handling.js.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logging.d.ts +75 -0
- package/dist/utils/logging.d.ts.map +1 -0
- package/dist/utils/logging.js +131 -0
- package/dist/utils/logging.js.map +1 -0
- package/manifest.json +143 -0
- package/package.json +95 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Breaking Changes
|
|
11
|
+
|
|
12
|
+
- **BREAKING**: Package name changed from `f5xc-api-mcp` to `@robinmordasiewicz/f5xc-api-mcp` for scoped npm packaging
|
|
13
|
+
- Installation command changes: `npm install -g @robinmordasiewicz/f5xc-api-mcp`
|
|
14
|
+
- npx command changes: `npx @robinmordasiewicz/f5xc-api-mcp`
|
|
15
|
+
- Binary name remains unchanged: `f5xc-api-mcp`
|
|
16
|
+
- This aligns with organizational package naming convention for consistency
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Initial release of F5 Distributed Cloud API MCP Server
|
|
21
|
+
- 270+ API tools auto-generated from OpenAPI specifications
|
|
22
|
+
- Dual-mode operation: documentation mode (unauthenticated) and execution mode (authenticated)
|
|
23
|
+
- API token authentication support
|
|
24
|
+
- P12 certificate (mTLS) authentication support
|
|
25
|
+
- Automatic URL normalization for various F5XC URL formats
|
|
26
|
+
- f5xcctl CLI command equivalents in every response
|
|
27
|
+
- Terraform HCL examples in every response
|
|
28
|
+
- MCP Resources for F5XC configuration objects via URI scheme
|
|
29
|
+
- Workflow prompts for common operations:
|
|
30
|
+
- `deploy-http-loadbalancer` - Deploy HTTP Load Balancer with origin pool
|
|
31
|
+
- `configure-waf` - Configure Web Application Firewall
|
|
32
|
+
- `create-multicloud-site` - Deploy F5XC site in AWS/Azure/GCP
|
|
33
|
+
- `generate-terraform` - Export resources as Terraform HCL
|
|
34
|
+
- Subscription tier awareness (NO_TIER, STANDARD, ADVANCED)
|
|
35
|
+
- Comprehensive documentation site with MkDocs
|
|
36
|
+
- Docker container distribution via GHCR
|
|
37
|
+
- npm package distribution
|
|
38
|
+
- GitHub Actions CI/CD pipeline:
|
|
39
|
+
- Automated OpenAPI spec synchronization
|
|
40
|
+
- Code generation workflow
|
|
41
|
+
- Security scanning (Trivy, TruffleHog, CodeQL)
|
|
42
|
+
- Multi-platform Docker builds
|
|
43
|
+
- Automated npm publishing
|
|
44
|
+
- Documentation deployment to GitHub Pages
|
|
45
|
+
|
|
46
|
+
### API Domains
|
|
47
|
+
|
|
48
|
+
- `waap` - HTTP/TCP load balancers, origin pools, app firewalls, rate limiters
|
|
49
|
+
- `dns` - DNS zones, DNS load balancers, DNS LB pools
|
|
50
|
+
- `network` - Network connectors, firewalls, enhanced firewall policies
|
|
51
|
+
- `site` - AWS VPC sites, Azure VNET sites, GCP VPC sites, customer edge
|
|
52
|
+
- `appstack` - K8s clusters, virtual K8s, workloads
|
|
53
|
+
- `security` - Service policies, WAF, malicious user detection
|
|
54
|
+
- `core` - Namespaces, certificates, cloud credentials
|
|
55
|
+
|
|
56
|
+
### Technical
|
|
57
|
+
|
|
58
|
+
- TypeScript 5.x with strict mode
|
|
59
|
+
- Node.js 20+ LTS runtime
|
|
60
|
+
- @modelcontextprotocol/sdk for MCP implementation
|
|
61
|
+
- Zod for runtime validation
|
|
62
|
+
- Axios with mTLS support for HTTP client
|
|
63
|
+
- Vitest for testing framework
|
|
64
|
+
- ESLint + Prettier for code quality
|
|
65
|
+
- Material for MkDocs for documentation
|
|
66
|
+
|
|
67
|
+
## [0.1.0] - TBD
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
|
|
71
|
+
- Initial public release
|
|
72
|
+
|
|
73
|
+
[Unreleased]: https://github.com/robinmordasiewicz/f5xc-api-mcp/compare/v0.1.0...HEAD
|
|
74
|
+
[0.1.0]: https://github.com/robinmordasiewicz/f5xc-api-mcp/releases/tag/v0.1.0
|
package/README.md
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# F5 Distributed Cloud API MCP Server
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@robinmordasiewicz/f5xc-api-mcp)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
An MCP (Model Context Protocol) server that exposes F5 Distributed Cloud APIs to AI assistants.
|
|
7
|
+
Enables natural language interaction with F5XC infrastructure through Claude, VS Code, and
|
|
8
|
+
other MCP-compatible tools.
|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- **1500+ API Tools** - Complete coverage of F5XC API operations across 22 domains
|
|
13
|
+
- **Dual-Mode Operation** - Works without authentication (documentation mode) AND with authentication (execution mode)
|
|
14
|
+
- **f5xcctl Integration** - Every response includes equivalent CLI commands
|
|
15
|
+
- **Terraform Examples** - Every response includes Terraform HCL examples
|
|
16
|
+
- **Multiple Auth Methods** - API token and P12 certificate (mTLS) support
|
|
17
|
+
- **URL Normalization** - Automatically handles various F5XC URL formats
|
|
18
|
+
- **Pre-enriched Specs** - Uses optimized OpenAPI 3.0.3 specifications from upstream
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
### Using npx (Recommended)
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @robinmordasiewicz/f5xc-api-mcp
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Using npm
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install -g @robinmordasiewicz/f5xc-api-mcp
|
|
32
|
+
f5xc-api-mcp
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Using Docker
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
docker run -i --rm ghcr.io/robinmordasiewicz/f5xc-api-mcp
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Configuration
|
|
42
|
+
|
|
43
|
+
### Claude Desktop
|
|
44
|
+
|
|
45
|
+
Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"mcpServers": {
|
|
50
|
+
"f5xc-api": {
|
|
51
|
+
"command": "npx",
|
|
52
|
+
"args": ["@robinmordasiewicz/f5xc-api-mcp"],
|
|
53
|
+
"env": {
|
|
54
|
+
"F5XC_API_URL": "https://your-tenant.console.ves.volterra.io",
|
|
55
|
+
"F5XC_API_TOKEN": "your-api-token"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Claude Code CLI
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
claude mcp add f5xc-api -- npx @robinmordasiewicz/f5xc-api-mcp
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### VS Code (with Cline/Continue)
|
|
69
|
+
|
|
70
|
+
Add to your MCP settings:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"mcpServers": {
|
|
75
|
+
"f5xc-api": {
|
|
76
|
+
"command": "npx",
|
|
77
|
+
"args": ["@robinmordasiewicz/f5xc-api-mcp"]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Environment Variables
|
|
84
|
+
|
|
85
|
+
| Variable | Required | Description |
|
|
86
|
+
|----------|----------|-------------|
|
|
87
|
+
| `F5XC_API_URL` | For execution | Tenant URL (auto-normalized) |
|
|
88
|
+
| `F5XC_API_TOKEN` | For token auth | API token from XC Console |
|
|
89
|
+
| `F5XC_P12_FILE` | For cert auth | Path to P12 certificate file |
|
|
90
|
+
| `F5XC_P12_PASSWORD` | For cert auth | Password for P12 certificate |
|
|
91
|
+
| `LOG_LEVEL` | No | Logging verbosity (debug, info, warn, error) |
|
|
92
|
+
|
|
93
|
+
## Dual-Mode Operation
|
|
94
|
+
|
|
95
|
+
### Documentation Mode (No Authentication)
|
|
96
|
+
|
|
97
|
+
When no credentials are provided, the server provides:
|
|
98
|
+
|
|
99
|
+
- OpenAPI specification documentation
|
|
100
|
+
- API operation explanations
|
|
101
|
+
- Parameter descriptions and validation
|
|
102
|
+
- f5xcctl command equivalents
|
|
103
|
+
- Terraform HCL examples
|
|
104
|
+
- JSON request templates
|
|
105
|
+
|
|
106
|
+
This mode is ideal for users who authenticate via f5xcctl or Terraform.
|
|
107
|
+
|
|
108
|
+
### Execution Mode (With Authentication)
|
|
109
|
+
|
|
110
|
+
When credentials are provided, the server additionally:
|
|
111
|
+
|
|
112
|
+
- Executes actual API calls against your tenant
|
|
113
|
+
- Lists and retrieves resources
|
|
114
|
+
- Creates, updates, and deletes configurations
|
|
115
|
+
- Returns real-time resource status
|
|
116
|
+
|
|
117
|
+
## Available Tools
|
|
118
|
+
|
|
119
|
+
Tools follow the naming pattern: `f5xc-api-{domain}-{resource}-{operation}`
|
|
120
|
+
|
|
121
|
+
### Domains (22 Total)
|
|
122
|
+
|
|
123
|
+
| Domain | Description |
|
|
124
|
+
|--------|-------------|
|
|
125
|
+
| `load_balancer` | HTTP/TCP/UDP load balancers, origin pools, forward proxy |
|
|
126
|
+
| `networking` | Network connectors, firewalls, interfaces, policies |
|
|
127
|
+
| `security` | Service policies, WAF, malicious user mitigation |
|
|
128
|
+
| `infrastructure` | AWS/Azure/GCP VPC sites, customer edge sites |
|
|
129
|
+
| `api_security` | API discovery, protection, definitions |
|
|
130
|
+
| `cdn` | CDN load balancers, cache rules |
|
|
131
|
+
| `dns` | DNS zones, DNS load balancers, DNS pools |
|
|
132
|
+
| `identity` | Authentication, users, roles, RBAC |
|
|
133
|
+
| `observability` | Alerts, logs, synthetic monitors |
|
|
134
|
+
| `config` | Namespaces, certificates, credentials |
|
|
135
|
+
| `nginx` | NGINX One instances, servers, service discovery |
|
|
136
|
+
| `bigip` | BIG-IP virtual servers, iRules, APM |
|
|
137
|
+
| `vpn` | VPN tunnels, IKE profiles |
|
|
138
|
+
| `service_mesh` | Virtual K8s, workloads, K8s clusters |
|
|
139
|
+
| `shape_security` | Bot defense, client-side defense |
|
|
140
|
+
| `tenant_management` | Multi-tenant management, profiles |
|
|
141
|
+
| `billing` | Invoices, payment methods, subscriptions |
|
|
142
|
+
| `integrations` | Third-party apps, ticket systems |
|
|
143
|
+
| `operations` | Debug, DHCP, ping, traceroute |
|
|
144
|
+
| `ai_intelligence` | AI assistant, BFDP |
|
|
145
|
+
| `infrastructure_protection` | DDoS protection, firewall rules |
|
|
146
|
+
| `subscriptions` | Feature subscriptions, plans |
|
|
147
|
+
|
|
148
|
+
### Example Tools
|
|
149
|
+
|
|
150
|
+
- `f5xc-api-loadbalancer-http-loadbalancer-create`
|
|
151
|
+
- `f5xc-api-loadbalancer-origin-pool-list`
|
|
152
|
+
- `f5xc-api-networking-network-interface-get`
|
|
153
|
+
- `f5xc-api-server-info`
|
|
154
|
+
|
|
155
|
+
## Workflow Prompts
|
|
156
|
+
|
|
157
|
+
The server includes guided workflow prompts:
|
|
158
|
+
|
|
159
|
+
- `deploy-http-loadbalancer` - Deploy HTTP LB with origin pool
|
|
160
|
+
- `configure-waf` - Configure Web Application Firewall
|
|
161
|
+
- `create-multicloud-site` - Deploy F5XC site in AWS/Azure/GCP
|
|
162
|
+
- `generate-terraform` - Export resources as Terraform
|
|
163
|
+
|
|
164
|
+
## Resource URIs
|
|
165
|
+
|
|
166
|
+
Access F5XC resources via URI scheme:
|
|
167
|
+
|
|
168
|
+
```text
|
|
169
|
+
f5xc://{tenant}/{namespace}/{resource-type}/{name}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Examples:
|
|
173
|
+
|
|
174
|
+
- `f5xc://mytenant/production/http_loadbalancer/my-app`
|
|
175
|
+
- `f5xc://mytenant/system/namespace/default`
|
|
176
|
+
|
|
177
|
+
## URL Normalization
|
|
178
|
+
|
|
179
|
+
The server automatically normalizes various URL formats:
|
|
180
|
+
|
|
181
|
+
| User Input | Normalized |
|
|
182
|
+
|------------|------------|
|
|
183
|
+
| `tenant.volterra.us` | `tenant.console.ves.volterra.io/api` |
|
|
184
|
+
| `tenant.console.ves.volterra.io` | `tenant.console.ves.volterra.io/api` |
|
|
185
|
+
| `https://tenant.volterra.us/` | `https://tenant.console.ves.volterra.io/api` |
|
|
186
|
+
|
|
187
|
+
## Development
|
|
188
|
+
|
|
189
|
+
### Prerequisites
|
|
190
|
+
|
|
191
|
+
- Node.js 20+
|
|
192
|
+
- npm 9+
|
|
193
|
+
|
|
194
|
+
### Setup
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
git clone https://github.com/robinmordasiewicz/f5xc-api-mcp.git
|
|
198
|
+
cd f5xc-api-mcp
|
|
199
|
+
npm install
|
|
200
|
+
npm run build
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Testing
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
npm test # Run tests
|
|
207
|
+
npm run test:watch # Watch mode
|
|
208
|
+
npm run test:coverage # Coverage report
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Linting
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
npm run lint # Check linting
|
|
215
|
+
npm run lint:fix # Fix linting issues
|
|
216
|
+
npm run format # Format code
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Documentation
|
|
220
|
+
|
|
221
|
+
Full documentation is available at: <https://robinmordasiewicz.github.io/f5xc-api-mcp>
|
|
222
|
+
|
|
223
|
+
## Contributing
|
|
224
|
+
|
|
225
|
+
Contributions are welcome! Please read our contributing guidelines and submit pull requests.
|
|
226
|
+
|
|
227
|
+
## License
|
|
228
|
+
|
|
229
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
230
|
+
|
|
231
|
+
## Support
|
|
232
|
+
|
|
233
|
+
- [GitHub Issues](https://github.com/robinmordasiewicz/f5xc-api-mcp/issues)
|
|
234
|
+
- [GitHub Discussions](https://github.com/robinmordasiewicz/f5xc-api-mcp/discussions)
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Credential Manager for F5 Distributed Cloud API
|
|
3
|
+
*
|
|
4
|
+
* Handles authentication configuration and URL normalization.
|
|
5
|
+
* Supports dual-mode operation:
|
|
6
|
+
* - Documentation mode: No credentials required
|
|
7
|
+
* - Execution mode: API token or P12 certificate authentication
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Authentication modes supported by the server
|
|
11
|
+
*/
|
|
12
|
+
export declare enum AuthMode {
|
|
13
|
+
/** No authentication - documentation mode only */
|
|
14
|
+
NONE = "none",
|
|
15
|
+
/** API token authentication */
|
|
16
|
+
TOKEN = "token",
|
|
17
|
+
/** P12 certificate authentication (mTLS) */
|
|
18
|
+
CERTIFICATE = "certificate"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Environment variable names for authentication
|
|
22
|
+
*/
|
|
23
|
+
export declare const AUTH_ENV_VARS: {
|
|
24
|
+
readonly API_URL: "F5XC_API_URL";
|
|
25
|
+
readonly API_TOKEN: "F5XC_API_TOKEN";
|
|
26
|
+
readonly P12_FILE: "F5XC_P12_FILE";
|
|
27
|
+
readonly P12_PASSWORD: "F5XC_P12_PASSWORD";
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Credential configuration for API access
|
|
31
|
+
*/
|
|
32
|
+
export interface Credentials {
|
|
33
|
+
/** Authentication mode */
|
|
34
|
+
mode: AuthMode;
|
|
35
|
+
/** Normalized API URL */
|
|
36
|
+
apiUrl: string | null;
|
|
37
|
+
/** API token (for token auth) */
|
|
38
|
+
token: string | null;
|
|
39
|
+
/** P12 certificate buffer (for cert auth) */
|
|
40
|
+
p12Certificate: Buffer | null;
|
|
41
|
+
/** P12 certificate password */
|
|
42
|
+
p12Password: string | null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Normalize F5XC tenant URL to standard API endpoint format
|
|
46
|
+
*
|
|
47
|
+
* Handles various input formats:
|
|
48
|
+
* - tenant.volterra.us -> tenant.console.ves.volterra.io/api
|
|
49
|
+
* - tenant.staging.volterra.us -> tenant.staging.console.ves.volterra.io/api
|
|
50
|
+
* - tenant.console.ves.volterra.io -> tenant.console.ves.volterra.io/api
|
|
51
|
+
* - Any of the above with trailing slashes or /api suffix
|
|
52
|
+
*
|
|
53
|
+
* @param input - Raw URL from user configuration
|
|
54
|
+
* @returns Normalized API URL
|
|
55
|
+
*/
|
|
56
|
+
export declare function normalizeApiUrl(input: string): string;
|
|
57
|
+
/**
|
|
58
|
+
* Extract tenant name from a normalized URL
|
|
59
|
+
*
|
|
60
|
+
* @param url - Normalized API URL
|
|
61
|
+
* @returns Tenant name or null if not parseable
|
|
62
|
+
*/
|
|
63
|
+
export declare function extractTenantFromUrl(url: string): string | null;
|
|
64
|
+
/**
|
|
65
|
+
* Credential Manager
|
|
66
|
+
*
|
|
67
|
+
* Manages authentication credentials for F5 Distributed Cloud API.
|
|
68
|
+
* Reads configuration from environment variables and provides
|
|
69
|
+
* normalized credentials for API access.
|
|
70
|
+
*/
|
|
71
|
+
export declare class CredentialManager {
|
|
72
|
+
private credentials;
|
|
73
|
+
constructor();
|
|
74
|
+
/**
|
|
75
|
+
* Load credentials from environment variables
|
|
76
|
+
*/
|
|
77
|
+
private loadCredentials;
|
|
78
|
+
/**
|
|
79
|
+
* Get the current authentication mode
|
|
80
|
+
*/
|
|
81
|
+
getAuthMode(): AuthMode;
|
|
82
|
+
/**
|
|
83
|
+
* Check if the server is in authenticated mode
|
|
84
|
+
*/
|
|
85
|
+
isAuthenticated(): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Get the normalized API URL
|
|
88
|
+
*/
|
|
89
|
+
getApiUrl(): string | null;
|
|
90
|
+
/**
|
|
91
|
+
* Get the tenant name
|
|
92
|
+
*/
|
|
93
|
+
getTenant(): string | null;
|
|
94
|
+
/**
|
|
95
|
+
* Get API token (for token authentication)
|
|
96
|
+
*/
|
|
97
|
+
getToken(): string | null;
|
|
98
|
+
/**
|
|
99
|
+
* Get P12 certificate buffer (for certificate authentication)
|
|
100
|
+
*/
|
|
101
|
+
getP12Certificate(): Buffer | null;
|
|
102
|
+
/**
|
|
103
|
+
* Get P12 certificate password
|
|
104
|
+
*/
|
|
105
|
+
getP12Password(): string | null;
|
|
106
|
+
/**
|
|
107
|
+
* Get full credentials object
|
|
108
|
+
*/
|
|
109
|
+
getCredentials(): Readonly<Credentials>;
|
|
110
|
+
/**
|
|
111
|
+
* Reload credentials from environment
|
|
112
|
+
* Useful for testing or when credentials change
|
|
113
|
+
*/
|
|
114
|
+
reload(): void;
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=credential-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-manager.d.ts","sourceRoot":"","sources":["../../src/auth/credential-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;GAEG;AACH,oBAAY,QAAQ;IAClB,kDAAkD;IAClD,IAAI,SAAS;IACb,+BAA+B;IAC/B,KAAK,UAAU;IACf,4CAA4C;IAC5C,WAAW,gBAAgB;CAC5B;AAED;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,0BAA0B;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,yBAAyB;IACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,iCAAiC;IACjC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,6CAA6C;IAC7C,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,+BAA+B;IAC/B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAcD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAsBrD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG/D;AAED;;;;;;GAMG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,WAAW,CAAc;;IAMjC;;OAEG;IACH,OAAO,CAAC,eAAe;IAwDvB;;OAEG;IACH,WAAW,IAAI,QAAQ;IAIvB;;OAEG;IACH,eAAe,IAAI,OAAO;IAI1B;;OAEG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI;IAI1B;;OAEG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI;IAI1B;;OAEG;IACH,QAAQ,IAAI,MAAM,GAAG,IAAI;IAIzB;;OAEG;IACH,iBAAiB,IAAI,MAAM,GAAG,IAAI;IAIlC;;OAEG;IACH,cAAc,IAAI,MAAM,GAAG,IAAI;IAI/B;;OAEG;IACH,cAAc,IAAI,QAAQ,CAAC,WAAW,CAAC;IAIvC;;;OAGG;IACH,MAAM,IAAI,IAAI;CAGf"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Credential Manager for F5 Distributed Cloud API
|
|
3
|
+
*
|
|
4
|
+
* Handles authentication configuration and URL normalization.
|
|
5
|
+
* Supports dual-mode operation:
|
|
6
|
+
* - Documentation mode: No credentials required
|
|
7
|
+
* - Execution mode: API token or P12 certificate authentication
|
|
8
|
+
*/
|
|
9
|
+
import { readFileSync } from "fs";
|
|
10
|
+
import { logger } from "../utils/logging.js";
|
|
11
|
+
/**
|
|
12
|
+
* Authentication modes supported by the server
|
|
13
|
+
*/
|
|
14
|
+
export var AuthMode;
|
|
15
|
+
(function (AuthMode) {
|
|
16
|
+
/** No authentication - documentation mode only */
|
|
17
|
+
AuthMode["NONE"] = "none";
|
|
18
|
+
/** API token authentication */
|
|
19
|
+
AuthMode["TOKEN"] = "token";
|
|
20
|
+
/** P12 certificate authentication (mTLS) */
|
|
21
|
+
AuthMode["CERTIFICATE"] = "certificate";
|
|
22
|
+
})(AuthMode || (AuthMode = {}));
|
|
23
|
+
/**
|
|
24
|
+
* Environment variable names for authentication
|
|
25
|
+
*/
|
|
26
|
+
export const AUTH_ENV_VARS = {
|
|
27
|
+
API_URL: "F5XC_API_URL",
|
|
28
|
+
API_TOKEN: "F5XC_API_TOKEN",
|
|
29
|
+
P12_FILE: "F5XC_P12_FILE",
|
|
30
|
+
P12_PASSWORD: "F5XC_P12_PASSWORD",
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* URL normalization patterns
|
|
34
|
+
*/
|
|
35
|
+
const URL_PATTERNS = {
|
|
36
|
+
// Match short-form URLs: tenant.volterra.us or tenant.staging.volterra.us
|
|
37
|
+
SHORT_FORM: /^https?:\/\/([^./]+)\.(staging\.)?volterra\.us\/?/i,
|
|
38
|
+
// Match console URLs: tenant.console.ves.volterra.io
|
|
39
|
+
CONSOLE_FORM: /^https?:\/\/([^./]+)\.(staging\.)?console\.ves\.volterra\.io\/?/i,
|
|
40
|
+
// Trailing slashes and /api suffix
|
|
41
|
+
TRAILING_CLEANUP: /\/+$|\/api\/?$/gi,
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Normalize F5XC tenant URL to standard API endpoint format
|
|
45
|
+
*
|
|
46
|
+
* Handles various input formats:
|
|
47
|
+
* - tenant.volterra.us -> tenant.console.ves.volterra.io/api
|
|
48
|
+
* - tenant.staging.volterra.us -> tenant.staging.console.ves.volterra.io/api
|
|
49
|
+
* - tenant.console.ves.volterra.io -> tenant.console.ves.volterra.io/api
|
|
50
|
+
* - Any of the above with trailing slashes or /api suffix
|
|
51
|
+
*
|
|
52
|
+
* @param input - Raw URL from user configuration
|
|
53
|
+
* @returns Normalized API URL
|
|
54
|
+
*/
|
|
55
|
+
export function normalizeApiUrl(input) {
|
|
56
|
+
// Remove trailing slashes and existing /api suffix
|
|
57
|
+
let url = input.replace(URL_PATTERNS.TRAILING_CLEANUP, "");
|
|
58
|
+
// Handle short-form URLs (tenant.volterra.us)
|
|
59
|
+
const shortFormMatch = url.match(URL_PATTERNS.SHORT_FORM);
|
|
60
|
+
if (shortFormMatch) {
|
|
61
|
+
const tenant = shortFormMatch[1];
|
|
62
|
+
const staging = shortFormMatch[2] ?? "";
|
|
63
|
+
url = `https://${tenant}.${staging}console.ves.volterra.io`;
|
|
64
|
+
}
|
|
65
|
+
// Handle console URLs - ensure https
|
|
66
|
+
const consoleMatch = url.match(URL_PATTERNS.CONSOLE_FORM);
|
|
67
|
+
if (consoleMatch) {
|
|
68
|
+
const tenant = consoleMatch[1];
|
|
69
|
+
const staging = consoleMatch[2] ?? "";
|
|
70
|
+
url = `https://${tenant}.${staging}console.ves.volterra.io`;
|
|
71
|
+
}
|
|
72
|
+
// Ensure /api suffix
|
|
73
|
+
return `${url}/api`;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Extract tenant name from a normalized URL
|
|
77
|
+
*
|
|
78
|
+
* @param url - Normalized API URL
|
|
79
|
+
* @returns Tenant name or null if not parseable
|
|
80
|
+
*/
|
|
81
|
+
export function extractTenantFromUrl(url) {
|
|
82
|
+
const match = url.match(/https?:\/\/([^./]+)\./);
|
|
83
|
+
return match?.[1] ?? null;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Credential Manager
|
|
87
|
+
*
|
|
88
|
+
* Manages authentication credentials for F5 Distributed Cloud API.
|
|
89
|
+
* Reads configuration from environment variables and provides
|
|
90
|
+
* normalized credentials for API access.
|
|
91
|
+
*/
|
|
92
|
+
export class CredentialManager {
|
|
93
|
+
credentials;
|
|
94
|
+
constructor() {
|
|
95
|
+
this.credentials = this.loadCredentials();
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Load credentials from environment variables
|
|
99
|
+
*/
|
|
100
|
+
loadCredentials() {
|
|
101
|
+
const apiUrl = process.env[AUTH_ENV_VARS.API_URL];
|
|
102
|
+
const token = process.env[AUTH_ENV_VARS.API_TOKEN];
|
|
103
|
+
const p12File = process.env[AUTH_ENV_VARS.P12_FILE];
|
|
104
|
+
const p12Password = process.env[AUTH_ENV_VARS.P12_PASSWORD];
|
|
105
|
+
// Determine authentication mode
|
|
106
|
+
let mode = AuthMode.NONE;
|
|
107
|
+
let normalizedUrl = null;
|
|
108
|
+
let p12Certificate = null;
|
|
109
|
+
if (apiUrl) {
|
|
110
|
+
normalizedUrl = normalizeApiUrl(apiUrl);
|
|
111
|
+
if (p12File) {
|
|
112
|
+
// Certificate authentication takes precedence
|
|
113
|
+
mode = AuthMode.CERTIFICATE;
|
|
114
|
+
try {
|
|
115
|
+
p12Certificate = readFileSync(p12File);
|
|
116
|
+
logger.info("Loaded P12 certificate", { file: p12File });
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
logger.error("Failed to load P12 certificate", {
|
|
120
|
+
file: p12File,
|
|
121
|
+
error: error instanceof Error ? error.message : String(error),
|
|
122
|
+
});
|
|
123
|
+
// Fall back to token auth if certificate load fails
|
|
124
|
+
if (token) {
|
|
125
|
+
mode = AuthMode.TOKEN;
|
|
126
|
+
logger.info("Falling back to token authentication");
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
mode = AuthMode.NONE;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
else if (token) {
|
|
134
|
+
mode = AuthMode.TOKEN;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
const tenant = normalizedUrl ? extractTenantFromUrl(normalizedUrl) : null;
|
|
138
|
+
logger.info("Credentials loaded", {
|
|
139
|
+
mode,
|
|
140
|
+
tenant,
|
|
141
|
+
hasToken: Boolean(token),
|
|
142
|
+
hasP12: Boolean(p12Certificate),
|
|
143
|
+
});
|
|
144
|
+
return {
|
|
145
|
+
mode,
|
|
146
|
+
apiUrl: normalizedUrl,
|
|
147
|
+
token: token ?? null,
|
|
148
|
+
p12Certificate,
|
|
149
|
+
p12Password: p12Password ?? null,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Get the current authentication mode
|
|
154
|
+
*/
|
|
155
|
+
getAuthMode() {
|
|
156
|
+
return this.credentials.mode;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Check if the server is in authenticated mode
|
|
160
|
+
*/
|
|
161
|
+
isAuthenticated() {
|
|
162
|
+
return this.credentials.mode !== AuthMode.NONE;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Get the normalized API URL
|
|
166
|
+
*/
|
|
167
|
+
getApiUrl() {
|
|
168
|
+
return this.credentials.apiUrl;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Get the tenant name
|
|
172
|
+
*/
|
|
173
|
+
getTenant() {
|
|
174
|
+
return this.credentials.apiUrl ? extractTenantFromUrl(this.credentials.apiUrl) : null;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Get API token (for token authentication)
|
|
178
|
+
*/
|
|
179
|
+
getToken() {
|
|
180
|
+
return this.credentials.token;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Get P12 certificate buffer (for certificate authentication)
|
|
184
|
+
*/
|
|
185
|
+
getP12Certificate() {
|
|
186
|
+
return this.credentials.p12Certificate;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Get P12 certificate password
|
|
190
|
+
*/
|
|
191
|
+
getP12Password() {
|
|
192
|
+
return this.credentials.p12Password;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Get full credentials object
|
|
196
|
+
*/
|
|
197
|
+
getCredentials() {
|
|
198
|
+
return Object.freeze({ ...this.credentials });
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Reload credentials from environment
|
|
202
|
+
* Useful for testing or when credentials change
|
|
203
|
+
*/
|
|
204
|
+
reload() {
|
|
205
|
+
this.credentials = this.loadCredentials();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=credential-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-manager.js","sourceRoot":"","sources":["../../src/auth/credential-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAN,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,kDAAkD;IAClD,yBAAa,CAAA;IACb,+BAA+B;IAC/B,2BAAe,CAAA;IACf,4CAA4C;IAC5C,uCAA2B,CAAA;AAC7B,CAAC,EAPW,QAAQ,KAAR,QAAQ,QAOnB;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE,eAAe;IACzB,YAAY,EAAE,mBAAmB;CACzB,CAAC;AAkBX;;GAEG;AACH,MAAM,YAAY,GAAG;IACnB,0EAA0E;IAC1E,UAAU,EAAE,oDAAoD;IAChE,qDAAqD;IACrD,YAAY,EAAE,kEAAkE;IAChF,mCAAmC;IACnC,gBAAgB,EAAE,kBAAkB;CACrC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,mDAAmD;IACnD,IAAI,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC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