Configuration API
VERSION: v1 (Initial REST Release)
Section titled “VERSION: v1 (Initial REST Release)”- INTRODUCED BY: Initial architecture
- IMPLEMENTED BY: Configuration Controller
- Owner application: Configuration
- Interface patterns: Architecture Patterns (Synchronous REST)
- Security scenario: command-over-HTTP / internal authority
REST API providing endpoints for CRUD operations and bulk updates on dynamic configurations partitioned by namespace.
Endpoints
Section titled “Endpoints”| Method | Path | Required Role | Description |
|---|---|---|---|
GET |
/configurations |
CONFIGURATION_VIEW |
Search, filter, and paginate configurations across namespaces |
GET |
/configurations/{key} |
CONFIGURATION_VIEW |
Fetch a single configuration entity by key |
GET |
/configurations/namespace/{namespace} |
CONFIGURATION_VIEW |
Retrieve all configurations for a given namespace |
POST |
/configurations |
CONFIGURATION_ADD |
Create a new dynamic configuration entity |
PUT |
/configurations/{id} |
CONFIGURATION_EDIT |
Update an existing configuration by ID |
PUT |
/configurations/bulk |
CONFIGURATION_EDIT |
Atomically bulk-update multiple configurations within a single transaction |
DELETE |
/configurations/{id} |
CONFIGURATION_DELETE |
Delete a configuration entity by ID |
Typed Table (TABLE) Payload & Validation
Section titled “Typed Table (TABLE) Payload & Validation”POST /configurations, PUT /configurations/{id}, and PUT /configurations/bulk support polymorphic type: "TABLE" payloads (CreateTableConfigurationRequest, EditTableConfigurationRequest, TableConfigurationResponse):
- Schema (
columns): Non-empty list ofTableColumndefinitions (key,label,columnType,required,selectableValues). SupportedTableColumnTypevalues areINPUT,SWITCH,DROPDOWN, andMULTISELECT(nestedMAPPINGorTABLEcolumns are excluded). Column keys must be unique and match^[a-zA-Z0-9\-_]*$.DROPDOWNandMULTISELECTcolumns must define non-emptyselectableValues. - Matrix (
rows): Optional list ofTableRowentries, each containingcells(TableCellwithcolumnKey, scalarvalue, or listvalues). Omittingrows(null) onPUT /configurations/{id}orPUT /configurations/bulkclears any previously stored rows. - Cell Exclusivity & Lenient Coercion:
MULTISELECTcells must usevalues(rejecting scalarvalue), whereasINPUT,SWITCH, andDROPDOWNcells must usevalue(rejectingvalues).TableCell.LenientStringDeserializercoerces JSON strings, numbers, and booleans onvalueto strings and rejects non-scalar JSON objects ({}) or arrays ([]). - Validation Errors:
TableConfigurationValidatorrejects missing/duplicate columns, unknowncolumnKeyreferences, invalidSWITCHvalues (non-true/false), out-of-rangeDROPDOWN/MULTISELECToptions, or missing required cells with HTTP400 Bad Request(ResponseCode.INVALID_REQUEST). InPUT /configurations/bulk, any validation failure rolls back the MongoDB transaction with zero events emitted.
{ "key": "pricing.ancillary-fee-matrix", "namespace": "pricing", "description": "Typed ancillary fee rules by channel and cabin", "type": "TABLE", "columns": [ { "key": "channel", "label": "Channel", "columnType": "DROPDOWN", "required": true, "selectableValues": ["DIRECT", "NDC"] }, { "key": "feeAmount", "label": "Fee Amount", "columnType": "INPUT", "required": true }, { "key": "active", "label": "Active", "columnType": "SWITCH", "required": true }, { "key": "cabins", "label": "Cabins", "columnType": "MULTISELECT", "required": false, "selectableValues": ["Y", "C"] } ], "rows": [ { "cells": [ { "columnKey": "channel", "value": "NDC" }, { "columnKey": "feeAmount", "value": 12.5 }, { "columnKey": "active", "value": true }, { "columnKey": "cabins", "values": ["Y", "C"] } ] } ]}Security & Authorization
Section titled “Security & Authorization”All incoming HTTP requests must include a valid Bearer JWT issued by Keycloak. Operations are authorized using fine-grained RBAC roles (CONFIGURATION_VIEW, CONFIGURATION_ADD, CONFIGURATION_EDIT, CONFIGURATION_DELETE). Consuming microservices using the util-configuration library authenticate via OAuth2 client credentials grant.
High-Level Designs
Section titled “High-Level Designs”None
Threat Assessments
Section titled “Threat Assessments”Initial Architecture Baseline — 2026-10-12
Section titled “Initial Architecture Baseline — 2026-10-12”Reason: Interface introduced as primary internal REST management and client fetch API.
- Is strictly confidential data (e.g., traveler PII, travel documents, payment data, PCI, credentials) excluded from event payloads and responses whenever unnecessary and feasible? Confirmed: Configurations manage runtime behavior, URLs, thresholds, and flags; no traveler PII or cardholder data is stored or returned.
- Can the sender’s identity be verified? Verified via Keycloak OIDC Bearer token signature validation and internal service mesh mTLS.
- Are there authorization checks preventing cross-application data access beyond what is needed? Enforced via Keycloak RBAC role validation on each controller endpoint and namespace validation.