ProjectBuild a Permission-Aware Knowledge Hub as an MCP Server: the explanation · Module 10: Permission filtering before ranking · part 12 of 22
Part 12 · Module 10: Permission filtering before ranking
Module 10: Permission filtering before ranking
24 min read·
About 55 minutes · Needs: Module 7 (groups and visibility), Module 9 (the ranked lists and fusion) · Code: server/wayfinder/search.py, server/wayfinder/knowledge.py, server/wayfinder/index/indexer.py, server/tests/retrieval/test_security_acl.py
Where this fits
This module (blue): the access rules, the searches and fusion they filter, the knowledge functions behind the other tools, and PostgreSQL, where the filter runs.
This is the idea the whole project is built around. Every other part (the tools, the console, the OAuth sign-in) exists to deliver passages to a person's AI client; this module is about making sure those passages are only ones that person may read, and that nothing about the others slips out on the side. The highlighted parts are the access rules, the two searches and the fusion, the knowledge functions behind the other tools, and PostgreSQL, where the filter actually runs.
The rest of this project is yours to keep
This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.