{"title":"Validation of inter-parameter dependencies in API gateways","authors":"Saman Barakat, Sergio Segura","doi":"10.1016/j.csi.2025.104010","DOIUrl":null,"url":null,"abstract":"<div><div>Web APIs usually include inter-parameter dependencies that constrain how input parameters can be combined to form valid calls to the services. API calls often violate these dependencies, resulting in unnecessary message exchanges, wasted time, and quota usage. Additionally, services may fail to adequately validate whether input requests meet these dependencies, causing critical failures or generating uninformative error messages. In this article, we propose extending API gateways to detect and explain inter-parameter dependency violations. We leverage the Inter-parameter Dependency Language (IDL) for specifying dependencies between input parameters in web APIs, and IDLReasoner, a constraint-based IDL analysis engine. We implemented our approach into a prototype tool, IDLFilter, on top of Spring Cloud Gateway. Evaluation results with 12 industrial API operations and about 30K automatically and manually generated API calls show that our approach effectively blocks invalid calls due to dependency violations, providing informative error messages and minimizing potential input validation failures. IDLFilter introduces a small 7% overhead when processing valid API calls, while reducing the response time of requests violating dependencies by 59%.</div></div>","PeriodicalId":50635,"journal":{"name":"Computer Standards & Interfaces","volume":"94 ","pages":"Article 104010"},"PeriodicalIF":4.1000,"publicationDate":"2025-04-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Standards & Interfaces","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S092054892500039X","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, HARDWARE & ARCHITECTURE","Score":null,"Total":0}
引用次数: 0
Abstract
Web APIs usually include inter-parameter dependencies that constrain how input parameters can be combined to form valid calls to the services. API calls often violate these dependencies, resulting in unnecessary message exchanges, wasted time, and quota usage. Additionally, services may fail to adequately validate whether input requests meet these dependencies, causing critical failures or generating uninformative error messages. In this article, we propose extending API gateways to detect and explain inter-parameter dependency violations. We leverage the Inter-parameter Dependency Language (IDL) for specifying dependencies between input parameters in web APIs, and IDLReasoner, a constraint-based IDL analysis engine. We implemented our approach into a prototype tool, IDLFilter, on top of Spring Cloud Gateway. Evaluation results with 12 industrial API operations and about 30K automatically and manually generated API calls show that our approach effectively blocks invalid calls due to dependency violations, providing informative error messages and minimizing potential input validation failures. IDLFilter introduces a small 7% overhead when processing valid API calls, while reducing the response time of requests violating dependencies by 59%.
Web api通常包括参数间依赖关系,这些依赖关系约束了如何组合输入参数以形成对服务的有效调用。API调用经常违反这些依赖关系,导致不必要的消息交换、浪费时间和配额使用。此外,服务可能无法充分验证输入请求是否满足这些依赖项,从而导致严重故障或生成无信息的错误消息。在本文中,我们建议扩展API网关,以检测和解释参数间依赖违反。我们利用参数间依赖语言(IDL)来指定web api中输入参数之间的依赖关系,以及IDLReasoner,一个基于约束的IDL分析引擎。我们将我们的方法实现到Spring Cloud Gateway之上的一个原型工具IDLFilter中。12个工业API操作和大约30K个自动和手动生成的API调用的评估结果表明,我们的方法有效地阻止了由于依赖违反而导致的无效调用,提供了信息错误消息,并最大限度地减少了潜在的输入验证失败。IDLFilter在处理有效API调用时引入了7%的小开销,同时将违反依赖项的请求的响应时间减少了59%。
期刊介绍:
The quality of software, well-defined interfaces (hardware and software), the process of digitalisation, and accepted standards in these fields are essential for building and exploiting complex computing, communication, multimedia and measuring systems. Standards can simplify the design and construction of individual hardware and software components and help to ensure satisfactory interworking.
Computer Standards & Interfaces is an international journal dealing specifically with these topics.
The journal
• Provides information about activities and progress on the definition of computer standards, software quality, interfaces and methods, at national, European and international levels
• Publishes critical comments on standards and standards activities
• Disseminates user''s experiences and case studies in the application and exploitation of established or emerging standards, interfaces and methods
• Offers a forum for discussion on actual projects, standards, interfaces and methods by recognised experts
• Stimulates relevant research by providing a specialised refereed medium.