Fix observability UIAM config and add CPS observability variant#260485
Fix observability UIAM config and add CPS observability variant#260485flash1293 merged 6 commits intoelastic:mainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@copilot Actually, it's way simpler, revert all the changes here and just add an observability variant of |
- Add observability_complete variant to cps_local serverless configs - Fix uiam_local observability config to import from observability base instead of security base - Add cloud.id override for UIAM API key conversion in observability config - Normalize CLI project type aliases (oblt→observability, es→search) in UIAM token creation to match ES serverless project types Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Would that replace the full PR? I still need a config to start observability with local loopback csp right? |
| // Normalizes Kibana CLI project type aliases (e.g. 'oblt', 'es') to the canonical | ||
| // ES project type names used in UIAM tokens and ES serverless configuration. | ||
| const projectTypeAliases = new Map<string, string>([ | ||
| ['oblt', 'observability'], | ||
| ['es', 'search'], | ||
| ]); |
There was a problem hiding this comment.
nit: we are doing the same conversion in mock-id-plugin:
kibana/packages/kbn-mock-idp-plugin/server/plugin.ts
Lines 42 to 48 in 56c9003
maybe we should import it in plugin from utils?
Oh, this change won't be covered by my PR, as loopback CPS requires a custom configuration. By the way, we added support for loopback CPS just to make quick local smoke testing easier, but I believe using this for anything serious, like automated tests or quality gates, is highly discouraged. It might break at any point without warning. @n1v0lg can keep me honest here. Is there any reason you cannot rely on a proper CPS testing setup that @dmlemeshko has built recently? If that isn't possible yet, can we improve it so you can leverage it instead?
Learned the hard way that it should be |
|
The use case is local smoke testing here. @dmlemeshko suggested this is how it should be done - the first version of this PR was just a small bash script that did the same thing. I really just want a handy oneliner to start a CPS setup for local testing, please let me merge a version 😁 |
Haha, okay, but you've been warned (though please change |
Yes, loopback definitely to be avoided 🙏 |
dmlemeshko
left a comment
There was a problem hiding this comment.
kbn/scout updates lgtm
Move projectTypeToAlias map from kbn-mock-idp-plugin into kbn-mock-idp-utils as the single source of truth, addressing review feedback. Also fix the UIAM normalization to map 'es' to 'elasticsearch' instead of 'search'. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Addressed review feedback:
@azasypkin could you take another look when you get a chance? Thanks! |
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]Public APIs missing comments
History
|
…heck * commit 'af66aadafa7470ca8ba3e3edd3793bde81fa4596': (31 commits) [Scout] Update test config manifests (elastic#260850) [SLO]: register alerts schema embeddable (elastic#256570) [Discover][Flyout] Update overview fields table with new prop headerVisibility set to false (elastic#260692) [AiButton/Security] Migrate ai-related buttons to use custom styles (elastic#259847) [One Workflow] Fix connector step icons falling back to generic plugs in YAML editor (elastic#260785) [Agent Builder] Dashboard skill: Guard against editing non-ESQL based panels (elastic#260714) Security quality gate Cypress cleanup - Periodic Pipeline (elastic#260820) [Search] Deprecate search indices in favour of index management (elastic#260210) Upgrade dependency @elastic/charts to v71.4.0 (elastic#260593) [Security Solution] [HDQ]: integration-based targeting and descriptor versioning (elastic#258418) docs(saved-objects): consolidate docs and document scoped vs system client (elastic#260743) Fix observability UIAM config and add CPS observability variant (elastic#260485) [Security Solution] Add "matched_indices_count" rule execution metric (elastic#259938) [SigEvents] Add callout with working promote action. (elastic#260433) [Alerting V2] Episode table actions (elastic#260195) [Automatic Migration] Add ability to skip Reference Set step in QRadar upload workflow (elastic#259959) [Rules] KQL-to-DSL conversion without data view produces incorrect queries for keyword fields for Metric threshold rule (elastic#260046) Update dependency lightningcss to v1.32.0 (main) (elastic#259017) Update postcss (main) (elastic#255420) Migrate server-side apm.addLabels to OTel dual-write helpers (elastic#259619) ...
…tic#260485) ## Summary - Adds `observability_complete` serverless config variant for `cps_local` - Fixes `uiam_local/observability_complete` to import from the observability base config instead of security - Adds `cloud.id` override for UIAM API key conversion in observability UIAM config - Fixes UIAM token `project_type` mismatch by normalizing CLI aliases (`oblt`→`observability`, `es`→`search`) in `@kbn/mock-idp-utils` ## Test plan - [ ] Run `node scripts/scout start-server --arch serverless --domain observability_complete --serverConfigSet cps_local` and verify SAML auth succeeds - [ ] Run `node scripts/scout start-server --arch serverless --domain security_complete --serverConfigSet cps_local` and verify it still works 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
observability_completeserverless config variant forcps_localuiam_local/observability_completeto import from the observability base config instead of securitycloud.idoverride for UIAM API key conversion in observability UIAM configproject_typemismatch by normalizing CLI aliases (oblt→observability,es→search) in@kbn/mock-idp-utilsTest plan
node scripts/scout start-server --arch serverless --domain observability_complete --serverConfigSet cps_localand verify SAML auth succeedsnode scripts/scout start-server --arch serverless --domain security_complete --serverConfigSet cps_localand verify it still works🤖 Generated with Claude Code