Prev  Up  Next
Chapter 10. Setting Up Authentication and Session Management (STEP 3)  Home  Chapter 12. Link Your Scopes and Security Contexts (STEP 5)

It is likely that your application is going to have tables that represent users. The next stage of your implementation is going to be to link your users with Veil2's accessors.

Look for STEP 4 in the file veil2_demo--<version>.sql.

You will need to create links between each of your user tables and the veil2.accessors table.

You will create foreign-key constraints back to those tables, and create triggers to keep the mapping and accessors tables in step with changes in your users tables.

What we need to do is populate the veil2.authentication_details table from the authentication details (passwords) in your source database. Depending on how secure your existing system is, this may prove to be difficult. For instance if you use a simple salted hash to store your passwords, you will be unable to generate a bcrypt password from it. In this case you have 2 basic choices:

  • implement your current password management scheme in Veil2;

    In this case you will be able to simply copy the current hashed passwords.

  • implement a password migration scheme.

    You will create bcrypt tokens from the users' passwords, as they enter them into your system.


Prev  Up  Next
Chapter 10. Setting Up Authentication and Session Management (STEP 3)  Home  Chapter 12. Link Your Scopes and Security Contexts (STEP 5)