This Kotlin interface module defines the contract for the Wenrix-Amadeus middleware service, which acts as a secure proxy between Wenrix systems and the Amadeus GDS (Global Distribution System).
The middleware service provides several critical functions:
- Request validation and filtering
- PNR locator mapping (obfuscated ↔ actual)
- Credential management and injection
- Session handling and encryption/decryption
- PII (Personally Identifiable Information) filtering
- Wenrix sends API request to the middleware
- Request is validated through APIFilter
- If request contains obfuscated PNR, BookingReference maps it to actual PNR
- SessionProvider decrypts any session information using dedicated encryption method
- CredentialsProvider replaces mock credentials with actual Amadeus credentials
- Final request is forwarded to Amadeus
- Middleware receives response from Amadeus
- If response contains PNR references, BookingReference maps actual PNRs to obfuscated ones
- PiiDataFilter removes/masks all PII data according to rules
- SessionProvider encrypts any session information
- Final filtered response is returned to Wenrix
src/
├── main/
│ └── kotlin/
│ └── com/
│ └── wenrix/
│ └── air/
│ └── optimization/
│ └── interface/
│ ├── APIFilter.kt # Request/response filtering
│ ├── BookingReference.kt # PNR mapping
│ ├── CredentialsProvider.kt # Credential management
│ ├── SessionProvider.kt # Session handling
│ └── PiiDataFilter.kt # PII filtering
Validates and processes all incoming requests. Ensures request format compliance and handles any necessary transformations.
Manages the mapping between obfuscated and actual PNR locators. Maintains secure storage and retrieval of booking references.
Handles the secure storage and injection of Amadeus credentials. Manages credential lifecycle and validation.
Manages session encryption/decryption using dedicated methods. Handles session creation, validation, and termination.
Implements comprehensive PII detection and filtering. Ensures no sensitive data is exposed in responses.
This project uses Gradle as its build system. To build the project:
./gradlew buildTo run the tests:
./gradlew test