You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update documentation for HTPasswd identity provider and ROSA CLI integration
README.md:
- Update tool count from 5 to 6 core tools
- Add ROSA CLI integration to features section
- Document setup_htpasswd_identity_provider tool with complete API
- Update project structure to include pkg/htpasswd/ package
CLAUDE.md:
- Add comprehensive ROSA CLI Integration section
- Document external dependencies (ocm-common)
- Explain validation flow and input compatibility
- Update architecture overview with htpasswd package
- Update test coverage information
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Copy file name to clipboardExpand all lines: CLAUDE.md
+33-3Lines changed: 33 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
This is a Model Context Protocol (MCP) server for ROSA HCP (Red Hat OpenShift Service on AWS using Hosted Control Planes) written in Go. It enables AI assistants to integrate with Red Hat Managed OpenShift services through 5 core tools: `whoami`, `get_clusters`, `get_cluster`, `create_rosa_hcp_cluster`, and `get_rosa_hcp_prerequisites_guide`.
7
+
This is a Model Context Protocol (MCP) server for ROSA HCP (Red Hat OpenShift Service on AWS using Hosted Control Planes) written in Go. It enables AI assistants to integrate with Red Hat Managed OpenShift services through 6 core tools: `whoami`, `get_clusters`, `get_cluster`, `create_rosa_hcp_cluster`, `get_rosa_hcp_prerequisites_guide`, and `setup_htpasswd_identity_provider`.
8
8
9
9
## Build and Development Commands
10
10
@@ -50,13 +50,18 @@ The codebase follows the Model Context Protocol (MCP) server pattern with clear
50
50
51
51
**MCP Layer (`pkg/mcp/`):**
52
52
-`server.go` - Main MCP server implementation, handles transport (stdio/SSE) and authentication
53
-
-`tools.go` - Implements all 4 ROSA HCP tools with parameter validation and OCM client interaction
53
+
-`tools.go` - Implements all 6 ROSA HCP tools with parameter validation and OCM client interaction
54
54
-`formatters.go` - Human-readable response formatters (not JSON) for AI assistant consumption
55
55
-`profiles.go` - Tool profile system for selective tool exposure (currently default profile only)
56
56
57
57
**OCM Integration (`pkg/ocm/`):**
58
58
-`client.go` - OCM SDK wrapper with authenticated connections and structured error handling
-`htpasswd.go` - HTPasswd identity provider setup methods using ROSA CLI patterns
61
+
62
+
**ROSA CLI Integration (`pkg/htpasswd/`):**
63
+
-`validation.go` - Username, password, and IDP name validation copied from ROSA CLI
64
+
-`validation_test.go` - Comprehensive test suite for all validation functions
60
65
61
66
**Configuration (`pkg/config/`):**
62
67
-`config.go` - TOML configuration file support with CLI flag overrides
@@ -87,14 +92,39 @@ Each tool follows this pattern:
87
92
88
93
All responses are human-readable formatted strings (not JSON) designed for AI assistant consumption. Each tool has a dedicated formatter in `formatters.go` that structures the output consistently.
89
94
95
+
### ROSA CLI Integration
96
+
97
+
The HTPasswd identity provider implementation (`setup_htpasswd_identity_provider` tool) integrates directly with ROSA CLI libraries and patterns:
98
+
99
+
**External Dependencies:**
100
+
-`github.com/openshift-online/ocm-common` v0.0.25 - Password validation and HTPasswd hashing utilities
101
+
102
+
**ROSA CLI Function Integration (~70% code reuse):**
103
+
-`UsernameValidator()` - Username format validation (no /, :, % characters)
0 commit comments