[beyondinsight_password_safe] Handle null password ion authentication#17411
Open
StacieClark-Elastic wants to merge 1 commit intoelastic:mainfrom
Open
Conversation
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
…n when password is null
751fd99 to
49b09d2
Compare
🚀 Benchmarks reportTo see the full report comment with |
💚 Build Succeeded
|
efd6
reviewed
Feb 16, 2026
Contributor
efd6
left a comment
There was a problem hiding this comment.
Suggest the following commit message
beyondinsight_password_safe: handle optional password in authentication
The BeyondInsight API does not always require a password for
authentication. Whether one is needed depends on the "User Password
Required" setting on the API registration in BeyondInsight. When no
password was configured, the integration failed because it assumed
the password field was always present in state.
ref: https://docs.beyondtrust.com/bips/docs/bi-cloud-configure-api
| url: http://{{Hostname}}:{{Port}}/BeyondTrust/api/public/v3 | ||
| apikey: test_api_key | ||
| username: testuser2 | ||
| password: null |
Contributor
There was a problem hiding this comment.
This has no default in the manifest, so it can be omitted here.
Suggested change
| password: null |
Contributor
There was a problem hiding this comment.
In the state construction I think the password field should be conditionally included
{{#if password}}
password: {{escape_string password}}
{{/if}}
| "Authorization": [ | ||
| sprintf("PS-Auth key=%s; runas=%s;", [state.apikey, state.username]) + | ||
| ((state.password != "") ? (sprintf(" pwd=[%s];", [state.password])) : ""), | ||
| ((state.?password.orValue("") != "") ? (sprintf(" pwd=[%s];", [state.password])) : ""), |
Contributor
There was a problem hiding this comment.
With conditional rendering into the config, this becomes has(state.password) ? …
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Added a check to handle null password during authentication
Checklist
changelog.ymlfile.