ibm mobilefirst - Worklight JSONStore rejecting some user passwords and not others -


got weird 1 here. jsonstore in worklight 6.1.0.01 on ios 7.1 seems arbitrarily rejecting passwords.

here's code using initialize jsonstore:

var bitarray = sjcl.hash.sha256.hash(username + ':'+ password); var digest_sha256 = (sjcl.codec.hex.frombits(bitarray));  options.username = username options.password = digest_sha256;  options.localkeygen =  true; options.clear = false; collections[this.collection1] = collection1; collections[this.collection2] = collection2; collections[this.collection3] = collection3;  wl.jsonstore.init(collections, options).then(function() {     onsuccess(); }).fail(function(errorobject) {     onfailure(); }); 

i've got user: ad1tst password: output of sha256 hash user b5de1dfbbd09c5f8cf78d858eb4ed09e3b9826f9c35c950d164e8accf7775082

using hash password, user can initialize database.

i've got user ad2tst password: output of sha256 has user 607c04ef944b36ec939d39f7c6b24757776918b8425e5a3b912738d6dea0ebea

using hash password user cannot initialize database.

if user ad2tst uses password (which gives hash of 1feff7f75cfd73fc796d9dd612261b3f72f4292ce76ae3a5e92f7b1dbb2fd038) user can initialize database.

this problem not restricted these 2 test users. have live users exhibiting same problems.

we getting following error jsonstore runtime:

__33-[jsonstorequeue setdatabasekey:]_block_invoke [line 128] invalid password 2014-05-16 16:39:26.611 audits[865:60b] thread warning: ['storageplugin'] took '71.429932' ms. plugin should use background thread. 2014-05-16 16:39:26.612 audits[865:60b] [error] [wl.jsonstore] {"src":"initcollection","err":-3,"msg":"invalid_key_on_provision","col":"collection1","usr":"ad2tst","doc":{},"res":{}} 

the invalid_key_on_provision error being generated 'provision' method of jsonstore plugin somewhere deep in bowels of worklight's native code.

in follow-on 1 attempted answer below; each run of app done on clean install. test cycle is:

  1. install app
  2. run 1 of test users
  3. watch fail or pass, depending on username/password pair supplied
  4. delete app
  5. goto step 1

so, not situation database encrypted password.

invalid key on provision means encrypted store 1 password first, tried open (wrong) password.

make sure using different username, or destroying store first, before trying use new password.

if destroy store, , use other password, should work it.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -