This returns authorized actions on targets to users when they perform an operation on a target, including listing. It also prevents users from seeing values in listing targets on which they have no permissions.
It's possible there are acceptable use cases for still matching account
ID if the account no longer maps to a user, but it's equally possible
that this can cause confusion. Removing it seems safer.
* Update protos and gen
* Add new values to targets CLI command
* Lots more plumbing of new parameters through everything
* allow fields to be set to zero value.
* Disallow set but empty name/description strings in create/update verifiers
Co-authored-by: Jim Lambert <jlambert@hashicorp.com>
The changed auth logic + verify logic in the scope handler pass the
parent ID for validation, which is correct, as a scope lives in its
parent ID. However, the global scope has no parent, and the changes
resulted in an empty ID being passed in rather than the global scope
itself. This fixes that lookup.
* Shave off an IAM lookup if the user is the anonymous user
* Fix build
* If authz failures are turned off, make the token type unknown instead of invalid
* Change returned token format when authz failures are disabled
* Change logic back
* Fix logic
* Encrypt tokens on the way out and decrypt on the way in
This isn't a security feature related to tokens specifically; it's so
that we can discard cryptographically bad tokens before we ever hit the
DB. This way we can't pass through a DDoS to the database due to
fetching obviously invalid token values.
I'm using base58 to encode the resulting value as there aren't great
base62 options, and allowing base64 / and + values can hamper usability
by creating copying/highlighting breaks.
* Change auth validity feedback
Move from a bool indicating validity to lack of an error. This allows
the error to be directly returned and typed.
* Fix erroneous line
* Allow updating accounts (not username or pw).
* Updating new field names to LoginName.
* Adding creation with password test.
* Fixing documentation for WithLoginName