           'create', 'get', 'fetchAll', 'control'
         ]
     schema          :
-      name          :
+      appName       :
         type        : String
         required    : yes
-      secret         :
+      kiteName      :
+        type        : String
+        required    : yes
+      secret        :
         type        : String
         required    : no
       key          :

  @share()

  @set
    indexes         :
      apiKey          : 'unique'
    permissions: [
      'read kites'
      'create kites'

    crypto.randomBytes 12, (ex1, key) ->
      crypto.randomBytes 12, (ex2, secret) ->
        #todo remove prefixes
        apiKey    = "key-" + key.toString 'hex'
        apiSecret = "secret-" + secret.toString 'hex'
        data.key = apiKey
        data.secret = apiSecret

