Repository navigation
Warn when bundle run_as may lack file/resource access - #7313
lennartkats-db wants to merge 3 commits into
Conversation
|
Commit: Regression test reportSelected 12 changed tests (limit=20, 0 not selected) 21 tests: regression=19 unreleased=0 coverage=2 failing=0
TestAccept/bundle/migrate/command/runas/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/allowed/regular_user/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/allowed/regular_user/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/allowed/service_principal/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/allowed/service_principal/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/dashboard_embed/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/dashboard_embed/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/empty_override/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/empty_override/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/pipelines/regular_user/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/pipelines/regular_user/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/pipelines/service_principal/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/pipelines/service_principal/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/pipelines_legacy/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/run_as/pipelines_legacy/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) TestAccept/bundle/telemetry/deploy-experimental/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌main (aae07ca): latest (v1.23.0): same output as main (aae07ca) 1 more failure details omitted, see the full report in the run. |
Integration test reportCommit: dd70370
Top 9 slowest tests (at least 2 minutes):
|
|
|
||
| func (m *permissionDiagnostics) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnostics { | ||
| diags := runAsAccessDiagnostics(b) | ||
| // Only recommend deployment-identity access when top-level permissions are explicit. |
There was a problem hiding this comment.
This comment and the conditional below disagree; it recommends deployment identity access without top-level permissions being set. I agree this should only show up when users are using the top-level permissions block. I think this is also why this shows up in the acc test output so much.
Changes
Warn when a bundle
run_asidentity may lack access to deployed files or resources. Suggest top-levelCAN_VIEW, or folder-levelCAN_READfor source-linked and Shared files. Top-level permissions also apply to bundle resources, including clusters (CAN_VIEWmaps toCAN_ATTACH_TO).Why
Access to a job or pipeline does not necessarily grant its
run_asidentity access to referenced files or resources such as clusters.Tests
go test ./bundle/phases ./bundle/permissions -count=1go test ./acceptance -run 'TestAccept/bundle/run_as' -count=1go test ./acceptance -run 'TestAccept/bundle/telemetry/deploy-(experimental|run-as)' -count=1go test ./acceptance -run 'TestAccept/bundle/migrate/command/runas/DMS=' -count=1