Security-focused HTTP utilities library providing validation pipelines, SSL/TLS context management, and HTTP client handlers with comprehensive attack pattern detection.
<dependency>
<groupId>de.cuioss</groupId>
<artifactId>cui-http</artifactId>
</dependency>Test artifact:
<dependency>
<groupId>de.cuioss</groupId>
<artifactId>cui-http</artifactId>
<classifier>generators</classifier>
<scope>test</scope>
</dependency>-
Validation pipelines for paths, parameters, headers
-
Attack pattern detection (path traversal, parameter injection, protocol violations)
-
Configuration via
SecurityConfigurationBuilder
-
HttpHandler- Builder-based HTTP client with SSL defaults -
SecureSSLContextProvider- TLS 1.2+ SSL context -
HttpStatusFamily- RFC 7231 status classification
-
Resolves
X-Forwarded-, RFC 7239Forwarded, and NiFiX-Proxyinto one sanitized result -
Scheme / host / port / context-path / client-IP with configurable per-field precedence
-
Secure-by-default trust model (allowlist,
trustAll, trusted-proxy CIDR walk) -
Built-in sanitization via the security pipelines; transport-agnostic
Function<String,String>accessor
-
Attack databases with CVE patterns and OWASP vectors
-
Test data generators for security validation
-
JUnit 5 integration with
ArgumentsProvider
// HTTP Client
HttpHandler handler = HttpHandler.builder()
.uri("https://api.example.com/data")
.connectionTimeoutSeconds(10)
.build();
HttpClient client = handler.createHttpClient();
HttpRequest request = handler.requestBuilder()
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
// Security Validation
SecurityConfiguration config = SecurityConfiguration.builder()
.maxPathLength(2048)
.build();
URLPathValidationPipeline pipeline = new URLPathValidationPipeline(
config, new SecurityEventCounter());
String validated = pipeline.validate("/api/users/123").orElseThrow();The following standard Maven commands are provided for human contributors:
./mvnw clean install # Build and install
./mvnw test # Run tests
./mvnw -Ppre-commit clean verify # Pre-commit checks (MANDATORY)
./mvnw -Pcoverage clean verify # Coverage report|
Note
|
AI coding agents must not hard-code ./mvnw/mvn; they invoke builds via the canonical
build-executor commands documented in the "Build Commands" section of CLAUDE.md.
|