Create hub gateway example - #14
Merged
Merged
Conversation
neilmb
approved these changes
Aug 25, 2026
neilmb
left a comment
There was a problem hiding this comment.
Looks good. Is there somewhere in a Markdown doc that we should point people to look at these examples?
added 2 commits
August 25, 2026 10:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
examples: create Hub::Gateway Ruby client for FDSH Hub Services
Problem
Integrated applications need a standardized and secure way to communicate with
the Hub Service API. Previously, there was no centralized Ruby implementation
that handled the specific requirements of the Hub environment, such as mTLS
authentication, TLS 1.2 enforcement, OAuth2 token management, and flexible
routing for local testing or environment-specific service paths.
Solution
Created
examples/ruby-gateway.rbwhich implementsHub::Gateway, a comprehensiveRuby client providing the following features:
OpenSSL,supporting
HUB_CLIENT_CERT_PATHandHUB_CLIENT_KEY_PATH.with security mandates.
acquisition and management.
resolvemechanism to overridehostname resolution (similar to
curl --resolve), enabling local mocking.allowing injection of custom URLs for services like Education Enrollment.
ApiErrorandAuthenticationErrorclasses with explicit validation of SSL artifacts.
Result
This implementation serves as the foundational Ruby client for FDSH Hub
interactions. It simplifies the integration process for consumers by
abstracting connection complexity while ensuring compliance with technical
and security requirements.
Test Plan
Verified the gateway using a series of automated test scripts covering:
the client fails fast with descriptive errors if files are missing.
resolvelogic correctly maps hostnames tointended IPs for local tunnel testing.
URLs and environment variables (
HUB_*).get_education_enrollment_v1with a sampleJSON payload provided in the documentation.