mozilla / seasponge

:pineapple: SeaSponge is an accessible threat modelling tool from Mozilla
http://mozilla.github.io/seasponge/
Mozilla Public License 2.0
275 stars 63 forks source link

Cannot create flows to multiple targets #64

Closed sbmilburn closed 9 years ago

sbmilburn commented 9 years ago

Scenario #1 - Need to be able to create a load balancer object and then 1..N webservers. Tried to have the flow go to mutliple webservers but currently it only allows you to select a single target.

Secenario #2 - Some of our web applications talk to multiple databases. One for OLTP transactions and one for pulling reports. having the ability to have the link a flow to more than one target location would be helpful.

Glavin001 commented 9 years ago

I can see your use cases being very common and high priority. Thank you for sharing.

We should be able to use jsPlumb's maxconnections setting for sources to resolve this. See https://jsplumbtoolkit.com/doc/connections.html for more details. The applicable section of SeaSponge code is at https://github.com/mozilla/seasponge/blob/master/app/scripts/stencils/base.coffee#L129-L147

I'll try and do some testing with this later today.

Glavin001 commented 9 years ago

This demo appears to have multiple output connections from single element: https://jsplumbtoolkit.com/demo/sourcesAndTargets/dom.html

Glavin001 commented 9 years ago

I have a working demo of multiple connections from source endpoints: image

We should look into the filter function and how certain endpoints can only connect with another subset of endpoints. The more feedback we receive and example use cases the better we can make this. See https://github.com/sporritt/jsPlumb/blob/master/demo/sourcesAndTargets/demo.js#L63-L70 for example of filter.

Glavin001 commented 9 years ago

Pushed this feature. Should be available soon. Let me know if it works for you. Thanks!