Commit Graph
47 Commits
Author SHA1 Message Date
Todd Knight 39cc245966 Make gen after make tools. Includes make fmt of existing non generated files. (#1438) 2021-08-02 10:46:09 -07:00
s-christoffandJim 6b78108ecf Update primary error functions to take a context, deprecate old functions (#1358)
* add new error funcs which take a ctx and deprecate existing funcs

* use context where available when writing error events

* remove circular internal/errors pkg dep

* suppress some chatty errors using errors.WithoutEvent()

* convert auth oidc funcs to take context where needed to write events

Co-authored-by: Jim <jlambert@hashicorp.com>
2021-07-29 20:52:56 -04:00
Jeff Mitchell 140c54e319 Repoint base62 import 2021-07-14 17:31:58 -07:00
Jeff Mitchell 2cbcf9a563 Update usage of shared-secure-libs (#1393) 2021-07-12 21:06:22 -04:00
Jim 75108cbc8b Ongoing OIDC: return the primary account info along with the user. (#1145) 2021-04-20 20:33:56 -04:00
Jim 358f5a61fb bump protoc to v3.15.8 (#1147) 2021-04-18 21:34:25 -04:00
Jeff Mitchell be10cc4b42 Update grpc/proto deps (#1136)
* Update grpc/proto deps

* Make gen
2021-04-15 14:11:23 -04:00
dd0f34bc35 Add new OIDC auth method. (#1090)
Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2021-04-08 20:54:32 -04:00
Jeff Mitchell fcbf372881 Bump proto/grpc deps (#1017)
* Bump proto/grpc deps

* Back out buf change

* Run make gen
2021-03-20 16:12:01 -04:00
Louis Ruch 7387cec475 Remove sentinel errors (#968)
* Remove sentinal errors
2021-03-05 06:34:06 -08:00
s-christoff 6623be8bfb Refactor internal/auth to return domain specific errors (#905)
* Refactor internal/auth to return domain specific errors
2021-02-11 13:32:45 -06:00
Jim ffcda56f40 a small refactor, so we can easily support options when creating new auth tokens. (#920) 2021-02-10 13:52:42 -05:00
s-christoff 81785e139f [enhancement] Refactor authtoken repo to return domain specific errors (#876) 2021-02-03 17:34:46 -06:00
Jeff Mitchell 6cd97a4a6e Add support for recursive listing (#885) 2021-01-25 19:37:40 -05:00
Jeff Mitchell 84c617dc49 Run make gen after the gofumpt update 2021-01-08 10:32:02 -05:00
Michael GaffneyandJeff Mitchell 94cb79bbdd See how Boundary would look with gofumpt applied (#853)
* See how Boundary would look with https://github.com/mvdan/gofumpt applied

Results of running `gofumpt -w -s .`

* Update tools file and Makefile for gofumpt

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2021-01-07 10:02:32 -05:00
Louis Ruch bfbb179741 ICU-738/Refactor internal/db to domain errors (#815)
* Refactor internal/db to domain errors
2020-12-21 10:07:34 -08:00
Jeff Mitchell 11b821a200 Bump deps (#818) 2020-12-15 14:56:41 -05:00
Jeff MalnickandJeff Mitchell 11c7c8dbe8 feat: make auth token staleness and duration configurable (#777)
* feat: make auth token time to live and staleness configurable

* docs: add configuration docs for auth token TTL and staleness

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2020-11-16 10:39:18 -08:00
Jim af6ef1b687 Refactor existing sentinel errors (#774) 2020-11-05 16:54:03 -05:00
Jeff Mitchell cf3fa4522d Swap base58 libraries (#472)
* Swap base58 libraries

This doesn't reduce binary size but it removes a metric ton of
dependencies.
2020-09-26 14:01:49 -04:00
Jim 21ca0b6388 SetAssociatedAccounts, DisassociateAccounts, AssociateAccounts with support for multiple accounts. (#439) 2020-09-25 13:35:32 -04:00
Jeff Mitchell 35c3f5b717 Use 'at' for auth token prefix (#397) 2020-09-21 16:04:13 -04:00
Jeff Mitchell 6201357902 Use scope-specific token DEKs (#342) 2020-09-14 12:30:11 -04:00
Jim e119466233 stop oplogging tokens and allow for a time skew (#343) 2020-09-10 16:37:45 -04:00
Jeff Mitchell f94f21fd97 Update API codes (#336) 2020-09-08 23:57:26 -04:00
Michael Gaffney de162c5533 Replace and remove ErrNilParameter with ErrInvalidParameter (#295) 2020-08-25 12:18:14 -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
Jim 9570897032 basic keys mgmt repo (#264) 2020-08-19 16:47:18 -04:00
Jeff Mitchell 6661117d4c The name. The name. The name! 2020-08-10 17:15:02 -04:00
Jim 1c836c430b support for associating/disassociating an auth account with a user (#233) 2020-08-10 15:17:15 -04:00
Michael Gaffney bdb31cf8b5 Bump deps (#245) 2020-08-08 10:49:43 -04:00
Todd Knight 41b2d36d98 AuthToken Tests now use recently added TestAuthMethod and TestAccount (#226) 2020-07-31 11:43:03 -07:00
Jim cb89422d9d define immutable fields including PKs. (#205) 2020-07-30 16:04:15 -04:00
Todd Knight a0bed2b5d7 Truncate instead of round timestamps so our tests that require a time to pass can succeed. (#224) 2020-07-28 08:59:09 -04:00
Todd Knight 25514fb553 Fix a failing test due to time resolutions mismatch. (#221)
* Round generated expiration timestamps to the nearest second.
2020-07-27 14:06:59 -07: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
Todd Knight 6de1f7ee16 Auth Token Read/List/Delete handler and Go SDK (#199)
* Creating Auth Token Get List and Delete API.
2020-07-23 09:53:37 -07:00
Michael Gaffney 799242fce4 Bump deps and run 'make gen' (#212) 2020-07-22 17:00: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
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
Todd Knight beea32b8c8 Fixing test that was missed with PR #171. (#175) 2020-07-08 16:55:37 -04:00
Todd Knight 2ce9affeea Don't use repo to check impossible token requests and repo doesn't return error on token value mismatch. (#171)
* Remove error when tokens mismatch from public id but log returned errors from repo.
2020-07-08 09:09:09 -07:00
Todd Knight c44a4c4795 Tools for auth token interception and authentication (#152) 2020-07-07 12:14:26 -07:00
Todd Knight f69d6b9952 Creating Auth Token Repo (#125) 2020-07-07 07:44:49 -07:00