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

[Cloud Security] Add support for GCP org #7403

Merged
merged 6 commits into from Sep 10, 2023
Merged

Conversation

orouz
Copy link
Contributor

@orouz orouz commented Aug 16, 2023

What does this PR do?

Adds 2 new input vars: organization_id and account_type

closes #7398

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

@orouz orouz added enhancement New feature or request Team:Cloud Security Label for the Cloud Security team labels Aug 16, 2023
Comment on lines 126 to 132
- name: organization_id
type: text
title: Organization Id
multi: false
required: false
show_user: true
- name: project_id
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the UI should indicate we support project_id or organization_id, not both.

Copy link
Contributor

Choose a reason for hiding this comment

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

The project_id might be needed as well to decide in which project the deployment should reside.

@elasticmachine
Copy link

elasticmachine commented Aug 16, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-09-07T10:45:07.875+0000

  • Duration: 15 min 44 sec

Test stats 🧪

Test Results
Failed 0
Passed 4
Skipped 0
Total 4

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Aug 16, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (0/0) 💚
Files 100.0% (0/0) 💚
Classes 100.0% (0/0) 💚
Methods 25.0% (2/8) 👎 -75.0
Lines 100.0% (0/0) 💚 7.769
Conditionals 100.0% (0/0) 💚

@orouz orouz marked this pull request as ready for review August 21, 2023 07:39
@orouz orouz requested a review from a team as a code owner August 21, 2023 07:39
Copy link
Contributor

@oren-zohar oren-zohar left a comment

Choose a reason for hiding this comment

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

@orouz do we need to update the changelog and manifest version? this is for 8.11, right?

Copy link
Contributor

@oren-zohar oren-zohar left a comment

Choose a reason for hiding this comment

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

@orouz do we need to update the changelog and manifest version? this is for 8.11, right?

@orouz orouz marked this pull request as draft August 29, 2023 13:19
@orouz orouz changed the title [Cloud Security] Add org id input var [Cloud Security] Add support for GCP org Aug 29, 2023
Comment on lines +7 to +13
{{#if gcp.project_id}}
project_id: {{gcp.project_id}}
{{/if}}
{{#if gcp.organization_id}}
organization_id: {{gcp.organization_id}}
{{/if}}
account_type: {{gcp.account_type}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

project_id and organization_id depend on the value of account_type, so they may be missing. account_type is required.

Copy link
Contributor

Choose a reason for hiding this comment

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

@animehart we would need to have a migration here on fleet to add account_type when missing

Reference to fleet migrations that work on variable
https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution

@orouz orouz marked this pull request as ready for review August 30, 2023 13:01
@orouz orouz requested a review from oren-zohar August 31, 2023 07:17
type: text
title: Account Type
multi: false
required: false
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't this required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i thought our custom ui required us to not use it but this isn't the case for this var.

Co-authored-by: Uri Weisman <68195305+uri-weisman@users.noreply.github.com>
@orouz orouz merged commit d18ce21 into elastic:main Sep 10, 2023
4 checks passed
@elasticmachine
Copy link

Package cloud_security_posture - 1.6.0-preview1 containing this change is available at https://epr.elastic.co/search?package=cloud_security_posture

@elasticmachine
Copy link

Package cloud_security_posture - 1.6.0-preview11 containing this change is available at https://epr.elastic.co/search?package=cloud_security_posture

@elasticmachine
Copy link

Package cloud_security_posture - 1.6.0-preview12 containing this change is available at https://epr.elastic.co/search?package=cloud_security_posture

@elasticmachine
Copy link

Package cloud_security_posture - 1.6.0-preview13 containing this change is available at https://epr.elastic.co/search?package=cloud_security_posture

@elasticmachine
Copy link

Package cloud_security_posture - 1.6.0-preview14 containing this change is available at https://epr.elastic.co/search?package=cloud_security_posture

@elasticmachine
Copy link

Package cloud_security_posture - 1.6.0-preview15 containing this change is available at https://epr.elastic.co/search?package=cloud_security_posture

@elasticmachine
Copy link

Package cloud_security_posture - 1.6.0-preview16 containing this change is available at https://epr.elastic.co/search?package=cloud_security_posture

@elasticmachine
Copy link

Package cloud_security_posture - 1.6.0 containing this change is available at https://epr.elastic.co/search?package=cloud_security_posture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Team:Cloud Security Label for the Cloud Security team
Projects
None yet
7 participants