3 ms·
I've actually used that whitelist pattern before for legacy software in a non-security context. We had some programs using old stuff, and it was a real hassle t
by hnick 5y ago
I've actually used that whitelist pattern before for legacy software in a non-security context. We had some programs using old stuff, and it was a real hassle to migrate everyone off it due to the massive amount of testing involved. But it was very easy to setup new programs to use something else. The problem was that people just kept calling the old one out of habit.
So I just replaced the executable with a wrapper that checked what is calling it, then called the real one if allowed. I can't remember how but we probably blocked the original executable from general use, but even if we didn't then bypassing this check shows clear intent on the user's part. They can't claim ignorance, which is enough if it shows up in source code later or dies when we finally remove this software. Meanwhile we could move the other users one by one without any new ones sprouting up.
Of course, code reviews, check-in filters, and such might be a nicer solution but this place wasn't that organised. So we did what we could, and didn't really have to keep an active eye out.