Commit Graph
37 Commits
Author SHA1 Message Date
Jim 1e71c55920 deprecate access to underlying *sql.DB via internal/db.DB() (#506) 2020-09-30 18:11:59 -04:00
Jeff Mitchell 8d8a7358f8 Add AdditionalVerification function (#423) 2020-09-23 23:39:44 -04:00
Todd Knight 2f8d7f0a32 API Errors: Hide and log internal errors (#411) 2020-09-23 08:10:27 -07:00
Jeff Mitchell 9b2646eaf9 Fix retry behavior with KMS recovery and misleading error message (#391) 2020-09-21 11:05:44 -04:00
Jeff MitchellandJim Lambert 62baef1b7e Add multi connection parameters through targets and into session creation (#375)
* 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>
2020-09-19 10:31:49 -04:00
Todd Knight c3ecea172d Generate new version of SDK resources and Add Tests (#331) 2020-09-08 16:27:51 -04:00
Michael Gaffney de162c5533 Replace and remove ErrNilParameter with ErrInvalidParameter (#295) 2020-08-25 12:18:14 -04:00
Jeff Mitchell 8f579c75c3 paum -> ampw (#303) 2020-08-25 00:21:08 -04:00
Jeff Mitchell 74544f6324 Encrypt tokens on the way out and decrypt on the way in (#302)
* 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.
2020-08-25 00:20:50 -04:00
Jeff Mitchell ac4d9fa311 Add nonce storage and replay prevention test (#293) 2020-08-24 13:22:10 -04:00
Jim 9570897032 basic keys mgmt repo (#264) 2020-08-19 16:47:18 -04:00
Todd Knight 1deea8aa3a Fixing missed documentation fix from PR 267. 2020-08-17 10:07:56 -07:00
Todd Knight e14f968fc3 Account (Set|Change)Passsword (#267) 2020-08-17 09:37:15 -07:00
Todd Knight 23b437894a Masks can now update attribute fields. (#271) 2020-08-14 14:08:12 -07:00
Todd Knight 245c7fbb44 Add Account Update handler (#257)
* Allow updating accounts (not username or pw).

* Updating new field names to LoginName.

* Adding creation with password test.

* Fixing documentation for WithLoginName
2020-08-12 08:20:35 -07:00
Jeff Mitchell 4cfab04307 Migrate user name to login name (#255) 2020-08-11 17:25:00 -04:00
Jeff Mitchell 61378381c6 Add version to account update (#252) 2020-08-11 12:28:11 -04:00
Jeff Mitchell 565059ed63 Add versioning to auth methods and accounts (#249) 2020-08-11 11:19:29 -04:00
Michael GaffneyandJeff Mitchell a7c467bd68 Password - UpdateAccount and SetPassword (#248)
* Implement UpdateAccount

* Implement SetPassword

* Add tests for duplicate user names

* Fix imports broken after product rename

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2020-08-11 10:12:36 -04:00
Jeff Mitchell 6661117d4c The name. The name. The name! 2020-08-10 17:15:02 -04:00
Michael Gaffney bdb31cf8b5 Bump deps (#245) 2020-08-08 10:49:43 -04:00
Jeff Mitchell 6a21e8dedb Fix some speling and a test 2020-08-07 21:14:07 -04:00
Jeff Mitchell 5bf307797b Fix typo and also set default min user name length to 3 because jeff, jim, todd, mike 2020-08-07 13:38:44 -04:00
Todd Knight f84991c0f1 Use authenticate and Auth Method repo functions (#242) 2020-08-07 10:18:40 -07:00
Jeff Mitchell 908a299ea3 Convert SDK to the new options API (#238) 2020-08-07 12:55:02 -04:00
Todd Knight b7bf76a9ba Auth Method API Handler for CRUDL (not updating password specific fields)(#239) 2020-08-06 12:50:20 -07:00
Michael Gaffney 7fefd5e2fe Change password (#237)
* Implement ChangePassword

* Refactor: extract authenticate method

* Update tests to verify oplog entries

* More refactoring

* Remove extraneous clones

* More refactoring
2020-08-06 13:03:42 -04:00
Todd Knight e5ec1f48b2 Account API handler for CRDL operations (#228) 2020-08-05 10:19:55 -07:00
Todd Knight 3204e54dc2 Add lookup, list, update, and delete methods for auth methods. (#230) 2020-07-31 14:35:56 -07:00
Todd Knight 41b2d36d98 AuthToken Tests now use recently added TestAuthMethod and TestAccount (#226) 2020-07-31 11:43:03 -07:00
Michael Gaffney 5ceb335466 Rehash credential during authentication if config has change (#234) 2020-07-31 14:42:22 -04:00
Michael GaffneyandTodd Knight 6c679a9939 Add password authentication using Argon2 (#227)
* Add argon2 credentials

* Verify oplog in tests

* Refactor: rename field

* Update internal/auth/password/repository_account.go

Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>

* Add inline comments to SQL query to doc mapping to structure

* Refactor: move authentication query to query.go file

* Replace immutable_create_time_func with immutable_columns

Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
2020-07-31 11:18:41 -04:00
Michael Gaffney c163d790a4 Add configuration settings for Argon2 password KDF (#217)
* Bump generated proto code

* Add argon2 conf sql and proto files

* Add generated code for argon2 conf

* Add Resources for Argon2 configuration

* Add get and set Configuration to repository

* Add current config reference to AuthMethod

* Fix authmethod_test

* Fix TestAccount_New

* Add WithConfiguration to options

* Add sql views for current configuration

* Fix SetTableName

* Remove duplicate testAccounts function

* Make tests clearer

* Fix comment

* Rename test variable

* Use NewPrivateId function for private Ids

* Refactor: rename public_id to private_id for password_conf and password_credential

* Remove bad comment

* Check if embedded argon2 configuration is nil

* Add checks around the WithConfiguration option

* Use spaces not tabs in proto file

* Add doc to explain choice of oplog ticket

* Verify oplog in test
2020-07-29 07:58:19 -04:00
Todd Knight e943220468 Add Delete Password Accounts to repo. (#220) 2020-07-28 09:06:50 -07:00
Jeff Mitchell 194db3a6d8 make proto 2020-07-27 15:14:21 -04:00
Todd Knight 37d8f78091 Lookup and List Repo Methods for Password Auth Accounts (#216) 2020-07-24 11:38:27 -07:00
Michael Gaffney 7897c1cf52 Add base resources for password authentication (#213)
* Add base SQL and protobuf files

* Add options and public Ids

* Add AuthMethod and Account resources

* Add repository

* Add CreateAuthMethod to repository

* Add CreateAccount method to repository

* Remove redundant foreign keys

* Document relationships between iam and auth tables

* Document relationships between auth and auth_password tables

* Add documentation for subtype triggers

* Use wt_scope_id domain type for scope_id

* Refactor: move test helper function

* Remove check from SetTableName

* Remove check from another SetTableName

* Use org scope in tests

* Remove handling of CreateTime and UpdateTime from docs
2020-07-24 10:23:35 -04:00