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

Securing instances rather than types #241

Open
smithmx opened this issue Jun 18, 2019 · 2 comments
Open

Securing instances rather than types #241

smithmx opened this issue Jun 18, 2019 · 2 comments

Comments

@smithmx
Copy link
Contributor

smithmx commented Jun 18, 2019

If I have a command to UpdateFoo, there might be two different levels of security. Do you have the role needed to execute instances of UpdateFoo (this is what we currently have.) However, we might also need to check are you allowed to update the particular instance of Foo that you are wanting to change. This isn't checking against the type of UpdateFoo but finding checking if you are allowed to update Foo with FooId.

We probably want some kind of instance securable to distinguish from the type securable / namespace securable. However, this also has an impact on our pipeline. With current securables being against the structure of the command / query, then we can perform it at the beginning of the pipeline. When we are looking at the content of the command, you will want to do it after the Input Validation and (probably) after the Business Validation. That is so you don't have to do any guard checks for an invalid command.

I'm not sure of the best way to do this with the fluent interface, since the rule will probably be specifically implemented for every type, so probably just expecting a predicate.

┆Issue is synchronized with this Asana task

@smithmx
Copy link
Contributor Author

smithmx commented Jun 18, 2019

Related to #7

@smithmx
Copy link
Contributor Author

smithmx commented Jun 18, 2019

We can work around this for the moment by putting the instance authorization logic into the business validator.

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

No branches or pull requests

1 participant