Commit Graph
4 Commits
Author SHA1 Message Date
Elim Tsiagbey d3a155bd3f test: add e2e tests (#21)
* test: add e2e tests

Spin up GCP resources for testing dynamic host catalogs. The resources are tested with tests that focus on credential changes and rotation for host catalog and host set creation and updates using labels.

- The tests all depend on each other so they need to run in order. - The test can also only be executed locally for now.
- The resources are cleaned up after the test as part of the test.
2024-11-25 11:17:01 -05:00
Elim Tsiagbey 636432f2fb feat: Rotate Service Account Key (#7)
* feat: Rotate Service Account Key

- Add support for rotating service account key
- Add a check to validate the permissions for the newly created service account key
- Remove `GetClient` for GCP config since HTTPClient is not an accepted form of authentication for all clients. Switching to using Google Credentials instead for authentication
2024-10-18 11:11:10 -04:00
Elim Tsiagbey be892acbd9 feat: GCP authentication (#5)
* feat: GCP authentication

Add authentication support for:
- authentication with service account key
- authentication with impersonating service account key
- authentication with application default credentials which are read from the environment

A HTTP client with a token set will be returned and used for authentication with all clients. for example
```
gcpClient, err := gcpConfig.GetClient(ctx)
if err != nil {
	log.Fatalf("Failed to get client: %v", err)
}

client, err := computeCloud.NewInstancesRESTClient(ctx, option.WithHTTPClient(gcpClient))
if err != nil {
	log.Fatalf("Failed to create client: %v", err)
}
```
2024-09-22 23:21:58 -04:00
Rosemary Wang e3daac2ce8 Initial commit 2024-07-11 11:15:47 -04:00