Commit Graph
3550 Commits
Author SHA1 Message Date
Timothy Messier 26854b01a8 feat(ratelimit): Set RateLimit and RateLimit-Policy headers 2023-12-04 16:24:04 +00:00
Timothy Messier e337cf8f69 feat(controller): Add authtoken public id to request context
This allows for http middleware handler functions that run later in the
handler function stack to have access to the extracted auth token public
id.
2023-12-04 16:24:04 +00:00
Timothy Messier 059d4992de feat(ratelimit): Add support for limits per ip address and auth token 2023-12-04 16:24:00 +00:00
Timothy Messier 00bd2899af feat(controller): Add ratelimiter http middleware 2023-12-04 16:22:58 +00:00
Timothy Messier 2853324479 feat(ratelimit): Add http middleware handler function 2023-12-04 16:20:44 +00:00
Timothy Messier 6da47443fd feat(ratelimit): Create rate limits from configs 2023-12-04 16:20:44 +00:00
Timothy Messier 61fcd857ec feat(resource): Add function to get type from plural string 2023-12-04 16:20:44 +00:00
Timothy Messier bc48e58035 chore: Add go-rate dependency 2023-12-04 16:20:42 +00:00
Timothy Messier 51adde4b2c feat(handlers): Register actions for each resource type
This registers the ActionSets for each resource when the handler
packages are initialized. This then allows other packages to retrieve
the ActionSets for a given resource from the action package.

The initial consumer of this will be the ratelimit package so that it
can programmatically enumerate all of the valid combinations of a
resource and action.

This leaves a number of TODO to refactor the handler packages to also
retrieve the action sets from the registered actions instead of using a
package variable. This is left as a TODO since there is some
inconsistencies in how these package variables are used between the
handlers. For example a number of packages use a map of subtypes to
ActionSets which is then used withing the handler implementation. Others
use a map, but don't seem to use it at all. And others just use an
ActionSet.
2023-12-04 16:20:29 +00:00
Timothy Messier 3f4a723541 feat(action): Add registrar for valid actions by resource 2023-12-04 16:20:29 +00:00
Timothy Messier 8643d8e6c6 feat(errors): Add code for invalid configuration 2023-12-04 16:20:29 +00:00
Timothy Messier c52caae345 refact(action): Make ActionSet behave as a set instead of a list
This switches the implementation of an ActionSet from a slice to a map
to ensure the elements in an ActionSet are unique. This allows for other
packages to perform set operations such as a union or difference without
needing to account for duplicates.
2023-12-04 16:20:29 +00:00
Timothy Messier bee45dc486 feat(config): Add fields for controller rate limit configuration 2023-12-04 16:20:28 +00:00
Timothy Messier 0fb77358e5 feat(ratelimit): Define initial ratelimit package and Config 2023-12-04 16:20:28 +00:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] b159080593 Result of tsccr-helper -log-level=info -pin-all-workflows . (#4080)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2023-12-04 09:48:09 -05:00
Lisbet Alvarez 8584f71791 update ui commitish (#4087) 2023-12-01 10:12:37 -08:00
Dan Heath caab9b0669 docs: Add OIDC prompt attribute (#4068)
* docs: Add OIDC prompt attribute

* docs: Clarify support for multiple prompts

* docs: Add disclaimer about differences by provider

* docs: Feedback from review
2023-12-01 11:24:48 -05:00
Dan Heath 4ace362c02 docs: Fix broken link for HCP deployment (#4081) 2023-12-01 10:41:33 -05:00
Damian Debkowski 3394d3e13a chore: update go mod and dependencies (#4073) 2023-11-30 11:45:00 -08:00
Michael Li 3cae4933c0 test(e2e): Update migration test with additional resources (#4069)
* test(e2e): Add descriptions to resources

* test(e2e): Add more resources to migration test
2023-11-30 09:38:07 -05:00
Jim 798e86cefe tests (ldap managed groups): extend tests to include ldap grps for GrantsForUser(...) (#3972)
* chore (managed groups): just a small rename to improve readability

* test (aut/ldap): add a test for user grants based on ldap grp

* tests (role grant): extend TestGrantsForUser(...) to cover ldap grps

* refact (iam.(Repository).GrantsForUser): more readable grantsQuery

Convert existing CTE to use sub-selects for readability
2023-11-29 16:29:36 -05:00
hc-github-team-es-release-engineering 2e31771be3 Update LICENSE (#4062)
* Update LICENSE

* Update LICENSE
2023-11-29 08:52:39 -08:00
Michael Li 093f889333 test(e2e): Add test for LDAP (#4061)
* test(e2e): Add test for LDAP

This adds the infrastructure and a test for an LDAP workflow

* test(e2e): Refactor test packages

This reduces the number of scenarios needed

* CR

* fixup! test(e2e): Add test for LDAP
2023-11-28 16:25:26 -05:00
Johan Brandhorst-Satzkorn a89573b35f subtypes,handlers: add runtime trace regions (#4060)
* subtypes,handlers: add runtime trace regions

The subtype.Filterable and handlers.ProtoToStruct functions
are costly and worth measuring whenever runtime tracing
is in use. This has almost no cost when tracing is not in use,
so there's little harm in having them in place.

* testing: Add TRACING.md

TRACING.md contains information about how to perform
Go runtime tracing of the Boundary application.
2023-11-27 13:37:04 -08:00
Jim 18729721a1 fix (plugins/gcpkms): update dep to fix issue with using gcp kms (#4058) 2023-11-24 14:33:56 -05:00
Elim Tsiagbey 8b8d2822df feat(oidc): OIDC Prompt (#4053)
Boundary OIDC method does not currently support passing in prompts during authentication. This change adds the capability of passing OIDC prompts. Prompts are optional OIDC parameters that determine the behaviour of the authentication server: https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest

## Changes

- New `auth_oidc_prompt` table which contains all the prompts for OIDC auth method
- New `auth_oidc_prompt_enm` table which contains possible enum values for a prompt
  - Currently supported:
    - `none`: 
The Authorization Server MUST NOT display any authentication or consent user interface pages
    - `login`: The Authorization Server SHOULD prompt the End-User for reauthentication
    - `consent`: The Authorization Server SHOULD prompt the End-User for consent before returning information to the Client
    - `select_account`: The Authorization Server SHOULD prompt the End-User to select a user account
- `oidc_auth_method_with_value_obj` view has been updated to return `prompt` value
- Add `prompt` option for OIDC auth method CLI create and update
- Pass configured prompt during OIDC authentication
- Add `prompt` API validation for create and update
2023-11-21 11:30:02 -05:00
b6df5693b5 Add generic read/update/delete commands (#3992)
* Add generic read/update/delete commands

This adds three generic commands that use the resource prefix to
determine the subcommand to run and pass through args over to that
subcommand. Since this occurs very early on and to avoid loading
essentially every internal resource package, I moved subtype definitions
to globals.

This replaces #3967

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>

* De-duplicate Subtype code (#4031)

Co-authored-by: Timothy Messier <tim.messier@gmail.com>

---------

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Co-authored-by: Timothy Messier <tim.messier@gmail.com>
2023-11-15 19:55:46 -05:00
Sepehr 5c84a8861a Observation(event): adding op instead of type details paylaod (#4043)
* Observation(event): adding op instead of type details paylaod

* Observation(events): removing op check in details
2023-11-15 13:03:04 -08:00
Michael Li 6ef015e1d1 test(e2e): Use docker mirror when pulling image (#4045) 2023-11-15 14:58:40 -05:00
Michael Li 36d0e5ede0 test(e2e): Add test that connects to target using go ssh library (#4040)
* test(e2e): Add test that connects to target using golang ssh library

* fixup! test(e2e): Add test that connects to target using golang ssh library
2023-11-14 14:54:48 -05:00
Jeff Mitchell 046d2c4be6 Bump azure kms wrapper version (#4041) 2023-11-14 12:06:36 -05:00
Dan Heath edc6e52a3f docs: Fix broken link (#4035)
* docs: Fix broken link

* docs: Fix a typo

* docs: Fix two more broken links
2023-11-13 15:04:12 -05:00
Michael Li 4f262e7de5 test(bats): Use correct attribute for the test (#4033) 2023-11-10 16:45:19 -05:00
hc-github-team-es-release-engineering 46556b5ce9 Update LICENSE (#4021)
* Update LICENSE

* make line wrap more consistent
2023-11-09 13:34:50 -08:00
Michael Li b0127116f3 test(e2e): Add test for worker-led worker registration (#4014)
* refact(e2e): Create module to run boundary commands

* test(e2e): Add worker-led registration test
2023-11-09 09:55:47 -05:00
Dan Heath 527c383ea3 docs: Fix broken subheading links (#4024) 2023-11-08 15:32:44 -05:00
Jeff Mitchell cb1386932d Use sdk wspb library and remove internal (#4025) 2023-11-08 14:02:58 -05:00
Jeff Mitchell 71e685b276 Copy wspb into sdk in preparation for moving it out of main (#4023) 2023-11-08 12:41:08 -05:00
Jeff Mitchell cf3900a906 Fix three minor issues: (#4022)
* If passing a private key without specifying it in URL syntax, give a
  proper error message (previously we were only making sure it was a
  scheme we knew how to handle, but we need to also be more informative
  if it's not a URL at all)

* If the handshake from the proxy fails, don't hang, just exit

* Update some error messages to use capitalization in line with our
  standard CLI error format
2023-11-08 12:30:54 -05:00
Michael Li 8e83cc87d3 test(e2e): Add some other commands to execute over localhost (#4016) 2023-11-07 16:59:52 -05:00
Damian Debkowski 12600617ba fix(plugin): remove unit test race condition (#4002) 2023-11-07 09:17:36 -08:00
Michael Li 444def7971 chore(e2e): Fix workflow trigger (#4013) 2023-11-07 10:51:16 -05:00
Jeff Mitchell 92f7d8cfb2 Minor test fixes (#4004)
* Minor test fixes

The auth rotation test fix allows us to keep checking if we did not yet
see the expected bytes in case the call to lookup succeeds but we are
late in rotating due to parallelism.

The api credentials test fix allows us to check if at _least_ one
rotation has happened. That way if two rotations happen before we check
again due to parallelism, this is deemed a successful result.

* Add timeout to auth rotation test
2023-11-06 16:03:25 -05:00
Timothy Messier dd23f6fdbf Update websocket library (#3908)
The nhooyr/websocket library now has a release with the new default
behavior that removes the message size limit. This allows us to switch
off of the fork and back to the upstream.

In the same release that includes the fix we need for the boundary
client, the wspb helper package was removed from websocket. This package
contained some functions to read and write protobuf messages. However,
it was using the deprecated github.com/golang/protobuf/proto library. To
avoid this dependancy in the library they opted to just remove wspb.

Thus this provides a replacement implementation that uses
google.golang.org/protobuf/proto. Notably the newer proto library seems
to lack an equivalent of proto.NewBuffer so writes to the websocket and
not able to leverage a sync.Pool of byte.Buffers to reduce allocations.

Refs: 88bb253554
See: https://github.com/nhooyr/websocket/commit/ac385120c6e34fa6584f3856d5db949a21bbb65e
2023-11-06 14:59:11 -05:00
Michael Li 25961d98b1 chore(e2e): Continue if log renaming fails (#4005) 2023-11-06 13:21:53 -05:00
Dan Heath 772375717f docs: Update feature matrix (#3999) 2023-11-03 15:30:18 -04:00
Dan Heath 22e06eddc8 docs: Add enterprise badge (#3981)
* docs: Add enterprise badge

* docs: Add heading-level enterprise alert

* docs: Add some missing tags
2023-11-03 14:08:06 -04:00
Dan Heath e7c8d2ffc6 docs: Add feature matrix (#3993) 2023-11-03 12:30:14 -04:00
Jim 61ef033fb6 chore (deps): update gldap dependency (#3989) 2023-11-03 12:17:54 -04:00
Michael Gaffney d638378d57 fix(vault): Set the Vault TLS client options if specified
Two Vault client settings were not being properly used when constructing
a Vault client.

The `TLS Skip Verify` setting was only being set if a `CA Cert` was also
configured. This fix sets the `TLS Skip Verify` when configured
regardless of other settings. Closes #3961.

The `TLS Server Name` setting was never being set. Bad programmers. This
fix now sets it on the Vault client if the Vault Credential Store has
been configured to use a value for this setting. Closes #3962.
2023-11-02 16:13:41 -04:00