Skip to content

[FEATURE] GetAllRuleCategories API #328

@petardz

Description

@petardz

Is your feature request related to a problem?
Currently FE has all rule categories hardcoded.

What solution would you like?
We need capability for FE to fetch current rule categories from backend. We can implement new API GetAllRuleCategories which will return all categories enabled in backend:

GET /_plugins/_security_analytics/rules/categories

RESPONSE:

{
  "rule_categories": [
    {
      "key": "ad_ldap",
      "display_name": "AD/LDAP"
    },
    {
      "key": "dns",
      "display_name": "DNS logs"
    },
    {
      "key": "network",
      "display_name": "Network"
    },
    {
      "key": "apache_access",
      "display_name": "Apache access logs"
    },
    {
      "key": "cloudtrail",
      "display_name": "Cloud Trail logs"
    },
    {
      "key": "s3",
      "display_name": "S3 access logs"
    },
    {
      "key": "windows",
      "display_name": "Windows logs"
    },
    {
      "key": "linux",
      "display_name": "System logs"
    }
  ]
}

Response fields:

field description
key This value should be used as detectorType/ruleCategory param when calling APIs.(CreateDetector, SearchRules,...)
display_name Used on UI as label text

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions