The principle of least privilege is an information security fundamental. But applications that fail by asking for more than they need aren't necessarily poorly written. Maybe they're just being realistic.
Yesterday I started to create an account at Twistory, a web applications that creates an archive and calendar of your Twitter activity. I needed to give Twistory permission to access my Twitter account via OAuth.
But the authentication dialog told me that Twistory wasn't just requesting permission to read my tweets. It wanted permission to see who I follow, follow new people on my behalf, post tweets and even update my profile.
Read-only access was needed, Twistory, nothing more. Why are you asking for all this write access?
"We did so because some future Twistory functionality might require those [functions]," wrote Twistory representative Tijs Vrolix in response to last month's question in the application's support forum at Get Satisfaction.
"Don't worry though, we're kind people and won't abuse your confidence," he wrote.
My friend Eric TF Bat calls that "security through sincerity". Trust us, we sound trustworthy. Obviously that's not how security works.
Even if Twistory kept their promise to play nice today, will they still play nice tomorrow? What if they're compromised? Hackers could issue fake tweets. That would be impossible if Twistory simply didn't have those unneeded write permissions.
Last night Australian time I pressed Vrolix further, and more reasons emerged.
"We choose for full-permissions as it is very hard to get users to re-authorise when we need them to do so (at some point in the future)," Vrolix wrote.
Twistory doesn't have users' email addresses, only their Twitter IDs. Sending tweets or direct (private) messages to all 50,000 users is a no-go, because Twitter would immediately flag them as spammers.
"We had a lot of trouble getting users to 'upgrade' (authorize) from V1 to V2, so while I do agree we shouldn't take security lightly, we're somewhere in between user and 'business' interests here," Vrolix wrote.
In a delightful twist, when I tried to post my comments on Get Satisfaction by authenticating with my Twitter account, they too wanted write access.
"We definitely don't use the 'write' access for anything," wrote Get Satisfaction co-founder Amy Muller.
"There was talk about doing that in the past, but given that we don't currently do so there's no real need for us to ask for that permission. We just haven't updated that login code in a while."