open-vault/helper/testhelpers
Alexander Scheel e9768b6bc6
Fix radiusd network connection limitations (#17049)
* Allow exposing access to the underlying container

This exposes the Container response from the Docker API, allowing
consumers of the testhelper to interact with the newly started running
container instance. This will be useful for two reasons:

 1. Allowing radiusd container to start its own daemon after modifying
    its configuration.
 2. For loading certificates into a future similar integration test
    using the PKI secrets engine.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Allow any client to connect to test radiusd daemon

This fixes test failures of the following form:

> 2022-09-07T10:46:19.332-0400 [TRACE] core: adding local paths: paths=[]
> 2022-09-07T10:46:19.333-0400 [INFO]  core: enabled credential backend: path=mnt/ type=test
> 2022-09-07T10:46:19.334-0400 [WARN]  Executing test step: step_number=1
> 2022-09-07T10:46:19.334-0400 [WARN]  Executing test step: step_number=2
> 2022-09-07T10:46:29.334-0400 [WARN]  Executing test step: step_number=3
> 2022-09-07T10:46:29.335-0400 [WARN]  Executing test step: step_number=4
> 2022-09-07T10:46:39.336-0400 [WARN]  Requesting RollbackOperation
> --- FAIL: TestBackend_acceptance (28.56s)
>     testing.go:364: Failed step 4: erroneous response:
>
>         &logical.Response{Secret:<nil>, Auth:<nil>, Data:map[string]interface {}{"error":"context deadline exceeded"}, Redirect:"", Warnings:[]string(nil), WrapInfo:(*wrapping.ResponseWrapInfo)(nil), Headers:map[string][]string(nil)}
> FAIL
> FAIL	github.com/hashicorp/vault/builtin/credential/radius	29.238s

In particular, radiusd container ships with a default clients.conf which
restricts connections to ranges associated with the Docker daemon. When
creating new networks (such as in CircleCI) or when running via Podman
(which has its own set of network ranges), this initial config will no
longer be applicable. We thus need to write a new config into the image;
while we could do this by rebuilding a new image on top of the existing
layers (provisioning our config), we then need to manage these changes
and give hooks for the service setup to build it.

Thus, post-startup modification is probably easier to execute in our
case.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2022-09-07 13:43:22 -04:00
..
azurite Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
cassandra Cassandra: Refactor PEM parsing logic (#11861) 2021-06-21 11:38:08 -06:00
certhelpers
consul Update Consul bootstrap test case to conditionally add token to config (#16560) 2022-08-03 13:43:43 -05:00
docker Fix radiusd network connection limitations (#17049) 2022-09-07 13:43:22 -04:00
etcd reformat using 'make fmt' (#13794) 2022-01-27 10:06:34 -08:00
fakegcsserver OSS changes for enterprise automated snapshots (#10160) 2020-10-16 14:57:11 -04:00
ldap Added support for a LDAP user search filter. Documentation, tests and UI included (#11000) 2021-10-26 10:39:12 -07:00
logical Use %q for quoted strings where appropriate (#15216) 2022-08-03 12:32:45 -06:00
minio Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
mongodb Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
mssql Add ability to capture container logs, and have mssql test helper use it (#13272) 2021-11-24 12:01:38 -05:00
mysql Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
postgresql postgres: replace the package lib/pq with pgx (#15343) 2022-05-23 12:49:18 -07:00
seal OSS portion of wrapper-v2 (#16811) 2022-08-23 15:37:16 -04:00
teststorage Vault 6773/raft rejoin nonvoter (#16324) 2022-07-18 14:37:12 -04:00
testhelpers.go Wait for standby to have a working grpc connection before we try to use it (#16905) 2022-08-26 12:50:10 -04:00
testhelpers_oss.go Wait for standby to have a working grpc connection before we try to use it (#16905) 2022-08-26 12:50:10 -04:00