arXiv:2605.21865cs.CRcs.MM2026-05

通过重排键值顺序实现无损API水印,零代码改造系统即可追踪数据泄露。

PEMark: Watermarking API Responses Based on Proxy Gateways and Position Encoding

论文配图:PEMark: Watermarking API Responses Based on Proxy Gateways and Position Encoding
图 1 · 摘自论文原文
  • 利用JSON/XML键值顺序的冗余性,通过位置编码嵌入水印。
  • 对响应数据零修改,抗篡改与插入攻击成功率100%。
  • 无需改动业务代码,适合生产环境快速部署。

API响应中的数据泄露问题日益受到关注。现有水印方法通常需修改数据库或响应数据,导致业务系统代码变更甚至运行中断。本文提出一种基于水印代理网关与PEMark(基于位置编码的水印)的可插拔水印方案。核心创新在于利用JSON/XML键值对排列中的固有排列冗余——这一无语义信息但蕴含丰富编码容量的维度。首先,将服务器响应转发至水印代理网关,实现对现有业务系统的零修改。随后,采用位置编码对键值顺序进行重排,嵌入水印,而不改变任何数据值。据我们所知,这是首个通过代理网关实现无损位置编码水印的方案。实验表明,该框架在保持业务可用性的前提下确保了响应可追溯性。相比主流方案,本方法对篡改和插入攻击具有100%相似性鲁棒性,可抵御一定强度的删除攻击。

原文摘要 · Abstract (English)

Data leakage from API responses has drawn wide attention. APIs are often not fully regulated, making them easy to abuse. One common solution is to embed watermarks into API responses for traceability. However, existing watermarking methods often require modifying database content or API response data. This forces changes to business system code, and may even disrupt normal business operations because data values are altered. In this paper, we propose an original pluggable watermarking scheme based on a watermark proxy gateway and PEMark (Position Encoding-based Watermarking). The key novelty of our approach is exploiting the inherent permutation redundancy in the ordering of JSON/XML key-value pairs -- an overlooked dimension that carries no semantic information yet provides abundant encoding capacity. First, we forward server responses to the watermark proxy gateway, a design that requires zero modification to existing business systems. Then, we embed a watermark into each API response using position encoding, which reorders keys without altering any data values. To the best of our knowledge, this is the first work to achieve distortion-free API response watermarking via position encoding over a proxy gateway. Our method does not modify any data values, so normal business operations continue seamlessly after watermark embedding. Experimental results show that our framework maintains business usability while ensuring that returned API data is traceable. Compared with current mainstream schemes, our method is robust against tampering and insertion attacks (100\% similarity), and can withstand certain levels of deletion attacks.

API安全水印技术位置编码

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。