Author Topic: Add users to DB (t_secuser), how to create UserId and Password?  (Read 6639 times)

Christian Freihoff

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
I'd like to add users to the t_secuser table in the database. Therefore i need to know how the password encryption is done. PW should be a salted hash value, but which algorithm and which salt? What about that UserId? Values like {5289B49E-4DF8-49ea-85BB-10E5F20917A9} are there for existing users...

thanks in advance

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Add users to DB (t_secuser), how to create UserId and Password?
« Reply #1 on: July 13, 2016, 02:39:12 pm »
I doubt whether Sparx will reveal that info.
(I'm not sure how it is now, but up until shortly the "encryption" was not salted. If two users had the same password the encryption ended up with the same result)

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Add users to DB (t_secuser), how to create UserId and Password?
« Reply #2 on: July 13, 2016, 05:10:31 pm »
Having an API like Respository.AddUser (name, pw) would probably be fine enough.

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Add users to DB (t_secuser), how to create UserId and Password?
« Reply #3 on: July 13, 2016, 08:28:11 pm »
Hi Christian,


The password encryption algorithm, as others have noted, is not published. Not sure why.

One way forward would be to create a user with a non-secure password (like "password"), copy what's been added to t_secuser.Password and use that in your code. Don't know if that would work, but worth a try.

The user ID is simple, however. It's just a GUID, and generating one of those is easy -- EA's API does not have a function for it, but Microsoft COM does, and as like as not that's what EA uses as well.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.