messaging - CQRS applying cross cutting concerns such as security -
messaging - CQRS applying cross cutting concerns such as security -
suppose have complex scheme there big trees of people. simple thoughts employees / manager relationship, many employees study 1 manager. in add-on manager there back upwards staff capable of acting on behalf of manager can manipulate managers' employees.
in cqrs scheme how model message hypothetical action of "edit employee" invoker of action back upwards staff. action can succeed if staff fellow member per manager security relationship acting upon employee in realm.
verifying security of involve querying database validate person beingness modified indeed within employee chain of manager.
where query occur? prior originating "edit employee" message?
if info upfront validated before originating message, in consistent scheme suppose before "edit employee" message has been processed separate action has occurred have removed authorization of user finish "edit employee" action. if the command handler doesn't validate security concerns of message, message still succeed though user no longer authorization execute it.
this seem imply double sided validation, similar ui validation & server side validation best course of study of action. method of completing validation seems though violate key tenets cqrs.
what approach(es) best when having deal these , other similar cross cutting concerns when using cqrs?
i'd skip cqrs exclusively domain , have web tier talk straight db tier (no messaging). simple optimistic concurrency should handle few conflicts happen.
security messaging cqrs domain-model cross-cutting-concerns
Comments
Post a Comment