tufts-tsp / tmnt

Tufts Security & Privacy Lab's Threat Modeling Naturally Tool
https://tsp.eecs.tufts.edu/tmnt
Other
0 stars 0 forks source link

Add example DSL/Django/HTML bridge #101

Closed dvotipka closed 4 months ago

dvotipka commented 4 months ago

Modify the TMNT controller, django app, and html to create a persistent memory object with the threat model (loadable from memory) and add changes from the UI.

ZenW00kie commented 4 months ago

Error that I received when trying to create an actor using the new NaturalEngine events.

New Actor
New User
False
Internal Server Error: /tmnt/api/add_actor
Traceback (most recent call last):
  File "/home/zenw00kie/anaconda3/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/home/zenw00kie/anaconda3/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zenw00kie/dev/tmnt/ui/tmnt/views.py", line 131, in add_actor
    engine_status = naturalengine_client.NewEvent(event)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zenw00kie/anaconda3/lib/python3.11/site-packages/grpc/_channel.py", line 1181, in __call__
    return _end_unary_response_blocking(state, call, False, None)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zenw00kie/anaconda3/lib/python3.11/site-packages/grpc/_channel.py", line 1006, in _end_unary_response_blocking
    raise _InactiveRpcError(state)  # pytype: disable=not-instantiable
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    status = StatusCode.INTERNAL
    details = "Failed to serialize response!"
    debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"Failed to serialize response!", grpc_status:13, created_time:"2024-06-19T14:29:46.233392745+00:00"}"
>
[19/Jun/2024 14:29:46] "POST /tmnt/api/add_actor HTTP/1.1" 500 77867