Fix issues found while migrating to simplified API#17656
Fix issues found while migrating to simplified API#17656jsoriano merged 2 commits intoelastic:mainfrom
Conversation
|
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 | |||
There was a problem hiding this comment.
🟡 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.
| 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.
🚀 Benchmarks reportTo see the full report comment with |
💚 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 |
There was a problem hiding this comment.
Support for this added in elastic/package-spec#1103 and elastic/elastic-package#3307.
chrisberkhout
left a comment
There was a problem hiding this comment.
Thanks. Looks good.
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