Built a privacy library for Spring AI apps with Presidio integration — Spring AI Privacy Guardrails #2232
ultramancode
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
I’ve been working on an open-source library for Spring AI applications called Spring AI Privacy Guardrails, with an optional integration that uses Presidio Analyzer for PII detection.
In this integration, Presidio handles the detection layer, while the library applies privacy enforcement across supported Spring AI execution boundaries.
For Spring Boot applications, the Presidio integration is published on Maven Central as a dedicated starter:
io.github.ultramancode:spring-ai-privacy-guardrails-presidio-spring-boot-starterDetected sensitive values are replaced with request-scoped opaque tokens before model calls. When a protected tool is invoked, only original values explicitly allowed for that tool are restored, and sensitive values returned by the tool are protected again before model re-entry.
When Presidio is used as the analyzer, its findings are handled by the same protection flow for supported RAG context, chat memory, local tools, MCP tool flows, and optional final-response protection.
The repository also includes a runnable Privacy Boundary Inspector for local tool, RAG, and Streamable HTTP MCP scenarios, which can be tried without cloud model credentials.
The project was also mentioned in the official Spring Blog post
This Week in Spring — August 18, 2026, which highlighted its request-scoped PII tokenization, least-privileged disclosure model, and Presidio integration.
GitHub:
https://github.com/ultramancode/spring-ai-privacy-guardrails
Boundary demo:
https://youtu.be/IeeA5ogIX_I
If you're using Presidio in a Spring AI application, I'd really appreciate any feedback if you get a chance to try it out.
All reactions