Page 5 of 5

Re: JIWA 6.5.13 to 7.2.1

PostPosted: Fri Mar 20, 2020 1:31 pm
by pricerc
collation, maybe?

Re: JIWA 6.5.13 to 7.2.1

PostPosted: Fri Mar 20, 2020 1:39 pm
by SBarnes
Collation on one is SQL_latin1_General_CP1_CI_AS (customer) the other is Latin1_General_CI_AS (JiwaDemo7) ??

Re: JIWA 6.5.13 to 7.2.1

PostPosted: Fri Mar 20, 2020 2:03 pm
by Scott.Pearce
This is why I prefer the "create demo database, copy values from HR_Staff" method. Doesn't matter what you've set the passwords to.

Re: JIWA 6.5.13 to 7.2.1

PostPosted: Fri Mar 20, 2020 9:15 pm
by pricerc
Mike.Sheen wrote:
SBarnes wrote:Has something changed in the encryption sequence since the first script was put together as that would explain why gibberish was being given for the user name?

Code: Select all
UPDATE HR_Staff SET Password = '60A889064BAD474508723B9200184D09',
       PasswordLastChangedDateTime = '2014-05-28 11:20:48.000',
       LastSavedDateTime = '2014-05-28 11:20:48.000',
       SQLLogin = '6B4A7C2B2E902402268692E8932CDB50',
       SQLPassword = '1C57594FC45BBF79E1CB63D5452D4EE364CB73ED467F7C8C',
       ReportSQLLogin = '887BFFE23AB10B3C5412655265278A11',
       ReportSQLPassword = '1C57594FC45BBF79E1CB63D5452D4EE364CB73ED467F7C8C'
GO



Are you saying the above doesn't work for you? Because it works for me. I've just copy-pasted that script and run it against a 7.2.1 database and I could login fine.

To answer the question - no, we've not changed anything with regards to the encryption.




actually,

Code: Select all
SELECT distinct [SQLLogin],[SQLPassword],[ReportSQLLogin],[ReportSQLPassword]
  FROM [JiwaDemo].[dbo].[HR_Staff]


returns
Code: Select all
SQLLogin: 0E6019A460702D275F5CEC20300C0C43   
SQLPassword: 12D663653B142E02AB7C1B29D4C4604693FF497BCECF23C1   
ReportSQLLogin: 68B4E49B9080B8D8546F113D97CF5303   
ReportSQLPassword: 12D663653B142E02AB7C1B29D4C4604693FF497BCECF23C1


on my dev vm.

edit 1: but then I can't remember what username/password I specified when setting it up.

edit 2: doubled back and checked - It's JiwaUser/JiwaFinancials123.

Re: JIWA 6.5.13 to 7.2.1

PostPosted: Fri Mar 20, 2020 10:36 pm
by Mike.Sheen
pricerc wrote:actually,

Code: Select all
SELECT distinct [SQLLogin],[SQLPassword],[ReportSQLLogin],[ReportSQLPassword]
  FROM [JiwaDemo].[dbo].[HR_Staff]


returns
Code: Select all
SQLLogin: 0E6019A460702D275F5CEC20300C0C43   
SQLPassword: 12D663653B142E02AB7C1B29D4C4604693FF497BCECF23C1   
ReportSQLLogin: 68B4E49B9080B8D8546F113D97CF5303   
ReportSQLPassword: 12D663653B142E02AB7C1B29D4C4604693FF497BCECF23C1


on my dev vm.

edit 1: but then I can't remember what username/password I specified when setting it up.

edit 2: doubled back and checked - It's JiwaUser/JiwaFinancials123.


That representation of the values is different in your case because we salt with the datetime the value changed.

So, whilst your SQL Login has 0E6019A460702D275F5CEC20300C0C43 as the encrypted value, it could very well decrypt to the same "JiwaUser" as does 6B4A7C2B2E902402268692E8932CDB50 in another database because we use the datetime it was last changed as salt in our ciphers. Same applies to the passwords.

And we're way off topic now and the OP has marked this solved - so let's avoid adding noise to the topic - if there are issues tangential to this, then a new topic is in order.

Re: JIWA 6.5.13 to 7.2.1

PostPosted: Fri Mar 20, 2020 11:01 pm
by Mike.Sheen
Whilst I've locked this topic, I couldn't help myself to resolve the mystery to Stuart's problem.

The cause is setting the encrypted values and not also setting the salt we use:

Code: Select all
SQLLoginLastSavedDateTime = '2014-05-28 11:20:48.000',
ReportsLoginLastSavedDateTime = '2014-05-28 11:20:48.000'


Include that (as per my script, but which I note Stuarts did not have) and then the encrypted values are valid.