If a worker starts up and tries to connect to a controller before the
controller has a chance for its rotate roots job to run, it'll spit out
a nasty-looking error. It's harmless (things just retry and then work)
but scary (`tls: internal error`).
Rotating at creation time ensures that it's ready by the time a worker
is able to perform any connection against the cluster port.
We generally care about preserving JSON compatibility for protobuf
files, but for some files, where we only use pure gRPC, we only
care about preserving wire compatibility.
Split our buf breaking invocation into two invocations, one that checks
for WIRE_JSON compatibility, and one that checks only for WIRE
compatibility. The former check ignores protos in controller/servers,
since they do not need to adhere to this stricter definition.
* (refactor) change all sql references of user_password to username_password
* refactor(pkg) renamed pkg userpassword to usernamepassword
* refactor(proto) updated protocol buffers to use UsernamePassword
* refactor(code) updated references from UserPassword to UsernamePassword in golang files
* refactor(test) updated unit tests to reference UsernamePassword changes
* refactor(ddtest) updated references in dbtests to use UsernamePassword
* chore(sql-test) fixed spelling issue
* chore(sql) added and updated comments in migartion & tables. fixed indentations
* chore(proto) updated comments to reflect username_password changes
* refactor(tests) updated unit tests to replace user-password with username-password
* refactor(cmd) updated cmd help text to use username
* chore(tests) update test name & comments
* fix(cmd) fixed cmd usage definition for credentials update
* refactor(tests) removed out of scope changes
* fix(sql) incremented sql migration id & updated migration comments
* fix (worker): send workerId when authorizing session
Send the workerId returned from the last success worker status
when authorizing a session.
* fixup! fix (worker): send workerId when authorizing session
* fixup! fix (worker): send workerId when authorizing session
* refactor (worker): deprecate workerId in ActivateSessionRequest
It wasn't being used anywho
* fixup! fix (worker): send workerId when authorizing session
* Update LookupSessionRequest
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
This essentially worked for non-dev mode before but would create storage
directories that weren't actually used or needed, and it didn't work in
dev mode because it made assumptions about the presence of a worker auth
kms or not. This fixes those behaviors.
* Don't automatically create worker names, as this is now invalid for
PKI workers
* Fix a check in dev that clears out name/description in exactly the
wrong cases
* Change eventing setup to use a hostname-based ID instead of the name
(which could change on every start anyways)
* fix: Propagate plugin options to CreatePlugin
Plugin options were previously only applied to the
BuildPluginMap call, resulting in the plugin
execution_dir variable being ineffective.
Also add a test to verify functionality
* fix: Support plugin execution_dir for all plugins
Previously, only external host plugins would respect
the plugin execution dir. Now, all uses of the embedded
plugins respect the configuration.
* Send more info on KMS connect (#2182)
* Update nodeenrollment to v0.1.0
* bug(workersAPI): do not allow nonprintable or uppercase name or desc
* Put checks on create too
* Apply printable check to description in DB
* chore (worker): address PR feedback
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
Co-authored-by: Jim <jlambert@hashicorp.com>
* feature (workers): required schema changes
Changes required for consolidation of worker name, description
and address fields
* fixup! feature (workers): required schema changes
* fixup! feature (workers): required schema changes
* fixup! feature (workers): required schema changes
* Fixing up address constraint.
* last_status_time = now() on insert only if the worker is type = 'kms'
* update last_status_time for pki and kms based on different columns being updated.
* tweaking the constraints on last_status_time and address.
Co-authored-by: Todd <github@quaddi.com>