1 nit to pick. You are using 'key' for variables. Owner key and activation key.

While not wrong, it gets hard to read: owner['key'], ["key1", "key2"])

Make the names a bit more specific, please.