asp.net - ActiveDirectoryMembershipProvider and referential integrity -


In the past, when I implemented my authentication system, I had a table with my table in relation to another table The table contains the database. However, now I am considering using ActiveDirectoryMembershipProvider, I have no way to create similar links between AD users and those tables.

What is the usual way of solving this problem? Should I accept the fact that someone may possibly include a record with a user ID that does not conform to existing users? I do not really expect this to happen, but I am used to ensure integrity at the database level.

I think you have to leave database referenced integrity in this case. Before adding DB record, your application code is checked for the presence of Active Directory account.

In theory, some users can go manually and write a SQL INCTR statement that refers to an illegal advertisement. Accounting But in practice, hopefully you are not giving direct table access to a group of users. If the application code is the only thing to reach DB, then the application code is validating the account before entering the row, and that verification code is checked, then you should be OK.

To be safe, you may have a night batch process that verifies all the rows in your reference table against the Active Directory. If it finds any inconsistency, it can send you an email, it will not prevent the violation of integrity, but at least it will tell you about them.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -