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

forgerock: use dynamic mappings for object fields #8056

Merged
merged 1 commit into from Oct 3, 2023

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Oct 3, 2023

Proposed commit message

See title.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@elasticmachine
Copy link

elasticmachine commented Oct 3, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-10-03T02:57:09.108+0000

  • Duration: 20 min 7 sec

Test stats 🧪

Test Results
Failed 0
Passed 56
Skipped 0
Total 56

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

type: object
object_type: keyword
object_type_mapping_type: '*'
description: Details around the response status.
- name: forgerock.request.detail.action
Copy link
Contributor Author

@efd6 efd6 Oct 3, 2023

Choose a reason for hiding this comment

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

I left the specific forgerock.request.detail.* fields here and below for the documentation they provide. It's not clear to me whether this breaks the dynamic mapping. The same situation is in the specific forgerock.response.detail.* fields below.

It looks to me like it is OK.

      "dynamic_templates": [
        {
          "forgerock.request.detail.*": {
            "path_match": "forgerock.request.detail.*",
            "mapping": {
              "type": "keyword"
            }
          }
        },
        {
          "forgerock.http.request.headers.*": {
            "path_match": "forgerock.http.request.headers.*",
            "mapping": {
              "type": "keyword"
            }
          }
        },
        {
          "forgerock.http.request.queryParameters.*": {
            "path_match": "forgerock.http.request.queryParameters.*",
            "mapping": {
              "type": "keyword"
            }
          }
        },
        {
          "forgerock.response.detail.*": {
            "path_match": "forgerock.response.detail.*",
            "mapping": {
              "type": "keyword"
            }
          }
        },
        {
          "strings_as_keyword": {
            "match_mapping_type": "string",
            "mapping": {
              "ignore_above": 1024,
              "type": "keyword"
            }
          }
        }
      ],

description: Specifies the JSON representation of the object prior to the activity.
- name: forgerock.before.sunAMAuthInvalidAttemptsData
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleted as it is only here for testing AFAICS. Same for the ... .after. ... case.

Copy link
Contributor Author

@efd6 efd6 Oct 3, 2023

Choose a reason for hiding this comment

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

      "dynamic_templates": [
        {
          "forgerock.before.*": {
            "path_match": "forgerock.before.*",
            "mapping": {
              "type": "keyword"
            }
          }
        },
        {
          "forgerock.after.*": {
            "path_match": "forgerock.after.*",
            "mapping": {
              "type": "keyword"
            }
          }
        },
        {
          "strings_as_keyword": {
            "match_mapping_type": "string",
            "mapping": {
              "ignore_above": 1024,
              "type": "keyword"
            }
          }
        }
      ],

@elasticmachine
Copy link

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (11/11) 💚
Files 100.0% (11/11) 💚
Classes 100.0% (11/11) 💚
Methods 100.0% (101/101) 💚 0.699
Lines 96.489% (962/997) 👍 24.226
Conditionals 100.0% (0/0) 💚

@efd6 efd6 marked this pull request as ready for review October 3, 2023 03:48
@efd6 efd6 requested a review from a team as a code owner October 3, 2023 03:48
@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

Copy link
Contributor

@kgeller kgeller left a comment

Choose a reason for hiding this comment

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

LGTM

If you're interested in even more validation, I think we have creds in the vault for the testing instance they gave access to for development

@efd6 efd6 merged commit 63e43da into elastic:main Oct 3, 2023
4 checks passed
@elasticmachine
Copy link

Package forgerock - 1.11.0 containing this change is available at https://epr.elastic.co/search?package=forgerock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[forgerock] Use more specific field mappings
3 participants