Skip to content

Fix issues found while migrating to simplified API#17656

Merged
jsoriano merged 2 commits intoelastic:mainfrom
jsoriano:fix-test-configs-for-simplified-api
Mar 5, 2026
Merged

Fix issues found while migrating to simplified API#17656
jsoriano merged 2 commits intoelastic:mainfrom
jsoriano:fix-test-configs-for-simplified-api

Conversation

@jsoriano
Copy link
Copy Markdown
Member

@jsoriano jsoriano commented Mar 4, 2026

We are evaluating the migration of elastic-package to the "simplified" Package Policies API in Fleet (see elastic/elastic-package#3038 and elastic/elastic-package#3307).

This API brings benefits like improved validation and better handling of defaults and integration with Fleet functionality.

With the improved, stricter, validation we have found some issues in test configurations, mostly about required variables that seem to be incorrectly set, or not set at all.

This change attempts to fix the discovered issues.

Related issues

@andrewkroh andrewkroh added Integration:microsoft_exchange_online_message_trac Microsoft Exchange Online Message Trace Integration:mimecast Mimecast (Partner supported) Integration:sailpoint_identity_sc Sailpoint Identity Security Cloud Integration:ti_abusech abuse.ch Integration:ti_opencti OpenCTI Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels Mar 4, 2026
@elasticmachine
Copy link
Copy Markdown

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

@@ -6,6 +6,8 @@ vars:
client_secret: eweqweqwqew
api_host: http://{{Hostname}}:{{Port}}
token_url: http://{{Hostname}}:{{Port}}/oauth/token
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.

🟡 MEDIUM Undefined variable 'token_url' may cause validation error

Why: The 'token_url' variable is not defined in the package manifest. With the stricter simplified Fleet API validation, undefined variables may cause errors. The token URL is hardcoded in the CEL template as '{{api_host}}/oauth/token', so this test config variable serves no purpose.

Suggested change
token_url: http://{{Hostname}}:{{Port}}/oauth/token
input: cel
service: sailpoint
vars:
api_version: v2025
client_id: qwerty
client_secret: eweqweqwqew
api_host: http://{{Hostname}}:{{Port}}
token_scopes:
- sp:scopes:all
data_stream:
vars:
limit: 2
tags:
- forwarded
assert:
hit_count: 3

Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

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

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

cc @jsoriano

# reaching the select-type validation, so "false" fails include() against the
# string options. Force the legacy API until Fleet fixes the schema ordering.
# See https://github.com/elastic/kibana/issues/255976
policy_api_format: legacy
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

@chrisberkhout chrisberkhout left a comment

Choose a reason for hiding this comment

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

Thanks. Looks good.

@jsoriano jsoriano merged commit 944f4fe into elastic:main Mar 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Integration:microsoft_exchange_online_message_trac Microsoft Exchange Online Message Trace Integration:mimecast Mimecast (Partner supported) Integration:sailpoint_identity_sc Sailpoint Identity Security Cloud Integration:ti_abusech abuse.ch Integration:ti_opencti OpenCTI Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants