Skip to content

[Integration]: BeyondInsight Password Safe - “undeclared reference to 'sprintf'” compilation error in Elastic 8.18.3 #3415

@felipematamoros-nowbit

Description

@felipematamoros-nowbit

Type of issue

None

What documentation page is affected

https://www.elastic.co/docs/reference/integrations/beyondinsight_password_safe

What happened?

While configuring the BeyondInsight Password Safe integration in Elastic Stack 8.18.3, the input fails to initialize due to a compilation error in the integration’s internal script validation step.

The Elastic Agent shows the following error when validating the input:

Inputs

1 beyondinsight_password_safe-1

Needs attention

^ ERROR:
accessing config failed to check program: failed
failed to check program: failed compilation:
ERROR: :206:20: undeclared reference to 'sprintf' (in container ") |
sprintf("PS-Auth key=%s; runas=%s;", [state.apikey, state.username]) + |
:207:47: undeclared reference to 'sprintf' (in container ") |
((state.password != "") ? (sprintf(" pwd=[%s];", [state.password])) : ""), |
^ accessing config failed to check program: failed
compilation: ERROR: :92:20: undeclared reference to 'sprintf' (in container ") |
sprintf("PS-Auth key=%s; runas=%s;", [state.apikey, state.username]) + ...

The error occurs because the integration package internally uses the sprintf() function to build the PS-Auth header string, but this function is not declared or supported in the script execution environment used by Elastic integrations (the CEL expression engine).

As a result, the BeyondInsight Password Safe integration cannot start, and the input remains in the “Needs attention” state.

Root cause

The integration’s script block attempts to dynamically build the authentication header using sprintf, as seen in the error trace:

sprintf("PS-Auth key=%s; runas=%s;", [state.apikey, state.username]) +
((state.password != "") ? (sprintf(" pwd=[%s];", [state.password])) : "")

Additional info

No response

Metadata

Metadata

Assignees

Labels

Team:ExperienceIssues owned by the Experience Docs Teamcommunitysource:webIssues originating from the elastic.co docs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions