Commit Graph
2698 Commits
Author SHA1 Message Date
Damian Debkowski 84b410974b fix(handlers): return error when updating json cred w/ empty obj (#2903)
* fix(handlers): return error when updating json cred w/ empty obj

* chore(handlers): split cond stmt & refactor func name
2023-02-06 08:20:12 -08:00
Timothy Messier e25b0e7888 fix(credentiallibraries): Fallback logic to support 0.11.x cli (#2910) 2023-02-06 11:00:34 -05:00
Cameron Perera 42858c4c0d chore: bump ui commit (#2913) 2023-02-06 09:40:29 -06:00
Johan Brandhorst-Satzkorn 48e4fcce25 fix: remove file number dependency from test
This was failing because of the added comments.
This isn't a crucial part of the test, so remove it.
2023-02-03 15:55:38 -08:00
Johan Brandhorst-Satzkorn 430e372333 chore: Ignore license headers from blame history 2023-02-03 15:55:35 -08:00
Johan Brandhorst-Satzkorn 3c29308673 chore: Add license headers to all files 2023-02-03 15:54:27 -08:00
Johan Brandhorst-Satzkorn dcb499ed4f chore: Add copywrite Makefile target
The new copywrite target can be used to add any
missing license headers.
2023-02-03 15:54:27 -08:00
Dan HeathandTimothy Messier 51f2876265 docs: Update credentials docs for 0.12.0 (#2871)
* docs: Update credentials docs for 0.12.0

* Update website/content/docs/concepts/domain-model/credential-libraries.mdx

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

* docs: updates from review

* docs: fix capitalizationi

---------

Co-authored-by: Timothy Messier <tim.messier@gmail.com>
2023-02-03 16:25:08 -05:00
Cameron Perera 80774077d6 chore: bump ui commit for 0.12.x release (#2904) 2023-02-03 14:32:35 -06:00
Johan Brandhorst-Satzkorn 501761a564 chore: Add changelog entry for job_run fix (#2897) 2023-02-03 14:57:33 -05:00
Timothy Messier 718e183a1e fix(credentiallibraries): Correctly populate attrs for vault-generic (#2901) 2023-02-03 14:21:08 -05:00
Timothy Messier ded39259e3 Merge pull request #2887 from hashicorp/tmessi-fix-cli-ui-tests
fix(cli): Status code on api error
2023-02-03 12:21:18 -05:00
Timothy Messier f9a2f44f5b test(cli): Add tests for vault-ssh-certificate credential library
This adds tests for updating specific fields of the credential library.
2023-02-03 17:00:34 +00:00
Timothy Messier e66ea15fef fix(cli): Status code on api error
When using the json output of the cli (`-format=json`), a successful
call to the controller API would place the HTTP status code in the JSON
as `status_code`. However, if there was an error from the API the status
code would be placed in the JSON as `status`. In order to be consistent,
this adds a `status_code` field to the error response case. For
backwards compatibility it still populates `status` in the error case.

This inconsistency was missed partially due to a bug in the CLI tests.
The assertion on status code was not valid and would always be
successful. Thus this also fixes the assertions and tests.
2023-02-03 17:00:34 +00:00
Timothy Messier 99a8875d3e feat(version): Determine binary version during initalization
This ensures that checks for features should work, and bails early if
that is not the case, since if this fails the binary is essentially
broken. This also simplifies code that performs these checks, ie instead
of:

    binaryVersion, err := version.GetReleaseVersion()
    if err != nil {
      // handle error? panic?
    }
    if version.SupportsFeature(binaryVersion, version.FeatureA) {
      // code for FeatureA
    } else {
      // without FeatureA
    }

Implementations can do:

    if version.SupportsFeature(version.Binary, version.FeatureA) {
      // code for FeatureA
    } else {
      // without FeatureA
    }
2023-02-03 17:00:33 +00:00
Irena Rindos 4114b41527 Filter managed workers from egress workers when the host address is unsafe (#2899) 2023-02-03 11:40:41 -05:00
Hugo e455e31f9e fix(target): Incorrectly allowing whitespace on Target's address field (#2862) 2023-02-02 10:51:39 -08:00
Timothy Messier db42eafd7a Merge pull request #2860 from hashicorp/llb-vault-ssh-cert-injection
Add vault ssh certificate credential library

This adds a new credential library type, `vault-ssh-certificate`, which
can be used with vault's ssh secret engine to generate certificates to
use as credentials for ssh. This new credential library can be created
using:

    boundary credential-libraries create vault-ssh-certificate

See the help output for a full list of the options supported.

This also renames the `vault` credential library subtype to
`vault-generic`. The previous subtype of `vault` will continue to work,
thus the following commands are equivalent:

    boundary credential-libraries create vault-generic
    boundary credential-libraries create vault

See: https://developer.hashicorp.com/vault/docs/secrets/ssh
2023-02-02 12:44:20 -05:00
Timothy Messier 862481960d chore(CHANGELOG): Add items for vault ssh certificate cred library 2023-02-02 17:43:17 +00:00
Timothy Messier 32dd7f07d0 fix(vault): Only persist revokable credentials
When issuing credentials from vault credential libraries, only persist
the vault credential if it is revokable. A credential that is revokable
has a valid lease id that can be used to revoke the lease in vault. If
the credential is not revokable it is also not renewable since renewing
also requires a lease id.

See: https://developer.hashicorp.com/vault/docs/concepts/lease
2023-02-02 17:43:17 +00:00
Timothy Messier 12a53bbfa9 feat(target): Allow vault ssh cert library as credential source
This allows the new vault ssh certificate credential library to be used
as an injected application credential source.
2023-02-02 17:43:17 +00:00
Timothy Messier 1aaaf4af1d feat(controller): Translate ssh certificate credentials for worker 2023-02-02 17:43:17 +00:00
Timothy Messier 6a41bf1237 feat(wh): Support vault ssh certificate credentials
This expands the wh_credential_dimension to include fields for the new
vault ssh certificate credential library.
2023-02-02 17:43:17 +00:00
Timothy Messier 45b15fab8c ci: Start vault for cli ui tests 2023-02-02 17:43:17 +00:00
Timothy Messier 89a55632ba feat(cli): Add vault ssh certificate credential library 2023-02-02 17:43:17 +00:00
Haotian 43f0ba89cf feat(credentiallibraries): support vault ssh certificates 2023-02-02 17:43:16 +00:00
Danielle 3a78a74571 feat(vault): Support Issuing SSH Cert Credentials
Allows the new credential library type to be pulled from the db and used
for issuing ssh certificate type credentials. The ssh cert library
interfaces with vault's ssh secrets engine to either issu certificates
directly from vault, or to generate them within boundary and have vault
sign them as a certificate authority for authentication.

See:
  https://developer.hashicorp.com/vault/api-docs/secret/ssh#sign-ssh-key
  https://developer.hashicorp.com/vault/api-docs/secret/ssh#generate-certificate-and-key
2023-02-02 17:43:16 +00:00
HaotianandTimothy Messier 823b8cdfc6 feat(vault): Add CRUDL methods for ssh certificate cred library (#2765)
This defines a new credential library type for ssh certificates.
It adds new repository methods to support CRUDL of the new ssh
certificate credential library.

Co-authored-by: Timothy Messier <tim.messier@gmail.com>
2023-02-02 17:43:16 +00:00
Danielle 7833dd73c0 refact(vault): Create issuingCredentialLibrary Interface
Allows for new issuing credential library implementations in the future.
Moved db and decrypt logic to privateCredentialLibraryAllTypes from
issueCredentialLibrary.

This also removes sessionId from retrieveCredential, it was not needed
and removing allows retrieveCredential to be reused for credentials
issued outside current workflow.
2023-02-02 17:43:16 +00:00
Bryce Kalow a15c5d80ce website(README): add content-check command (#2889) 2023-02-02 11:33:18 -06:00
Josh Brand 9309154d05 Gate jobs to run only on OSS repo, adjust TIME_LIMIT for boundary (#2884) 2023-02-02 10:36:33 -05:00
Cameron Perera f4951c385f chore: bump ui commit to include vault ssh cert feature (#2883) 2023-02-01 14:42:15 -06:00
Todd d8aea569c5 Only return live workers in ListHcpbWorkersResponse (#2876) 2023-02-01 10:24:56 -08:00
Irena Rindos a030c15403 Support HCPBInt in hcpb_cluster_id field (#2880)
* initial commit
2023-02-01 13:20:07 -05:00
Johan Brandhorst-Satzkorn 55259029f1 Add job run cleaner (#2866)
* chore: remove duplicate import

* feat: Add job run cleaner

The new job cleans job runs older than a configured interval.
Configure the job to clean jobs older than 1 minute.
2023-01-31 20:41:33 -05:00
Cameron Perera bc332541c3 chore: bump ui commit for host set link fixes (#2875) 2023-01-31 18:33:01 -06:00
Cameron Perera e64b8eaef1 chore: update UI commit to include onboarding updates (#2870) 2023-01-31 16:46:57 -06:00
Michael Li 2f9727e8cf chore(enos): Upload e2e test output (#2863)
* chore(enos): Upload e2e go test output

* chore(enos): Add retention period
2023-01-31 17:28:54 -05:00
Josh Brand 7d49a3a06b Add automated cleanup for CI resources (#2814)
* Add automated cleanup for CI resources
2023-01-31 16:43:45 -05:00
Irena Rindos ed9f2b2730 bug(workers): Check initial upstreams for an HCBP environment (#2869) 2023-01-31 15:53:11 -05:00
Michael Li 036a71fc93 test(e2e): Add test for updated boundary authenticate command (#2848) 2023-01-31 14:29:39 -05:00
Jeff MalnickandJeff Mitchell a3c4cef648 Use primary auth method if no auth method ID is provided (#2725)
* feat: default to using primary auth method with authenticating

* Add ability to specify scope ID flag in authenticate method

---------

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2023-01-31 10:07:10 -08:00
Irena Rindos 2e3fd041ef Target worker filters migration fix (#2859) 2023-01-31 08:38:32 -05:00
Jeff MitchellandJohan Brandhorst-Satzkorn 19180af0eb Fix target port handling (#2846)
* Fix target port handling

This fixes two issues that compounded on each other (see the Changelog
update for more information):

* The verification logic for hosts was not correct for update operations
(in multiple ways) which meant that a host could be updated after
creation to have a port. Targets had a previously fixed bug where they
did not require a default port, which meant that ports could be used
from hosts
* A recent (unreleased) change had prioritized any port coming from the
host over the default port, which would mean there was no way if a
host had a port specified to use it in multiple targets.

This fixes the update verification logic, and strikes a middle ground
between breaking things and not by allowing existing addresses with
ports to be used with targets but ignoring that port, instead requiring
targets to have default port set at authorize time (currently there is
backwards compat that does not require this due to the original optional
port bug).

* Update CHANGELOG.md

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2023-01-26 13:35:29 -05:00
Michael Li 5fd66b8d88 chore(enos): Remove unused skip_failing_bats_tests variable (#2844) 2023-01-25 12:44:04 -05:00
Dan Heath a31eb7a261 docs: Add frontmatter to ref architecture topic (#2837)
* docs: Add frontmatter to ref architecture topic

* docs: Fix typo
2023-01-25 10:20:22 -05:00
Michael Li 461b194cde fix(e2e): Address flake due to timing (#2774)
Observed a flake in this test where a session was still reporting 0 bytes up/down on the first read. Modifying the checks to be more resilient.
2023-01-24 15:38:58 -05:00
irenarindos 8c33582627 update changelog 2023-01-24 15:02:39 -05:00
Cameron Perera 9f49d1a7f8 bump ui commit (#2841) 2023-01-24 13:53:44 -06:00
Johan Brandhorst-Satzkorn e8588620f3 Add Heimdall summary (#2830)
Used by the CORE SRE team Heimdall product to give
quick overview of all the HashiCorp repositories.
Initially this just adds some very basic information
about this repository. Could be expanded if we
expand the use of Heimdall.
2023-01-24 12:29:45 -05:00