assemblyline-ui 4.6.1.2__py3-none-any.whl → 4.7.0.dev45__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- assemblyline_ui/VERSION +1 -1
- assemblyline_ui/api/v4/user.py +0 -4
- assemblyline_ui/helper/result.py +13 -2
- assemblyline_ui/helper/submission.py +8 -17
- assemblyline_ui/security/ldap_auth.py +2 -39
- {assemblyline_ui-4.6.1.2.dist-info → assemblyline_ui-4.7.0.dev45.dist-info}/METADATA +1 -1
- {assemblyline_ui-4.6.1.2.dist-info → assemblyline_ui-4.7.0.dev45.dist-info}/RECORD +10 -10
- {assemblyline_ui-4.6.1.2.dist-info → assemblyline_ui-4.7.0.dev45.dist-info}/WHEEL +0 -0
- {assemblyline_ui-4.6.1.2.dist-info → assemblyline_ui-4.7.0.dev45.dist-info}/licenses/LICENCE.md +0 -0
- {assemblyline_ui-4.6.1.2.dist-info → assemblyline_ui-4.7.0.dev45.dist-info}/top_level.txt +0 -0
assemblyline_ui/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.7.0.dev45
|
assemblyline_ui/api/v4/user.py
CHANGED
|
@@ -223,10 +223,6 @@ def who_am_i(**kwargs):
|
|
|
223
223
|
if src.auto_select:
|
|
224
224
|
file_sources[hash_type]["auto_selected"].append(src.name)
|
|
225
225
|
|
|
226
|
-
# Backwards-compat: Merge sha256_sources with file_sources
|
|
227
|
-
[file_sources["sha256"]["sources"].append(x.name) for x in config.submission.sha256_sources
|
|
228
|
-
if CLASSIFICATION.is_accessible(kwargs['user']['classification'], x.classification)]
|
|
229
|
-
|
|
230
226
|
# Prepare submission profile configurations for UI
|
|
231
227
|
submission_profiles = {}
|
|
232
228
|
for name, profile in SUBMISSION_PROFILES.items():
|
assemblyline_ui/helper/result.py
CHANGED
|
@@ -6,8 +6,19 @@ from assemblyline.common.classification import InvalidClassification
|
|
|
6
6
|
from assemblyline.common.tagging import tag_dict_to_list
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
JSON_SECTIONS = [
|
|
10
|
-
|
|
9
|
+
JSON_SECTIONS = [
|
|
10
|
+
"GRAPH_DATA",
|
|
11
|
+
"IMAGE",
|
|
12
|
+
"JSON",
|
|
13
|
+
"KEY_VALUE",
|
|
14
|
+
"MULTI",
|
|
15
|
+
"ORDERED_KEY_VALUE",
|
|
16
|
+
"PROCESS_TREE",
|
|
17
|
+
"SANDBOX",
|
|
18
|
+
"TABLE",
|
|
19
|
+
"TIMELINE"
|
|
20
|
+
"URL",
|
|
21
|
+
]
|
|
11
22
|
|
|
12
23
|
|
|
13
24
|
class InvalidSectionList(Exception):
|
|
@@ -70,8 +70,8 @@ except socket.gaierror:
|
|
|
70
70
|
# download functions
|
|
71
71
|
class FileTooBigException(Exception):
|
|
72
72
|
def __init__(self, file_size, *args):
|
|
73
|
-
super().__init__(
|
|
74
|
-
|
|
73
|
+
super().__init__(f"File too big to be scanned ({file_size} > {config.submission.max_file_size}).", *args)
|
|
74
|
+
|
|
75
75
|
|
|
76
76
|
class InvalidUrlException(Exception):
|
|
77
77
|
pass
|
|
@@ -80,6 +80,7 @@ class InvalidUrlException(Exception):
|
|
|
80
80
|
class ForbiddenLocation(Exception):
|
|
81
81
|
pass
|
|
82
82
|
|
|
83
|
+
|
|
83
84
|
def apply_changes_to_profile(profile: SubmissionProfile, updates: dict, user: dict) -> dict:
|
|
84
85
|
validated_profile = profile.params.as_primitives(strip_null=True)
|
|
85
86
|
# Preserve the original updates for later comparison
|
|
@@ -378,21 +379,11 @@ def fetch_file(method: str, input: str, user: dict, s_params: dict, metadata: di
|
|
|
378
379
|
# No external sources specified and the file being asked for doesn't exist in the system
|
|
379
380
|
raise FileNotFoundError(f"{method.upper()} does not exist in Assemblyline")
|
|
380
381
|
else:
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
[x for x in config.submission.file_sources
|
|
387
|
-
if "sha256" in x.hash_types and
|
|
388
|
-
CLASSIFICATION.is_accessible(user['classification'], x.classification)
|
|
389
|
-
and x.name in default_external_sources]
|
|
390
|
-
else:
|
|
391
|
-
# Otherwise go based on the `file_sources` configuration
|
|
392
|
-
available_sources = [x for x in config.submission.file_sources
|
|
393
|
-
if method in x.hash_types and
|
|
394
|
-
CLASSIFICATION.is_accessible(user['classification'], x.classification)
|
|
395
|
-
and x.name in default_external_sources]
|
|
382
|
+
# Gather the list of available sources for this fetch method
|
|
383
|
+
available_sources = [x for x in config.submission.file_sources
|
|
384
|
+
if method in x.hash_types and
|
|
385
|
+
CLASSIFICATION.is_accessible(user['classification'], x.classification)
|
|
386
|
+
and x.name in default_external_sources]
|
|
396
387
|
|
|
397
388
|
for source in available_sources:
|
|
398
389
|
# Building final URL and data block
|
|
@@ -40,11 +40,6 @@ class BasicLDAPWrapper(object):
|
|
|
40
40
|
self.group_lookup_with_uid = ldap_config.group_lookup_with_uid
|
|
41
41
|
self.bind_user = ldap_config.bind_user
|
|
42
42
|
self.bind_pass = ldap_config.bind_pass
|
|
43
|
-
self.admin_dn = ldap_config.admin_dn
|
|
44
|
-
self.sm_dn = ldap_config.signature_manager_dn
|
|
45
|
-
self.si_dn = ldap_config.signature_importer_dn
|
|
46
|
-
|
|
47
|
-
self.classification_mappings = ldap_config.classification_mappings
|
|
48
43
|
|
|
49
44
|
self.cache = {}
|
|
50
45
|
self.get_obj_cache = {}
|
|
@@ -65,38 +60,6 @@ class BasicLDAPWrapper(object):
|
|
|
65
60
|
group_list.append(dn)
|
|
66
61
|
return group_list
|
|
67
62
|
|
|
68
|
-
def get_user_types(self, group_dn_list):
|
|
69
|
-
user_type = []
|
|
70
|
-
|
|
71
|
-
if self.admin_dn in group_dn_list:
|
|
72
|
-
user_type.append('admin')
|
|
73
|
-
elif self.sm_dn in group_dn_list:
|
|
74
|
-
user_type.append('signature_manager')
|
|
75
|
-
else:
|
|
76
|
-
user_type.append('user')
|
|
77
|
-
|
|
78
|
-
if self.si_dn in group_dn_list:
|
|
79
|
-
user_type.append('signature_importer')
|
|
80
|
-
|
|
81
|
-
return user_type
|
|
82
|
-
|
|
83
|
-
def get_user_classification(self, group_dn_list):
|
|
84
|
-
"""
|
|
85
|
-
Extend the users classification information with the configured group information
|
|
86
|
-
|
|
87
|
-
NB: This is not fully implemented at this point
|
|
88
|
-
|
|
89
|
-
:param group_dn_list: list of DNs the user is member of
|
|
90
|
-
:return:
|
|
91
|
-
"""
|
|
92
|
-
|
|
93
|
-
ret = CLASSIFICATION.UNRESTRICTED
|
|
94
|
-
for group_dn in group_dn_list:
|
|
95
|
-
if group_dn in self.classification_mappings:
|
|
96
|
-
ret = CLASSIFICATION.build_user_classification(ret, self.classification_mappings[group_dn])
|
|
97
|
-
|
|
98
|
-
return ret
|
|
99
|
-
|
|
100
63
|
def get_object(self, ldap_object, ldap_server=None):
|
|
101
64
|
cur_time = int(time.time())
|
|
102
65
|
cache_entry = self.get_obj_cache.get(ldap_object, None)
|
|
@@ -150,14 +113,14 @@ class BasicLDAPWrapper(object):
|
|
|
150
113
|
details['groups'] = self.get_group_list(user, dn, ldap_server=ldap_server)
|
|
151
114
|
|
|
152
115
|
# Generate user details based off auto-properties configuration
|
|
153
|
-
access, user_type, roles, organization, groups, remove_roles, quotas, classification, default_metadata = process_autoproperties(config.auth.ldap.auto_properties, details,
|
|
116
|
+
access, user_type, roles, organization, groups, remove_roles, quotas, classification, default_metadata = process_autoproperties(config.auth.ldap.auto_properties, details, CLASSIFICATION.UNRESTRICTED)
|
|
154
117
|
|
|
155
118
|
# if not user type was assigned
|
|
156
119
|
if not user_type:
|
|
157
120
|
# if also no roles were assigned
|
|
158
121
|
if not roles:
|
|
159
122
|
# Set the default user type
|
|
160
|
-
user_type =
|
|
123
|
+
user_type = ['user']
|
|
161
124
|
else:
|
|
162
125
|
# Because roles were assigned set user type to custom
|
|
163
126
|
user_type = ['custom']
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
assemblyline_ui/VERSION,sha256=
|
|
1
|
+
assemblyline_ui/VERSION,sha256=Z2ta08db4ev7E3qRUvrl-AOVvY9BtYJt3-5Ci2Z82sE,12
|
|
2
2
|
assemblyline_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
assemblyline_ui/app.py,sha256=ok96rpL0-Hb5amqa7ojhuB0boQceZG7E32NX6LZm-f4,7849
|
|
4
4
|
assemblyline_ui/config.py,sha256=4M5wpG_OwJPjZAjRWIUMMyF4KG30oJidNDnFM-IVJCw,8927
|
|
@@ -41,17 +41,17 @@ assemblyline_ui/api/v4/submission.py,sha256=WxMY00ePNdOMFXyu9j38sxpe0vT26u-Z_biM
|
|
|
41
41
|
assemblyline_ui/api/v4/submit.py,sha256=5nfuX6Ud3FMdDGIOgBAdcb6kpMbINk750Ph5yp90O8c,18372
|
|
42
42
|
assemblyline_ui/api/v4/system.py,sha256=4JhLhpmPfKzbXiHsBoJxSZP-ibu-lnmk4FrtaLExaRM,24861
|
|
43
43
|
assemblyline_ui/api/v4/ui.py,sha256=J3OoLEETlFgeq7DbSlubTPebMQJOUx6UwRIt8mCBYbQ,11508
|
|
44
|
-
assemblyline_ui/api/v4/user.py,sha256=
|
|
44
|
+
assemblyline_ui/api/v4/user.py,sha256=94yE9rq2XnWgf1N8AEHPbMWiP23yCgzFvZ1nm0Ka7f0,47890
|
|
45
45
|
assemblyline_ui/api/v4/webauthn.py,sha256=ouVWMMd0aMnNV5iaKbWY1AnsUE5_BKAtaUg9j77Rvow,4875
|
|
46
46
|
assemblyline_ui/api/v4/workflow.py,sha256=Uz50960KyvFDm39NKYNSq5OXT0CA0u_FO5xPP61aYiQ,10579
|
|
47
47
|
assemblyline_ui/helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
48
|
assemblyline_ui/helper/discover.py,sha256=oJBML1dQl0H2Ic-lm5jI4YWIpm9RRW-mGT5sP-2tb9c,1686
|
|
49
49
|
assemblyline_ui/helper/oauth.py,sha256=0xd2H2L1r2vrkBOn9Q77TqNB1T11cXxAQLbya_EDtLs,5168
|
|
50
|
-
assemblyline_ui/helper/result.py,sha256=
|
|
50
|
+
assemblyline_ui/helper/result.py,sha256=SBVttN4kXLjTI_0YKAlsCnLYnfAcoKU_76gT9c6ErBI,4966
|
|
51
51
|
assemblyline_ui/helper/search.py,sha256=ri3IpUEnNyzrYYIx0Eb-2lQG-42QhG1YFUDAtpMB5-g,1762
|
|
52
52
|
assemblyline_ui/helper/service.py,sha256=NSNK25rVUpsF7ElfzWZl4Ro7VQItmEB_JbBfnhSxmwo,5176
|
|
53
53
|
assemblyline_ui/helper/signature.py,sha256=PUiQk56QoY5Ye2Pg3jRNgOT2i2ZqTWkk_0dv-Bfy9vI,899
|
|
54
|
-
assemblyline_ui/helper/submission.py,sha256=
|
|
54
|
+
assemblyline_ui/helper/submission.py,sha256=fZ-XuH1TkiyzPOJMUAYmcIHHXbGWANDknbeWsHQc-Ms,32632
|
|
55
55
|
assemblyline_ui/helper/user.py,sha256=d5umOq5GcvsIUuxjeW4_2xbzjEwoAdcSyHswpE5rCO4,17462
|
|
56
56
|
assemblyline_ui/helper/ai/__init__.py,sha256=m2Nb3UgSiXNz3l6rUX17BlKwT1YLjAHn7W87SWP8e9o,1052
|
|
57
57
|
assemblyline_ui/helper/ai/base.py,sha256=0aAecNUh6jxuqlNoZzZDbnPMuqZUzh5hCKt1hpdFvLg,8801
|
|
@@ -60,7 +60,7 @@ assemblyline_ui/helper/ai/openai.py,sha256=37MNSMiJha9SVCDGIqYGF2Y-pYjhulhvzHPuA
|
|
|
60
60
|
assemblyline_ui/security/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
61
|
assemblyline_ui/security/apikey_auth.py,sha256=-KX7Ps1XYTP7Bgv6Dn290IEMJ7UBxHFJihILMpdf9zs,2214
|
|
62
62
|
assemblyline_ui/security/authenticator.py,sha256=Lra3F9HJ2PU-A9lRY5_purqkUXZ3QRbKf8mDc6Zdq4o,7911
|
|
63
|
-
assemblyline_ui/security/ldap_auth.py,sha256=
|
|
63
|
+
assemblyline_ui/security/ldap_auth.py,sha256=xEDPA3wD_HKNqdMYenBijM_ZvP8G-CUHyGoWYiBSeP4,10097
|
|
64
64
|
assemblyline_ui/security/oauth_auth.py,sha256=SrPHUX6A_J9rrQsZaZDdkHQ1nn9WvbYmsjEp4gPcIaU,4701
|
|
65
65
|
assemblyline_ui/security/saml_auth.py,sha256=w5GAhGDJzW2VzjPhBLM6v2dfprcqSoG8TTG06msEfa8,2241
|
|
66
66
|
assemblyline_ui/security/second_factor_auth.py,sha256=l3SjJ5vn3bYxkPTtKWLewbZUSWtm1REqllzZvvsh9BU,2953
|
|
@@ -74,8 +74,8 @@ assemblyline_ui/sio/live_submission.py,sha256=mS0oGO5rEA8PLa8kjBcodOG-Q0CG4SpYAo
|
|
|
74
74
|
assemblyline_ui/sio/retrohunt.py,sha256=vlH_x6Rb4pm3GM1sNLH1C42-NVR3VoAsEfkAu3L30fY,2146
|
|
75
75
|
assemblyline_ui/sio/status.py,sha256=_Bxf1KLPOJEUIk4J9_j9fzvQWUXqSIT9xnJKhT1hhuc,1980
|
|
76
76
|
assemblyline_ui/sio/submission.py,sha256=IYJuGz73HK9HtYfqc-gWW8tc1lt5VZ62Qn64AaGGtm8,2222
|
|
77
|
-
assemblyline_ui-4.
|
|
78
|
-
assemblyline_ui-4.
|
|
79
|
-
assemblyline_ui-4.
|
|
80
|
-
assemblyline_ui-4.
|
|
81
|
-
assemblyline_ui-4.
|
|
77
|
+
assemblyline_ui-4.7.0.dev45.dist-info/licenses/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
|
|
78
|
+
assemblyline_ui-4.7.0.dev45.dist-info/METADATA,sha256=aBDpRp-qLOlAoaBOta_MYAHWfFn933YYd6D21YEdQ84,8174
|
|
79
|
+
assemblyline_ui-4.7.0.dev45.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
80
|
+
assemblyline_ui-4.7.0.dev45.dist-info/top_level.txt,sha256=WLa7-PKLJTbMUbKKU3q3kg5_uAV67hss5kC71PAbIeg,16
|
|
81
|
+
assemblyline_ui-4.7.0.dev45.dist-info/RECORD,,
|
|
File without changes
|
{assemblyline_ui-4.6.1.2.dist-info → assemblyline_ui-4.7.0.dev45.dist-info}/licenses/LICENCE.md
RENAMED
|
File without changes
|
|
File without changes
|