Skip to content

teleport: fix dot_expander crash and label mapping conflicts#19343

Merged
efd6 merged 2 commits into
elastic:mainfrom
efd6:19239-teleport
Jun 4, 2026
Merged

teleport: fix dot_expander crash and label mapping conflicts#19343
efd6 merged 2 commits into
elastic:mainfrom
efd6:19239-teleport

Conversation

@efd6
Copy link
Copy Markdown
Contributor

@efd6 efd6 commented Jun 3, 2026

Proposed commit message

teleport: fix dot_expander crash and label mapping conflicts

Two related fixes for Teleport audit pipeline failures:

1. Stash the scalar teleport.audit.addr into a temporary field before
dot_expander runs, then restore it after addr.local and addr.remote
have been expanded, extracted, and removed. This prevents the crash
when addr coexists with addr.local/addr.remote in port forwarding
events (code T3003S).

2. Move the renames of kubernetes_labels, kube_labels, and
server_labels from event-groups into default.yml so they execute
unconditionally. These fields contain dotted keys (e.g.
"cluster.coreweave.cloud/type") that are safe in their flattened
target mapping but cause mapping conflicts under dynamic mapping if
event-groups fails and the rename is skipped.

The new test cases are based on existing test events: the port.local
event extends the T3003I port event with addr.local/addr.remote
fields added, and the kube.create event extends an existing
kube_labels event with a colliding dotted label key.

Fixes #19239
Fixes #19243

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.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@efd6 efd6 self-assigned this Jun 3, 2026
@efd6 efd6 added bugfix Pull request that fixes a bug issue Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Integration:teleport Teleport labels Jun 3, 2026
@efd6 efd6 force-pushed the 19239-teleport branch from edc71f8 to 86c3191 Compare June 3, 2026 02:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

✅ Elastic Docs Style Checker (Vale)

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

Two related fixes for Teleport audit pipeline failures:

1. Stash the scalar teleport.audit.addr into a temporary field before
dot_expander runs, then restore it after addr.local and addr.remote
have been expanded, extracted, and removed. This prevents the crash
when addr coexists with addr.local/addr.remote in port forwarding
events (code T3003S).

2. Move the renames of kubernetes_labels, kube_labels, and
server_labels from event-groups into default.yml so they execute
unconditionally. These fields contain dotted keys (e.g.
"cluster.coreweave.cloud/type") that are safe in their flattened
target mapping but cause mapping conflicts under dynamic mapping if
event-groups fails and the rename is skipped.

The new test cases are based on existing test events: the port.local
event extends the T3003I port event with addr.local/addr.remote
fields added, and the kube.create event extends an existing
kube_labels event with a colliding dotted label key.

Fixes elastic#19239
Fixes elastic#19243
@efd6 efd6 force-pushed the 19239-teleport branch from 86c3191 to 00978ea Compare June 3, 2026 03:08
@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@efd6 efd6 changed the title teleport: fix dot_expander crash when addr coexists with addr.local/addr.remote teleport: fix dot_expander crash and label mapping conflicts Jun 3, 2026
@efd6 efd6 marked this pull request as ready for review June 3, 2026 03:31
@efd6 efd6 requested review from a team as code owners June 3, 2026 03:31
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

Comment on lines +85 to +99
- rename:
field: teleport.audit.kubernetes_labels
target_field: teleport.audit.kubernetes.labels
ignore_missing: true
ignore_failure: true
- rename:
field: teleport.audit.kube_labels
target_field: teleport.audit.kubernetes.labels
ignore_missing: true
ignore_failure: true
- rename:
field: teleport.audit.server_labels
target_field: teleport.audit.server.labels
ignore_missing: true
ignore_failure: true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There are references to the fields teleport.audit.kubernetes_labels, teleport.audit.kube_labels, and teleport.audit.server_labels inside event-groups.yml. Should they be removed now its done inside default.yml?

@efd6 efd6 requested a review from kcreddy June 4, 2026 08:12
Copy link
Copy Markdown
Contributor

@kcreddy kcreddy left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

✅ All changelog entries have the correct PR link.

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

cc @efd6

@efd6 efd6 merged commit 2a544b3 into elastic:main Jun 4, 2026
9 checks passed
@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

Package teleport - 1.6.2 containing this change is available at https://epr.elastic.co/package/teleport/1.6.2/

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

Labels

bugfix Pull request that fixes a bug issue Integration:teleport Teleport Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

Projects

None yet

3 participants