Commit Graph
75 Commits
Author SHA1 Message Date
dependabot[bot] 5ba86d5b84 build(deps): bump golang.org/x/net from 0.9.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.9.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.9.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-22 09:56:51 +02:00
Hugo 39f8f290fc fix(credential): Allow for static AWS credentials in environment
This commit fixes a problem where the plugin/AWS SDK would not recognise
static AWS credentials set in the machine's environment variables (by
setting AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY)

The default `WithSharedCredentials` value is `true` in awsutil (v2) -
This essentially disables the ability to read credentials from the
environment because we set the `default` AWS profile options, making the
SDK go search for a profile that may not exist and ignoring the
environment in the way, so we need to set it to `false` (see
`awsutil@v2.(*CredentialsConfig).generateAwsConfigOptions`) for extra
details.
v0.2.1
2023-10-05 14:47:16 +01:00
Damian DebkowskiandHugo fcfe267a3f refactor: switch from awsutil to awsutilv2 (#34)
* fix(storage): Storage Assume Role Support

This commit introduces fixes to enable operators to use AWS dynamic
credentials on the storage side of this plugin, namely validation,
improved credential lifecycle management to allow for storage buckets to
be updated from static to dynamic credentials and vice versa, and a new
way to determine credential types.

It also introduces new tests for dynamic credential usage for the
various functions.

* fix(storage): Static rotated creds being deleted on plugin err

On Storage Bucket update, when we determine if the credentials are to be
updated to new ones, we call `credState.ReplaceCreds`.

This call, if the old credentials were managed by us (rotated at create
time), will delete the old credentials and set the new ones onto
credState.

We called this function without validating if the incoming credentials
are valid. This could get the bucket in a state where where, while we'd
return an update error if the incoming credentials weren't working with
S3 (err in the dry run process that happens at the end of the update),
we'd also silently delete the old credentials the bucket used, rendering
the bucket completely broken.

---------

Co-authored-by: Hugo <hugoamvieira@users.noreply.github.com>
v0.2.0
2023-09-22 12:26:08 -07:00
Michael Li f263eefbba doc: Fix links to READMEs (#32) 2023-09-08 14:31:18 -04:00
Damian Debkowski 03e5368b71 fix(host): catch dry run validation error (#31) v0.1.7 v0.1.8 2023-07-19 10:56:30 -07:00
Damian Debkowski 07f015be28 feat: assume role provider credentials (#28)
* feat: assume role provider credentials

This commit updates the awsutil dependency to its latest version, which
supports the capability of using dynamic credentials. The storage service
was refactored to make static credentials optional. The credentials pkg
was refactored to support several attribute fields used for the assume
role provider. The host service still enforces the use of static
credentials.
2023-07-18 16:33:24 -07:00
Damian Debkowski 334732967d chore: host plugin import aws-sdk-go-v2 (#27) 2023-07-04 11:03:24 -07:00
Damian Debkowski 7bf9fe2ecf chore: fix credential rotation reference in readme (#25) 2023-06-05 09:53:19 -07:00
hashicorp-copywrite[bot] c6687840d5 [COMPLIANCE] Add Copyright and License Headers (#26)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-06-05 09:52:48 -07:00
Louis Ruch 62e885a802 chore: Rename module to drop host element (#24) v0.1.6 2023-06-02 08:55:14 -07:00
Stan Ryzhov 42629b729e feat(ci): Update GitHub Actions Runners (#23) 2023-06-02 11:02:40 -04:00
Louis Ruch 209711f688 chore: Update Boundary SDK tag v0.1.5 2023-06-01 08:36:25 -07:00
Louis Ruch fbc51dd7d7 chore(deps): Update go.mod of Boundary SDK 2023-05-31 08:27:16 -04:00
Louis Ruch 80213b33b5 chore: Add CODEOWNERS 2023-05-30 21:04:44 -04:00
Louis Ruch d5c9378340 feat(ci): Update CI to run valid go version 2023-05-30 20:53:47 -04:00
Damian Debkowski 010b9df595 feat(plugin): add support for storage service 2023-05-30 15:26:19 -04:00
Damian DebkowskiandMichael Li 46c53fb94a refactor: organize plugin to support multiple services (#1)
Co-authored-by: Michael Li <michael.li@hashicorp.com>
2023-04-30 23:30:08 -07:00
Jeff Mitchell c441058b3e Update README.md 2023-04-18 11:54:53 -04:00
Hugo c235f0a72f feat(plugin): Support extracting AWS instance name (#21) v0.1.4 2023-04-17 11:00:12 +01:00
Johan Brandhorst-Satzkorn adf0c99659 Merge pull request #20 from hashicorp/compliance/add-headers
[COMPLIANCE] Add Copyright and License Headers
2023-01-03 16:17:19 -06:00
Johan Brandhorst-Satzkorn 5ba2c938c3 Merge pull request #19 from hashicorp/compliance/add-license
[COMPLIANCE] Update MPL-2.0 LICENSE
2023-01-03 16:16:51 -06:00
hashicorp-copywrite[bot] cef41e852e [COMPLIANCE] Add Copyright and License Headers 2023-01-03 22:03:42 +00:00
CalebAlbers dcde8f655d Add or update MPL 2.0 license 2022-10-11 22:07:30 +00:00
Jeff Mitchell 54e680e942 Add region into IAM clients as well as EC2 clients (#18) v0.1.3 2022-09-02 14:35:34 -04:00
Jeff Mitchell edc129991f Update option handling in EC2Client and add custom HTTP client (#17) v0.1.2 2022-09-01 15:25:14 -04:00
Jeff Mitchell 7256300997 Update some deps and fix tests; add set attr normalization (#16) v0.1.1 2022-08-19 00:42:19 -04:00
Haotian 5ebf2fa5d0 refactor(errors): update plugin errors to include error codes 2022-03-10 11:00:57 -08:00
Todd d24a1def65 Update documentation to cover more filter options as provided by AWS. (#9) 2022-03-09 12:16:50 -07:00
Chris Marchesi 6ce3e27677 Merge pull request #8 from hashicorp/update-readme-cli-example
Update README to have full, correct examples
v0.1.0
2022-01-04 16:47:53 -08:00
Chris Marchesi d348501d34 Add examples for providing multiple filters 2022-01-04 16:04:22 -08:00
Chris Marchesi 9f25f80ba9 Update README to have full, correct examples
This updates the README to have full examples for both host set and host
catalog creation, and also corrects an incorrect example in the JSON
example (tag-name was supposed to be tag-key).

Additionally, I've removed the JSON example as it's no longer needed as
the CLI corrects accepts filter names with dashes with the work
performed in #2 and #4.
2022-01-04 15:06:59 -08:00
Chris Marchesi e565bad027 Merge pull request #7 from hashicorp/vancluever-add-dns-names
plugin: add DNS names
2021-12-06 15:21:53 -08:00
Chris Marchesi 7a07ac42c0 add default address/DNS check/add for interface, not just whole instance 2021-12-06 11:40:44 -08:00
Chris Marchesi 13469e3594 plugin: add DNS names
This adds DNS names to the output for host queries.

Hosts are discovered in private, then public order, first at the
top-level, and then through attached network interfaces. This mirrors
the discovery order of IP addresses.
2021-12-03 13:24:48 -08:00
Chris Marchesi 88e5224f69 Merge pull request #6 from hashicorp/vancluever-add-unknown-attr-checks-fix-tests
plugin: add unknown attr checks, fix E2E test
2021-11-22 16:18:24 -08:00
Chris Marchesi 3e2f459f04 Remove unknown field assertion from awsCatalogPersistedStateFromProto 2021-11-22 16:16:24 -08:00
Chris Marchesi f22e129d92 Switch attribute getters to use GetFields/AsInterface from AsMap 2021-11-22 16:11:33 -08:00
Chris Marchesi 5777870592 e2e ListHosts test was working off multiple sets with a single tag 2021-11-18 11:18:32 -08:00
Chris Marchesi 07270a7457 plugin: add unknown attr checks, fix E2E test
This adds checks for unknown attributes through the entire plugin
lifecycle for all attributes, secrets, and persisted state.

It also fixes the E2E test which seems to have drifted.
2021-11-16 17:29:17 -08:00
Chris Marchesi 85626c6dd4 Merge pull request #5 from hashicorp/vancluever-remove-testing-todo
plugin: Remove TODO from E2E test covering rotated -> not rotated
2021-11-16 09:39:52 -08:00
Chris Marchesi 38bcd34baf plugin: Remove TODO from E2E test covering rotated -> not rotated
...when no new credentials are supplied. This was initially not covered
when the E2E tests were written but was added later once we the mocks
necessary to do unit testing to get error coverage.
2021-11-15 15:26:15 -08:00
Jeff Mitchell 756bc0960a Update SDK 2021-11-12 19:48:17 -05:00
Jeff Mitchell 1c7bacafa7 Handle the case where an incoming filter is a string (#4)
Ideally we'd ensure that an incoming filter is a string, but some
clients, such as the CLI, don't have a good way to require this without
it being very onerous to the user.

Eventually we can handle this via allowing the plugin to declare a
schema and perform type validation in the handler, but for now, work
around this within the plugin.
2021-11-12 19:47:46 -05:00
Todd Knight 563a2b9931 Don't return nil, nil but instead return an empty response. 2021-11-10 15:41:23 -07:00
Jeff Mitchell a0de5b0c55 Update SDK dep 2021-11-10 15:12:44 -05:00
Jeff Mitchell d33fb1f84c Update deps 2021-11-10 15:08:19 -05:00
Todd ed51fa0df1 Update boundary sdk mod version. (#3) 2021-11-10 11:05:34 -07:00
Jeff Mitchell 1de471d9c7 Update filters to new, http.proto-compatible format (#2)
This updates the filtering logic to use the new format that doesn't
clash with http.proto rules for attributes used by grpc-gateway.
2021-11-03 21:21:27 -04:00
Todd bea322df68 Update boundary/sdk dependency for recent breaking proto change. (#1) 2021-10-29 13:56:22 -07:00
Jeff Mitchell d9151151fa Update SDK dep 2021-10-20 13:41:59 -04:00