storj/satellite/oidc
Cameron 84b522bc06 satellite/console: create account management api keys service
We are in the process of creating an api to allow users to manage their
accounts programmatically. We would like to use api keys for
authorization. We were originally going to create an entirely new table
for these api keys, but seeing as we already have 2 other tables for
keys/tokens, api_keys and oauth_tokens, we thought it might be better to
use one of these. We're using oauth_tokens.

We create a new oidc.OAuthTokenKind for account management api keys:
KindAccountManagementTokenV0. We made the key versioned because we
likely want to improve the implementation in the future, but we want to
get something functional out the door ASAP because the account management
api feature is highly desired.

Add a new method to oidc.OAuthTokens interface for revoking v0 account
management api keys, RevokeAccountManagementTokenV0. Add update method
to dbx implementation to allow updating the expiration. We will revoke
these keys by setting the expiration to 0 so they are expired.

Change-Id: Ideb8ae04b23aa55d5825b064b5e43e32eadc1fba
2022-03-23 17:02:20 +00:00
..
database.go satellite/console: create account management api keys service 2022-03-23 17:02:20 +00:00
dbx_test.go satellite/console: create account management api keys service 2022-03-23 17:02:20 +00:00
dbx.go satellite/console: create account management api keys service 2022-03-23 17:02:20 +00:00
doc.go satellite/console: added oidc endpoints 2022-03-16 12:01:26 +00:00
endpoint.go satellite/oidc: add integration test 2022-03-18 16:14:18 +00:00
integration_test.go satellite/oidc: add integration test 2022-03-18 16:14:18 +00:00
oauth_generates_test.go satellite/console: added oidc endpoints 2022-03-16 12:01:26 +00:00
oauth_generates.go satellite/oidc: add integration test 2022-03-18 16:14:18 +00:00
oauth_stores.go all: fix linting issues 2022-03-21 15:26:42 +00:00
service.go all: fix linting issues 2022-03-21 15:26:42 +00:00