Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

way to verify tenant isolation #55

Open
adamfoneil opened this issue Jun 9, 2021 · 1 comment
Open

way to verify tenant isolation #55

adamfoneil opened this issue Jun 9, 2021 · 1 comment

Comments

@adamfoneil
Copy link
Owner

adamfoneil commented Jun 9, 2021

copied from adamfoneil/SqlServerUtil#13

Would be neat if there was an easy way to verify tenant isolation after a migration. In a complex database, it can be hard to know if you mapped every FK as necessary. When you craft a migration in code with SqlMigrator, you simply go from memory/intuition about what FKs need to be mapped.

I'm picturing a helper class that can inspect all the FKs in a database and traverse them back to a tenant root table in order to verify that FKs don't cross tenant boundaries. I think this would output a large SQL script you can run yourself in SSMS to verify tenant isolation.

@adamfoneil
Copy link
Owner Author

adamfoneil commented Jun 9, 2021

will be a ScriptGen feature I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant