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

feat(PSP-1219): add provider for azure agentless integration #588

Merged
merged 5 commits into from
Nov 16, 2023

Conversation

badass-aoz
Copy link
Contributor

@badass-aoz badass-aoz commented Nov 10, 2023

Issue: https://lacework.atlassian.net/browse/PSP-1219

Description:
This adds lacework integration provider for Azure Agentless support.

Added an integration test for the change.

cd /Users/aoz/dev/terraform-provider-lacework/ && make build && make install && go mod vendor && cd integration && go test -v -run "TestIntegrationAzureAgentlessScanningCreate" passed

go.mod Outdated
@@ -11,6 +11,8 @@ require (
golang.org/x/text v0.13.0
)

replace github.com/lacework/go-sdk v1.37.0 => /Users/aoz/dev/go-sdk
Copy link
Contributor Author

Choose a reason for hiding this comment

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

was added for local test override. Will remove


creds := make(map[string]string)
creds["client_id"] = integration.Data.Credentials.ClientId
d.Set("credentials", []map[string]string{creds})

Choose a reason for hiding this comment

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

do we need to set client secret?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good question. I copied it from the GCP flow. Apparently it was intentionally removed (#531) so I'm just going to do the same here.

)

type azureCredentialsFile struct {
ClientSecret string `json:"keyId"`

Choose a reason for hiding this comment

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

Are these mapped incorrectly? Shouldn't keyId map to ClientID and secret map to ClientSecret?

Copy link

@japsingh japsingh left a comment

Choose a reason for hiding this comment

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

Nice work!
Just a few minor comments.

@badass-aoz badass-aoz changed the title [Draft] feat(PSP-1219): add provider for azure agentless integration feat(PSP-1219): add provider for azure agentless integration Nov 13, 2023
@badass-aoz badass-aoz marked this pull request as ready for review November 13, 2023 19:58
@badass-aoz badass-aoz requested a review from a team as a code owner November 13, 2023 19:58
@badass-aoz
Copy link
Contributor Author

the test-build will require a rollout of lacework/go-sdk#1447 to work (had local override so it worked locally). I'll push for a release of go-sdk and run tests here.

@badass-aoz badass-aoz merged commit 2d28ae2 into main Nov 16, 2023
2 checks passed
@badass-aoz badass-aoz deleted the new_azure_agentless_provider branch November 16, 2023 18:13
@lacework-releng lacework-releng mentioned this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants