Skip to content

Conversation

@cvasilica
Copy link

@cvasilica cvasilica commented Dec 17, 2024

  • Checked what documentation and examples needs to be updated
  • Will make the changes related to the tenant_id examples and documentation

Closes #44

Micah Pegman and others added 6 commits December 17, 2024 15:25
Signed-off-by: Micah Pegman <mpegman@octolabs.io>
Signed-off-by: Cristian Vasilica <cvasilica@secureworks.com>
replaced tenant_id with tenant.id as per JIRA SECOPS-1646

Signed-off-by: Cristian Vasilica <cvasilica@secureworks.com>
replaced tenant_id with tenant.id as per JIRA SECOPS-1646

Signed-off-by: Cristian Vasilica <cvasilica@secureworks.com>
replaced tenant_id with tenant.id as per JIRA SECOPS-1646

Signed-off-by: Cristian Vasilica <cvasilica@secureworks.com>
Signed-off-by: Cristian Vasilica <cvasilica@secureworks.com>
replaced tenant_id with tenant.id as per JIRA SECOPS-1646

Signed-off-by: Cristian Vasilica <cvasilica@secureworks.com>
@cvasilica cvasilica force-pushed the SECOPS-1646_examples_modificationV2 branch from c628093 to fb12436 Compare December 17, 2024 13:25
@cvasilica cvasilica changed the title Secops 1646 examples modification v2 Examples modification v2 Dec 17, 2024
Copy link
Member

@mpegman-scwx mpegman-scwx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cvasilica tenant_id as a results field from Taegis has not completely gone away. Only Alerts has deprecated this field in favor of a TenantV4 object.

add_threat_intel,
correlations=[get_ti_pubs],
tenant_id=TENANT,
tenant.id=TENANT,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this will still be tenant_id as it is the function parameter and not a parsed column from a result set.

https://github.com/secureworks/taegis-magic/blob/main/taegis_magic/pandas/context.py#L492

" add_threat_intel,\n",
" correlations=[get_ti_pubs],\n",
" tenant_id=TENANT,\n",
" tenant.id=TENANT,\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this will still be tenant_id as it is the function parameter and not a parsed column from a result set.

https://github.com/secureworks/taegis-magic/blob/main/taegis_magic/pandas/context.py#L492

"This pandas pipe function will work when there are the following columns in the DataFrame:\n",
"- A column name that contains `host_id`\n",
"- A column name that contains `tenant.id` (or `tenant_id`)\n",
"- A column name that contains `tenant.id`\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dual column lookup is still correct. Events still use tenant_id, it was alerts that deprecated the tenant_id string in favor of a Tenant object.

Event schemas can be verified using the following snippet, change the RuleEventType to one of the options here:

from taegis_sdk_python import GraphQLService
from taegis_sdk_python.services.rules.types import RuleEventType

service = GraphQLService()

results = service.rules.query.filter_keys(RuleEventType.PROCESS)
print(results)

https://github.com/secureworks/taegis-magic/blob/main/taegis_magic/pandas/assets.py#L124

https://github.com/secureworks/taegis-sdk-python/blob/main/taegis_sdk_python/services/alerts/types.py#L3111

"#### Asset Data with Taegis Events\n",
"\n",
"- Unlike Alert DataFrames, Taegis Event DataFrames only need the `tenant_id` and `host_id` fields"
"- Unlike Alert DataFrames, Taegis Event DataFrames only need the `tenant.id` and `host_id` fields"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Events still use the tenant_id string.

" 'enrichSummary',\n",
" 'host_id',\n",
" 'tenant_id'\n",
" 'tenant.id'\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Events still use the tenant_id string.

" add_threat_intel,\n",
" correlations=[get_ti_pubs],\n",
" tenant_id=TENANT,\n",
" tenant.id=TENANT,\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this will still be tenant_id as it is the function parameter and not a parsed column from a result set.

https://github.com/secureworks/taegis-magic/blob/main/taegis_magic/pandas/context.py#L492

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation Update: tenant_id entry needs to be swapped

2 participants