Skip to content
Jon Huang edited this page Dec 20, 2024 · 6 revisions

Welcome to the Consul API wiki!

This project is forked from the original project and contains the following changes/modifications:

  • Migrated from Apache HTTP Client 4.x to Java 11's HttpClient
    • Thread interruptions are properly handled by Java's HTTPClient
    • Consul blocking queries are properly handled
  • Migrated from GSON to Jackson
    • Jackson is a more commonly used JSON parsing library and offers better performance
  • Java best practices and secure-coding standards
  • Allow customization on the internal Java HTTP Client used by the Consul API client
    • Users can reuse existing HttpClient instances, offering better customization (such as SSLContext) and reusing of resources (such as Executors)
  • Allow specifying an SSLContext/SSLParameters when constructing the HTTP Client
    • Ciphersuites in TLS 1.2 that do not offer perfect-forward secrecy (PFS) can be disabled
  • Properly handle setting the X-Consul-Token header on all API calls
    • Consul deprecated the option to pass token as a query as this can lead to credential leakage
  • Utilize char[] for handling secret tokens to prevent String interning (pooling)
  • Removed several Consul API deprecations (i.e. Meta and Tags specifiers)
    • Added filter query option to replace Meta and Tag specifiers
  • Code cleanup (formatting and addressing several issues found with error-prone)
    • Reduce technical debt for easier maintenance in the future
Clone this wiki locally