Skip to content

Repository files navigation

Wenrix Relay Interface Module

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).

Overview

The middleware service provides several critical functions:

  1. Request validation and filtering
  2. PNR locator mapping (obfuscated ↔ actual)
  3. Credential management and injection
  4. Session handling and encryption/decryption
  5. PII (Personally Identifiable Information) filtering

Flow Description

Incoming Request Flow (Wenrix → Amadeus)

  1. Wenrix sends API request to the middleware
  2. Request is validated through APIFilter
  3. If request contains obfuscated PNR, BookingReference maps it to actual PNR
  4. SessionProvider decrypts any session information using dedicated encryption method
  5. CredentialsProvider replaces mock credentials with actual Amadeus credentials
  6. Final request is forwarded to Amadeus

Response Flow (Amadeus → Wenrix)

  1. Middleware receives response from Amadeus
  2. If response contains PNR references, BookingReference maps actual PNRs to obfuscated ones
  3. PiiDataFilter removes/masks all PII data according to rules
  4. SessionProvider encrypts any session information
  5. Final filtered response is returned to Wenrix

Project Structure

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

Key Components

APIFilter

Validates and processes all incoming requests. Ensures request format compliance and handles any necessary transformations.

BookingReference

Manages the mapping between obfuscated and actual PNR locators. Maintains secure storage and retrieval of booking references.

CredentialsProvider

Handles the secure storage and injection of Amadeus credentials. Manages credential lifecycle and validation.

SessionProvider

Manages session encryption/decryption using dedicated methods. Handles session creation, validation, and termination.

PiiDataFilter

Implements comprehensive PII detection and filtering. Ensures no sensitive data is exposed in responses.

Building the Project

This project uses Gradle as its build system. To build the project:

./gradlew build

Running Tests

To run the tests:

./gradlew test

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages