← Latest papers
💻 computer science

Qualifying Observation Integrity for Selective Authorization in PostgreSQL

This paper presents a restricted PostgreSQL installation qualifier that ensures the integrity of selective authorization by enforcing a producer-to-consumer contract through code checks and authenticated behavioral oracles, thereby enabling safe reuse of policy decisions and achieving a 24% performance improvement on unchanged data while rigorously preventing unsafe qualifications that simpler structural lints miss.

Original authors: Aleksandar Mihajlovic

Published 2026-10-29
📖 7 min read🧠 Deep dive

Original authors: Aleksandar Mihajlovic

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the digital world, databases act as the central memory for everything from bank accounts to online shopping carts. They store the current state of the world: how much money is in an account, what items are in stock, or whether a user has permission to enter a building. When a computer program asks a database for permission to perform an action, the database checks the current facts. If the facts have changed since the last check, the answer might be different. For example, a purchase might be approved when a user has enough money, but if another transaction spends that money a split second later, the approval should be revoked. To stay safe, systems often re-check the facts every single time an action is about to happen. This is reliable, but it can be slow, especially when the same facts are checked thousands of times in a row without changing.

Researchers have long looked for ways to speed this up by remembering the last time the facts were checked. If the system can prove that the underlying data has not changed, it can reuse the old permission without asking again. This is called selective authorization. However, this shortcut only works if the system can be absolutely certain that the data really hasn't changed. If the system is tricked into thinking the data is stable when it is actually shifting, it might grant permission for a transaction that should be blocked. The core challenge is not just checking the data, but verifying that the very mechanisms designed to track changes are themselves working correctly and are visible to the right people.

A researcher named Aleksandar Mihajlovic has developed a method to verify these tracking mechanisms within a specific type of database system called PostgreSQL. The goal was to create a strict set of rules that a database installation must follow to be trusted with this shortcut. The system, named OntoCommit, acts as a gatekeeper. Before a database is allowed to reuse old permission decisions, this gatekeeper inspects the code and configuration to ensure that every change to the data is properly recorded and that the person checking the records can actually see those records. The research focuses on a specific boundary: the moment a change is made and the moment it is observed. If there is a gap between the two, the safety of the entire system is compromised.

The study began by identifying how easily this trust could be broken, even when the code looked correct on the surface. The researcher found two specific ways a system could fail silently. In the first case, a helper function designed to update a change counter had its input names swapped. The code still ran, and the types of data it accepted were correct, but because the names were mixed up, the counter for one type of change was updated while the counter for another type remained stuck. It was like a traffic light system where the sensor for the north-south lane was accidentally connected to the east-west button; the lights would change, but not for the cars that needed them to. In the second case, the system was configured with a security feature that hid certain rows of data from regular users. The change counter was updated correctly by the system administrator, but the person checking the permission was blocked from seeing that update. To the checker, the counter appeared to be zero, even though it had actually increased. This created a false sense of safety.

To prevent these failures, the researcher built a qualification tool that checks the database installation before it is allowed to use the shortcut. This tool does not just look for the presence of code; it verifies the exact binding of function names, the ownership of tables, and the visibility settings for every user role. It insists that the code responsible for updating the change counters matches the exact signature expected by the system. It also forbids the use of row-level security on the specific tables that track these changes, ensuring that the person checking the permission can always see the true state of the counter. The tool acts as a rigorous inspector, rejecting any installation that tries to use unsupported variations or that hides the evidence of change.

The researcher tested this approach using a controlled environment that simulated a complete purchase process. The system was set up to handle a scenario where a user tries to buy something, checking their account balance and any existing holds on their funds. The experiment compared two methods: one where the system re-evaluated the entire policy from scratch every time, and another where the system used the selective authorization shortcut. The tests were run on a standard version of the database software, but within a simulated computer environment to ensure precise control over the conditions. The study included a set of one hundred and eight different configuration pairs, some designed to be safe and others designed to be unsafe, to see if the qualification tool could tell the difference.

The results showed that the qualification tool was highly effective at identifying unsafe configurations. It successfully rejected all five of the deliberately unsafe setups, including the ones with swapped parameter names and hidden data rows. At the same time, it accepted all forty-eight valid, safe configurations. It also correctly refused two configurations that were safe but did not fit the strict rules of the tool, demonstrating that it prioritizes safety over convenience. In the performance tests, the selective authorization method proved to be significantly faster when the data remained unchanged. For a dataset with ten thousand rows, the system using the shortcut completed the cycle in a median time of sixty-six milliseconds, while the system re-checking everything took eighty-seven milliseconds. This represented a twenty-four percent reduction in time. However, the study also found that when the data actually changed, the shortcut offered no speed advantage and could even be slightly slower, as the system had to re-evaluate the policy.

The research also highlighted the limits of testing. The researcher demonstrated that simply running a few tests to see if the system works is not enough to guarantee it will always work. It is possible to construct a scenario where a system passes every test but still fails under a specific, unseen condition. The study showed that a system could pass a series of checks while still hiding a critical change from the observer. This means that the only way to ensure safety is to enforce strict rules about how the system is built, rather than relying solely on testing to find errors. The tool does not claim to prove that the system is perfect in every possible universe, but it does provide a verifiable contract that the installation follows a specific, safe pattern.

In the end, the work provides a practical method for making databases faster without sacrificing security. By defining a clear set of rules for how change tracking must be implemented and verified, the researcher has created a way to trust that the database is telling the truth about its own state. The study does not claim to solve every problem in database security, nor does it suggest that this method should be used in every situation. It is a specialized solution for a specific type of database setup, one that trades some flexibility for a higher degree of certainty. The findings suggest that for applications where speed and safety are both critical, such as financial transactions, a carefully qualified system can offer a reliable shortcut. The research concludes that the safety of these shortcuts depends entirely on the integrity of the observation path, from the moment a change is made to the moment it is seen, and that this path must be checked with the same rigor as the data itself.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →