Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⭐️ support scope mrn reading from service account #3146

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

chris-rock
Copy link
Member

This adds support to read scope mrns from service account. Its a preparation to support organization and space service account in cnquery and cnspec.

Copy link
Contributor

github-actions bot commented Jan 28, 2024

Test Results

2 860 tests  +3   2 859 ✅ +3   1m 19s ⏱️ -3s
  187 suites ±0       1 💤 ±0 
    5 files   ±0       0 ❌ ±0 

Results for commit 91435d5. ± Comparison against base commit d60dd91.

This pull request removes 3 and adds 6 tests. Note that renamed tests count towards both.
go.mondoo.com/cnquery/v10/llx ‑ TestSuccess/2024-03-11_08:25:22.614245244_+0000_UTC_m=+0.009766339
go.mondoo.com/cnquery/v10/llx ‑ TestTruthy/2024-03-11_08:25:22.614245244_+0000_UTC_m=+0.009766339
go.mondoo.com/cnquery/v10/llx ‑ TestTruthy/2024-03-11_08:25:22.614245244_+0000_UTC_m=+0.009766339#01
go.mondoo.com/cnquery/v10/cli/config ‑ TestConfigParsing/test_config_with_space_mrn
go.mondoo.com/cnquery/v10/cli/config ‑ TestConfigParsing/test_org_service_account_with_scope_mrn
go.mondoo.com/cnquery/v10/cli/config ‑ TestConfigParsing/test_space_service_account_with_scope_mrn
go.mondoo.com/cnquery/v10/llx ‑ TestSuccess/2024-03-11_15:22:28.979557601_+0000_UTC_m=+0.019070104
go.mondoo.com/cnquery/v10/llx ‑ TestTruthy/2024-03-11_15:22:28.979557601_+0000_UTC_m=+0.019070104
go.mondoo.com/cnquery/v10/llx ‑ TestTruthy/2024-03-11_15:22:28.979557601_+0000_UTC_m=+0.019070104#01

♻️ This comment has been updated with latest results.

@chris-rock chris-rock force-pushed the chris-rock/scope-mrn branch from 1be52b4 to fe4392d Compare January 28, 2024 19:54
@chris-rock chris-rock force-pushed the chris-rock/scope-mrn branch from fe4392d to 91435d5 Compare March 11, 2024 15:20
// GetParentMrn returns the scope mrn that is used for the service account.
// This is either the organization mrn or the space mrn.
// Deprecated: Use GetScopeMrn instead
func (c *CommonOpts) GetParentMrn() string {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we just not remove this function? i dont think this is used by an end user in some way so should be safe to delete it and migrate cnspec to GetScopeMrn (if cnspec makes use of that)

Copy link
Member Author

Choose a reason for hiding this comment

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

Lets leave it deprecated for now.

@chris-rock chris-rock merged commit a906786 into main Mar 12, 2024
14 checks passed
@chris-rock chris-rock deleted the chris-rock/scope-mrn branch March 12, 2024 07:59
@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants