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
Michael Gaffney
e03a0ff9d7
Simplify SetTableName pattern ( #214 )
2020-07-23 17:58:41 -04:00
Todd Knight
f47046f158
Update Watchtower to use grpc-gateway v2 ( #204 )
...
* Migration to grpc gateway v2.
2020-07-23 11:26:15 -07:00
Michael Gaffney
799242fce4
Bump deps and run 'make gen' ( #212 )
2020-07-22 17:00:22 -04:00
Michael Gaffney
ebf69bbd27
Fix error string for lookupAfterWrite ( #208 )
...
The following error string was the end result of an error in lookupAfterWrite:
`set password configuration: update: lookup error lookup after write: failed record not found`
The error string with this change applied would be:
`set password configuration: update: lookup after write: record not found`
2020-07-20 17:20:22 -04:00
Jeff Mitchell
dec1f07266
Update deps and make proto
2020-07-20 13:47:27 -04:00
Jim
c83e90ed38
implement SetTableName patttern that allows table name to be set back to the default for the storage type. ( #196 )
2020-07-17 16:20:56 -04:00
Jim
1bebe7a261
Convert option db.WithVersion to *uint32 ( #195 )
2020-07-15 13:12:15 -04:00
Todd Knight
28dbcd84bd
Authenticate Handler API and SDK, and much more ( #183 )
2020-07-14 17:32:47 -04:00
Jeff Mitchell
acce195dcb
Organizations -> orgs consistency ( #189 )
...
* Organizations -> orgs consistency
* Fix up some tests and some mistaken substitutions
2020-07-11 12:00:49 -04:00
Jim and Jeff Mitchell
260703febe
add group member capabilities ( #178 )
...
* add group member capabilities
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com >
2020-07-10 19:01:23 -04:00
Jeff Mitchell and Jim Lambert
c657e4b9fc
Fix test broken through various merges ( #186 )
...
Co-authored-by: Jim Lambert <jlambert@hashicorp.com >
2020-07-10 18:59:39 -04:00
bcdcaffa6f
Port over 162 and 165 to master ( #176 )
...
Co-authored-by: Jim Lambert <jlambert@hashicorp.com >
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com >
2020-07-10 15:46:26 -04:00
Todd Knight and Jeff Mitchell
1ddc59f81e
Adding principal custom methods to roles handler. ( #180 )
...
* Adding Add/Set/Remove principals API calls.
* Add SDK custom methods.
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com >
2020-07-10 11:21:11 -07:00
Jim
136e923583
make iam_role scope_id immutable ( #179 )
2020-07-10 10:22:38 -04:00
Jeff Mitchell
732c07126d
Introduce global scope ( #168 )
...
Introduce the global scope, which holds some resources that don't necessarily belong at either the org or project level.
2020-07-08 17:20:20 -04:00
Jim
6c1b45f7f5
add principal roles (users and groups) to iam ( #163 )
2020-07-08 17:02:01 -04:00
Todd Knight
f69d6b9952
Creating Auth Token Repo ( #125 )
2020-07-07 07:44:49 -07:00
Todd Knight
bb4a185412
Pushing test db cleanup up to where the database objects are created using t.Cleanup. ( #166 )
2020-07-06 10:15:01 -07:00
Jeff Mitchell
316b250a24
Use dockertest v3 consistently ( #167 )
2020-07-06 12:41:09 -04:00
Jim
d0a846823a
support for NewOplogMsgs() option when calling CreateItems and DeleteItems ( #158 )
2020-07-01 05:40:02 -04:00
Jim
8d8bb42418
add CreateItems and DeleteItems to writer interface ( #156 )
2020-06-29 19:28:15 -04:00
Jim
3e3144117e
iam and auth integration ( #144 )
2020-06-29 08:18:57 -04:00
Jim
9a87df38c7
add CreateItems() and DeleteItems() ( #146 )
2020-06-29 06:31:23 -04:00
Michael Gaffney
d69588131c
Fix for panic in db.setFieldsToNil ( #155 )
2020-06-28 16:55:57 -04:00
Jim
6641244734
add support for WithVersion option to updates ( #126 )
2020-06-24 12:33:49 -04:00
Michael Gaffney
c110c86ee5
Add function to check if db error is a check constraint violation ( #142 )
2020-06-23 18:00:50 -04:00
Todd Knight
0c8385b423
Updating TxHandler to accept a reader as well in order to support reads inside the same transactions as writes. ( #139 )
2020-06-22 13:27:26 -07:00
Michael Gaffney
6908f7a7a2
Use standard column names ( #138 )
2020-06-22 13:54:55 -04:00
Michael Gaffney
1023c90729
Enforce auth_account to iam_user plus iam_scope constraints ( #137 )
2020-06-21 13:16:03 -04:00
Michael Gaffney
0ebb38bbe5
auth method schema ( #131 )
...
* Rename iam migrations to 06
* Add base tables for auth methods and auth accounts
* Add triggers for auth_method and auth_account subtypes
2020-06-19 13:10:05 -04:00
Jim
c413e013bd
get oplog Ticket before writing data ( #127 )
2020-06-18 21:24:55 -04:00
Jim
d9073a03d5
listing users ( #118 )
2020-06-16 18:59:30 -04:00
Jim
ffddf24f86
iam roles ( #116 )
2020-06-15 12:42:08 -04:00
Michael Gaffney
2d650b241d
Fix down migrations ( #120 )
...
* Fix iam down migrations
* Fix '03_db' down migrations
* Fix oplog down migrations
* Fix domain down migrations
* Run make gen
2020-06-13 07:20:40 -04:00
Jim
5c2cff3ad2
iam groups ( #112 )
2020-06-11 16:36:47 -04:00
Michael Gaffney
4f30983c14
Bump deps and run make gen ( #115 )
2020-06-11 10:08:54 -04:00
Jim
2d18177c9d
oplog support for null field updates ( #107 )
2020-06-10 06:56:46 -04:00
Jim
c70847fbac
refactor delete test to be table driven. ( #102 )
2020-06-09 21:22:15 -04:00
Jeff Mitchell
5333482ff8
Fix gorm newlines issue ( #108 )
...
Even if you made a custom formatter for gorm, it would blithely println
anything returned, including nils, resulting in lots of new lines when
we were ignoring output. This also creates a custom logger that doesn't
do anything when newlines are found.
2020-06-08 21:12:00 -04:00
Jim
7d4993fb61
iam users ( #96 )
2020-06-04 20:05:08 -04:00
Jim and Jim Lambert
e3fdb493b8
prevent primary key updates ( #95 )
...
* prevent primary key updates
* better error to return
Co-authored-by: Jim Lambert <jimlambrt@Jims-MBP-3.home >
2020-06-03 09:51:34 -04:00
Jim
1048673171
update dbassert dep ( #100 )
2020-06-02 12:07:00 -04:00
Jim
9feb280536
wrapper for dbasserts ( #94 )
2020-06-02 08:59:40 -04:00
Jeff Mitchell
c175fcde8d
Add a gorm log formatter to adapt to hclog ( #93 )
...
This is also added in a test that otherwise output to stdout, which
validates functionality.
2020-06-01 17:32:48 -04:00
Michael Gaffney
5bdd8a46ea
Extract timestamp scanners into reusable package ( #91 )
...
* Refactor: move Timestamp from static/store to db/timestamp
* Refactor: convert remaining Timestamps to timestamp.Timestamp
* Use new db timestamp
2020-06-01 11:46:50 -04:00
Michael Gaffney
9eaf8afb6f
Rename db.IsUnique to db.IsUniqueError ( #90 )
2020-06-01 09:54:02 -04:00
Jim
ef6edbd515
Null updates ( #78 )
2020-05-31 19:55:56 -04:00
Michael Gaffney
6d123d91bb
Fix comment for trigger ( #92 )
2020-05-29 14:51:22 -04:00
Jeff Mitchell
31ef4a65ac
Bump deps and make gen
2020-05-29 11:21:12 -04:00