Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user inventory dashboard #387

Conversation

hardikhdholariya
Copy link
Contributor

  • Added the user inventory custom command to add, clean, merge and get the user details from lookup.
  • Updated the saved searches related to user inventory.
  • Added user inventory dashboard.
  • Added macro on the cyences setup page.

@@ -3,6 +3,8 @@ let allMacros = [
section: 'Device Inventory V2',
macros: [
{name: 'cs_device_inventory_hostname_postfixes' },
{name: 'cs_user_inventory_user_postfixes' },
{name: 'cs_user_inventory_exclude_users', description: 'To exclude the specific users, add it inside the brackets by comma separated' },
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add maybe 2 examples to explain the format.

# Put it with double quote on both side (compulsory)

[cs_user_inventory_exclude_users]
definition = NOT user IN ("*log4shell*", "$*")
Copy link
Collaborator

Choose a reason for hiding this comment

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

It should be *$ (name that ends with dollar), right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

username ends with $ has diff username as well, hence I've added @DC.REPUBLICOFTEA.COM to user_postfix macro to combine both.
image
Not sure but if it is not useful then we can remove it by adding *$ and *[email protected] to the user_exclude macro.

Copy link
Collaborator

Choose a reason for hiding this comment

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

How $* would work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually, It's for log4shell nessus users as 2 values are coming starting with $ but not have log4shell keyword in it.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can remove log4shell as $* covers everything.

Copy link
Collaborator

Choose a reason for hiding this comment

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

got it.

cleanup_maxindextime = Option(name="maxindextime", require=False, default=None, validate=validators.Float()) # default forseeable future
target_user = Option(name="target_user", require=False, default="")
users_to_merge = Option(name="users_to_merge", require=False, default=None)
# cleanup_ip_mintime = Option(name="ipmintime", require=False, default=None, validate=validators.Float()) # default past 30 days
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this comments.

@@ -10,7 +10,7 @@


Dev Details
* It now stores everything inside a Python pickle file instead of a lookup
* It now stores everything inside a lookup.
Copy link
Collaborator

Choose a reason for hiding this comment

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

inside a kvstore collection

@hardikhdholariya hardikhdholariya merged commit 6602ff7 into CY-500-implement-device-inventoy-v2 Sep 12, 2023
1 check failed
@VatsalJagani VatsalJagani deleted the add-user-inventory-dashboard branch December 19, 2023 18:06
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.

2 participants