oasis-open / openc2-oif-orchestrator

OASIS TC Open Repository: Supports development OpenC2 Integration Framework (OIF) Orchestrator
https://github.com/oasis-open/openc2-oif-orchestrator
Apache License 2.0
4 stars 8 forks source link

Orchestrator fails when using HTTP protocol #62

Open mvle opened 2 years ago

mvle commented 2 years ago

Referring to the latest in develop https://github.com/ScreamBun/openc2-oif-orchestrator

The error is trans.path doesn't exist for HTTP. Not sure if the below is the correct fix but I put it here for your reference.

diff --git a/orchestrator/producer-core/producer_server/command/views/actions.py b/orchestrator/producer-core/producer_server/command/views/actions.py
index 04daa4a..aa1ad19 100644
--- a/orchestrator/producer-core/producer_server/command/views/actions.py
+++ b/orchestrator/producer-core/producer_server/command/views/actions.py
@@ -190,7 +190,7 @@ def get_headers(proto: Protocol, com: SentHistory, proto_acts: List[Actuator], s
                     **({'format': fmt} if fmt else {})
                 )

-            if trans.protocol.name.startswith('HTTP'):
+            if trans.protocol.name.startswith('HTTPS'):
                 dst.update(
                     path=trans.path
                 )
ScreamBun commented 2 years ago

Yes that is one option to correct the issue.

The HTTP transport was incorporated into the HTTPS transport for development use. This instance seems to have been missed during the update of the transport.

ScreamBun commented 1 year ago

We are planning to refresh this area of the app in the very near future. We will make sure to incorporate this finding in our refreshed code base. Keeping this open, until it is included in development of the refreshed code base.