lemonbytes

husband, dad, steelers fan and software engineer

2-Factor This!

by Stan Lemon


A lot of services across the web are amping up security in lieu of recent breaches. One technique to do this is called two factor authentication. It’s a name that perfectly describes the technique, but explains absolutely nothing.

So what is two factor auth and why do you care? Simply, two factor auth is your password plus something else. In most cases that “something else” is going to be a text message, an email or a secure token system like Google Authenticator or Authy. Some banking websites have been doing this forever via email but the growing trend is to use text messages as they can be a considerably safer approach to this sort of authentication.

Here’s the thing to keep in mind… You are most likely already doing two factor auth in your life - you just don’t think of it like that. If you have a safety deposit box for example, it takes two keys to unlock it. Without both sets your birth certificate isn’t going to see the light of day. If you’ve bought a car recently you’re also using two factor auth as every car key these days comes with a microchip implemented in it. You can’t start your car with a copy of your key, you need to use the key plus the microchip if you want to drive anywhere. And if you don’t have that microchip your car not only won’t run, it very well may lock up on you too! These are two factor strategies, where they prevent criminal-like-folk from copying your keys and running away with your identity and precious automobile. Why not use that same strategy with your personal information stored securely on the world wide web?

How does two factor work with your favorite web service? There are two typical routes, the most common of which involves your cell phone and a text messaging plan. If you don’t have unlimited text messaging either pony up or take a trip to the Verizon store for an upgrade. When you login, normally for the first time, you’ll get a text message from the service in question. Websites like Facebook will ask you to punch in a unique code on this text message after you enter your password, but before you actually get to login to the service. The idea is that your cell phone is most likely on you and there’s a uniqueness to the device in your pocket that a hacker cannot replicate. Stealing your password then is not enough, you need to steal a person’s cell phone too - thus making it infinitely more difficult for a hacker to access your information.

Not every service has two factor authentication, but a lot do. You should evaluate the services you use every day and consider enabling two factor authentication where it’s available. I’m a big proponent of enabling two factor auth for your Google, Dropbox, Evernote and Facebook accounts. As these items likely contain more personal data about you and your friends than anything else you’re using it’s important to harden your security around them.

Don’t get me wrong… Two factor auth doesn’t just slow down the losers trying to compromise your data, it slows you down too. Principally though this should only happen when you setup Facebook on your phone, or configure your email client to pull down your Gmail. Your setup is slower, but your data is safer. In my opinion this is a fair trade considering what is at stake. One other thing to keep in mind… These services don’t do two factor auth for their sake. It actually costs them money to run, with almost no return on the investment! Two factor auth is a service for you, to protect your data and keep you, your family and friends safe.



So you don’t give a crap that your data gets exposed or hacked? You don’t have anything to hide, so the potential leak isn’t worth the added effort of complex passwords and password management systems.  You want a simple, easy to remember password.  Fair enough.  I get it.  You don’t give a crap, but here’s the thing… Your mom might. Or your dad, or your sister or your great Aunt Bertha or your Cousin’s best friend that you just recently added on Facebook.  And that’s the point!

Let’s say you’re one of the few who don’t give a rip because you have nothing to hide. Stop being selfish!  Most of this password protection junk has nothing to do with you.  It has to do with the information you have access to, like my email address, my phone number, the names of my kids and that picture I shared with you from my best friends bachelor party!

You are most likely passively collecting information in the services you use every day.  It might just be people's names, but it also could be more serious information like their addresses and phone numbers.  A data leak because you used a stupid password exposes all kinds of things that your friends and family don’t want everyone under the sun to know. And not just because it’s private information, but because it effects their safety!

It can get worse then just the revealing of address and phone numbers though.  How you say?  Consider the fact that that Facebook app on your phone posts where you go.  Maybe it’s a restaurant, church or even the grocery store.  You’re a hip social media rock star and you’ve been capturing your geo-coordinates and checking in wherever you go.  So have I, your mutual friend on Facebook,  as well as your neighbor’s 16 year old daughter.  Now ALL of that information about where you’ve been and the trends of your daily activity is accessible to some low life hacker that cracked your stupid-simple password.  Is this sounding scary yet?  Let’s keep going…  That hacker might decide to pay one of us (you, me or or your neighbor’s teenage daughter) a visit.  Or maybe the hacker sells that valuable data information to a petty thief or a pedophile. Now is it scary? It ought to be.  This is what happens when the flood gate known as your weakly protected account is opened.

You are just a gateway drug for a hacker. Your credit card, social security number are low hanging fruit compared to the peripheral data you are toting in those web based accounts you login day in and day out. Protecting your accounts with unique and complex passwords isn’t just about you.  It’s about everyone you engage with using those services.  It’s about personal protection, for you, your family and your friends. So I get it, you don’t have anything to hide that you’re worried about a hacker exposing. But I do.


Password Security

by Stan Lemon




Last winter, about a year ago, Google did a round of house cleaning.  When they did this they consequently opened the flood gates to making Gmail a less secure product.  How you say?  Let me explain...

Google's 12/12 cleaning eliminated a product called Google Sync.  This was an extremely handy product for folks going mobile who want to stay connected to their email.  It essentially allowed you to setup your Gmail account using Microsoft's Exchange protocol.  What's significant about that is that it enabled instant push notifications for new email messages.  This meant that when Google got an email for you, if you were using the Exchange protocol you got it instantly. When Google dropped support for this the best you could hope for was getting your email in a 15 minute window, hardly instant.

In a world of instant not having your email as soon as it's available is a huge deal.  But why did Google do this?  Presumably to get more people to adopt their Gmail iOS app. But here's the thing... Gmail for iOS SUCKS!  Yeah, I said it, it's absolutely terrible!  Not all of it is Google's fault, but some of it should have been resolved when Google picked up Sparrow in an acquisition - those dudes knew how to make an email account.  Gmail for iOS is awful first and foremost because iOS has no concept of a default email client.  If you're using Safari and you click on an email address, or maybe you click on it from your Contacts, you're going to open up the native Mail app. There are more problematic issues though that are technical in nature, like Gmail's inability to properly handle responsive email layouts. When email doesn't look right people don't want to use your product. This is where everything goes bad...

Your email looks like crap and nothing on your mobile device uses the right client.  So what do you do?  You start experimenting with other clients. This is fundamentally how Google is destroying the security of Gmail.  Since the shut down of Google Sync for the masses you've seen a whole host of iOS email clients spring up.  I'm looking at you Mailbox, Evomail, Boxer and friends. Personally I don't have a beef with these products in and of themselves, but the problem is they all offer you push notifications at a cost.  Not a financial cost, a risky security cost. In order for these applications to tell you the instant you get your email you have to give them full and absolute access to your inbox.  Then you have to trust that no one at that company is stupid enough to become the next Adobe. I actually like some of the products I just mentioned, but I don't use them.  The reason is simple, I'm not comfortable letting someone else comb my email every single day. Quite frankly, you shouldn't be either!

What's the answer?  For me it's two fold...  Important email accounts use the Gmail iOS app.  Non-important email accounts stay in the native Mail app.  The important ones are there too, so that the rest of my iOS experience doesn't stink, but I have notifications and badges turned off for those accounts. It's not a pretty solution in my opinion, but it's the only solution that keeps your email safe.  Your email needs to be safe too.  There is no easier way for a hacker to gain access to everything else in your life than getting access to your email.  Most services allow you to reset everything under the sun using just your email address.  Keep your email safe!

Both Google and Apple can help us out too, though I don't think either of them are going to do so.  Google can fix their technical problems.  Most of them should just not happen, it's inexcusable.  They can also work on making Gmail act more like an iOS app and less like a red-headed-Android app.  Meanwhile Apple can give us the ability to select a default email app, and they can also build out APIs to allow apps like Mailbox to poll an IMAP service like Gmail in the background of the device.  Yes, it's going to hurt your battery life but that's a price I'm willing to pay for security. I just wouldn't expect Apple to do that anytime soon...

There's one other option I haven't mentioned...  Ditch Gmail altogether.  If Google is content to encourage users to risk their email security then maybe it's time to look elsewhere?  Any Exchange based service will work, and quite honestly the dudes over at Microsoft have built a solid product with Outlook.com.  If that doesn't float your boat, Yahoo Mail also has a solid email solution.  And guess what... you can get push notifications for both!

Someone may be quick to point out that Apple's own iCloud solution does push too.  This is true, but anyone who has used iCloud knows, the spam filtering and phishing protection makes it nearly the worst solution to email available on the internet today.


The DataMapper Ruse

by Stan Lemon


There were some great articles today about ORMs, specifically "Is ORM abstraction a pipe dream?" by David Adam and then "Publish Your Failure; or, The Way Of All Frameworks" by Paul Jones (the man who led me to good BBQ in Memphis).

I've been thinking about ORMs a lot lately and I've been wanting to write something about what I consider to be the DataMapper farce. I should be clear up front, I'm big Doctrine 2 fan.  BIG. It's my ORM of choice every single time, or maybe it was... On principal I love Doctrine 2. My days as a Java developer made me grow fond of Hibernate and with time I've come to really appreciate object hydration via the DataMapper pattern alongside the Repository pattern.  What I've appreciated most is the fact that I can write a model with no implicit dependencies, meaning my class "Foo" does not extend ActiveFoo or QueryFoo or BaseFoo or FooTable or GatewayFoo or FooPeer or MagicHotSauceFoo, it simply stands on it's own.  In the case of Doctrine 2 my model usually gets some love from annotations or maybe Yaml if I'm looking to spice up my day.

Here's the thing I've been contemplating though and why I think this notion of portability is fundamentally a ruse (for now). In the PHP universe what other library provides a DataMapper implementation that would allow you to freely move from Doctrine 2? If I choose to write stand alone models I am either stuck doing some sort of hydration myself (all kinds of time consuming icky) or I am using Doctrine 2.  So this idea that ActiveRecord locks you in and Doctrine 2 doesn't, is, well simply not true...  Short of a viable alternative Doctrine 2 has a monopoly on the DataMapper pattern, making it as 'locked in' as using Propel or any other ActiveRecord-styled ORM.

Now don't get me wrong...  This doesn't change the fact that I will likely continue to gravitate toward's Doctrine 2.  I am going to hang tight and hope for some healthy competition that will allow me to write my models portable enough to swap in Doctrine 2 for odd days of the week and LibraryX for even days.