Skip to content

Commit

Permalink
Update assetName filter param to textSearch
Browse files Browse the repository at this point in the history
- Manifest API will be deprecating `assetName` in the future: get ahead of that with the param update in queries to API.
  • Loading branch information
adefee committed Sep 24, 2024
1 parent 40c7a9f commit 3bf1286
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
Binary file modified manifest_forescout.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "manifest-forescout-app",
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"main": "",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/manifest_resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def check_consent(params):

# Assemble asset list fetch URL
fetch_assets_url = manifest_base_url + "/v1/assets/" + urllib.parse.quote(
'?limit=10&filters=[{ "field": "assetName", "value": ["'+ givenModel + '", "'+ givenFirmware + '"] }, { "field": "assetActive", "value": "true" }]',
'?limit=10&filters=[{ "field": "textSearch", "value": ["'+ givenModel + '", "'+ givenFirmware + '"] }, { "field": "assetActive", "value": "true" }]',
safe='?&='
)

Expand Down
2 changes: 1 addition & 1 deletion src/manifest_resolve_old.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def perform_request(url, headers, ssl_context, method='GET'):

# Assemble our query string
assets_list_query_string = urllib.parse.quote(
'?limit=10&filters=[{ "field": "assetName", "value": "' + model + '@' + firmware + '" }, { "field": "assetActive", "value": "true" }]',
'?limit=10&filters=[{ "field": "textSearch", "value": "' + model + '@' + firmware + '" }, { "field": "assetActive", "value": "true" }]',
safe='?&='
)

Expand Down
2 changes: 1 addition & 1 deletion src/manifest_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_manifest(params):
model = 'm2025-le_firmware'
vendor = 'axis'
assets_list_query_string = urllib.parse.quote(
'?limit=10&filters=[{ "field": "assetName", "value": ["'+ model + '", "'+ firmware + '"] }, { "field": "assetActive", "value": "true" }]',
'?limit=10&filters=[{ "field": "textSearch", "value": ["'+ model + '", "'+ firmware + '"] }, { "field": "assetActive", "value": "true" }]',
safe='?&='
)

Expand Down
2 changes: 1 addition & 1 deletion src/system.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Manifest",
"version": "1.0.0",
"version": "1.0.1",
"author": "Manifest Cyber",
"testEnable": true,
"panels": [
Expand Down
2 changes: 1 addition & 1 deletion tests/manifest_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_manifest(params):
model = 'm2025-le_firmware'
vendor = 'axis'
assets_list_query_string = urllib.parse.quote(
'?limit=10&filters=[{ "field": "assetName", "value": ["'+ model + '", "'+ firmware + '"] }, { "field": "assetActive", "value": "true" }]',
'?limit=10&filters=[{ "field": "textSearch", "value": ["'+ model + '", "'+ firmware + '"] }, { "field": "assetActive", "value": "true" }]',
safe='?&='
)

Expand Down

0 comments on commit 3bf1286

Please sign in to comment.