Ataya Harmony
Use the Ataya Harmony integration to assign client which has not yet under assigned status by client imsi.
Utilities · Ataya
Details
| ID | Ataya Harmony |
|---|---|
| Provider | Atayalan Inc |
| Category | Utilities |
| From Version | 6.9.0 |
| Docker Image | demisto/python3:3.12.13.10116658 |
| Supported Modules | Agentix XSIAM |
README
Ataya Harmony
Use the Ataya Harmony integration, we can achieve the security access control which assign the user through the api access token.
Configure Ataya Harmony in Cortex
| Parameter | Description | Required |
|---|---|---|
| Harmony URL | e.g., https://ataya-harmony.com | True |
| API Token | Access token generated by Harmony organization setting page | True |
| Trust any certificate (not secure) | False | |
| Use system proxy settings | False |
Commands
You can execute these commands from the CLI, or in a playbook.
ataya-assign-user
After assign the user on ataya harmony, user can successfully register to harmony
Base Command
ataya-assign-user
Input
| Argument Name | Description | Required |
|---|---|---|
| imsi | A user imsi which need to be assigned | Required |
Command Example
!ataya-assign-user imsi="001010000000001"
Configuration parameters
url— Harmony URL (required)apiToken— (required)insecure— Trust any certificate (not secure)proxy— Use system proxy settings
Commands (1)
-
ataya-assign-userapprove user to access external network.
import pytest from Ataya import Client, assign_command from CommonServerPython import DemistoException MOCK_URL = "http://123-fake-api.com" MOCK_IMSI = "46666610000001" MOCK_ASSIGN_USER_RESPONSE = {"status": "assigned", "resources": [MOCK_IMSI]} MOCK_UNASSIGN_USER_RESPONSE = {"status": "unassigned", "resources": [MOCK_IMSI]} MOCK_GET_NODE_RESPONSE = {"count": 1} def test_assign_command(requests_mock): requests_mock.put(f"{MOCK_URL}/api/v1/mgmt/5gc/clientAction/setstatus", json=MOCK_ASSIGN_USER_RESPONSE) client = Client(api_key="123456789", base_url=MOCK_URL, proxy=False, verify=False) result = assign_command(client=client, imsi=MOCK_IMSI) assert MOCK_ASSIGN_USER_RESPONSE["status"] in result def test_assign_command_exception(): client = Client(api_key="123456789", base_url=MOCK_URL, proxy=False, verify=False) with pytest.raises(DemistoException, match="the imsi argument cannot be empty."): assign_command(client=client) def test_assign_command_assign_fail(requests_mock): requests_mock.put(f"{MOCK_URL}/api/v1/mgmt/5gc/clientAction/setstatus", json=MOCK_UNASSIGN_USER_RESPONSE) client = Client(api_key="123456789", base_url=MOCK_URL, proxy=False, verify=False) with pytest.raises(DemistoException, match="Assign User Fail"): assign_command(client=client, imsi=MOCK_IMSI) def test_get_node_api(requests_mock): requests_mock.get(f"{MOCK_URL}/api/v1/mgmt/5gc/networks/default/nodes", json=MOCK_GET_NODE_RESPONSE) client = Client(api_key="123456789", base_url=MOCK_URL, proxy=False, verify=False) result = client.getNode() assert result["count"] > 0 def test_module_command(requests_mock): from Ataya import test_module requests_mock.get(f"{MOCK_URL}/api/v1/mgmt/5gc/networks/default/nodes", json=MOCK_GET_NODE_RESPONSE) client = Client(api_key="123456789", base_url=MOCK_URL, proxy=False, verify=False) test_module(client=client)