chg: [AIL2AIL Sync] update exchange format

pull/586/head
Terrtia 2022-06-02 16:42:20 +02:00
parent f4102dd242
commit b9ad0b1bce
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
2 changed files with 10 additions and 6 deletions

View File

@ -1205,11 +1205,13 @@ def create_ail_stream(Object):
'type': Object.get_type()} 'type': Object.get_type()}
# OBJECT META # OBJECT META
ail_stream['meta'] = {'ail_mime-type': 'text/plain'} ail_stream['meta'] = {'ail:mime-type': 'text/plain'}
ail_stream['meta']['compress'] = 'gzip'
ail_stream['meta']['encoding'] = 'base64'
ail_stream['meta']['ail:id'] = Object.get_id() ail_stream['meta']['ail:id'] = Object.get_id()
ail_stream['meta']['ail:tags'] = Object.get_tags() ail_stream['meta']['tags'] = Object.get_tags()
# GLOBAL PAYLOAD # GLOBAL META
ail_stream['meta']['ail:uuid'] = get_ail_uuid() ail_stream['meta']['uuid_org'] = get_ail_uuid()
# OBJECT PAYLOAD # OBJECT PAYLOAD
ail_stream['payload'] = Object.get_ail_2_ail_payload() ail_stream['payload'] = Object.get_ail_2_ail_payload()

View File

@ -637,8 +637,7 @@ class Item(AbstractObject):
return content.decode() return content.decode()
def get_ail_2_ail_payload(self): def get_ail_2_ail_payload(self):
payload = {'raw': self.get_gzip_content(b64=True), payload = {'raw': self.get_gzip_content(b64=True)}
'compress': 'gzip'}
return payload return payload
# # TODO: # # TODO:
@ -667,6 +666,9 @@ class Item(AbstractObject):
def get_svg_icon(self): def get_svg_icon(self):
pass pass
def get_misp_object(self):
pass
############################################################################ ############################################################################
############################################################################ ############################################################################
############################################################################ ############################################################################