storj/satellite/satellitedb
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
..
dbx satellite/console: create account management api keys service 2022-03-23 17:02:20 +00:00
satellitedbtest satellite/sattelitedb/test: improve test database name 2022-02-22 14:45:01 +00:00
testdata satellitedb: revert migration for suspension column removal change 2022-03-23 13:42:11 +00:00
apikeys.go satellite/console: support reading apikeys by name and project id 2022-03-14 13:21:21 -05:00
attribution.go satellite/attribution: update value attribution report query 2022-02-18 14:25:19 +00:00
audithistory.go satellite/satellitedb: remove referrence to audit information in 2021-08-13 21:11:28 +00:00
bucketsdb.go satellite/metainfo: propagate geofencing between buckets and stream id 2021-11-24 08:05:05 +00:00
coinpaymentsmigration_test.go satellite/payments: chore to migrate big.Float values out of db 2022-02-16 23:48:30 +00:00
coinpaymentsmigration.go satellite/payments: chore to migrate big.Float values out of db 2022-02-16 23:48:30 +00:00
coinpaymentstxs.go satellite/satellitedb: phase 2 getting rid of gob encodings in db 2022-02-09 12:25:46 +00:00
compensation.go satellite/compensation: smaller txns for RecordPeriod 2021-03-02 20:14:25 +00:00
consoledb_test.go satellite/satellitedb/satellitedbtest: pass ctx as an argument 2020-01-20 16:35:42 +02:00
consoledb.go satellite/oidc: move oidc into common package 2022-02-08 09:46:54 -06:00
containment.go satellite/satellitedb: remove references to contained column in nodes table 2021-10-14 19:17:46 +00:00
customers.go satellite/billing: make stripe invoice generation work with multiregion satellites 2021-05-06 11:51:03 -06:00
database.go satellite/oidc: move oidc into common package 2022-02-08 09:46:54 -06:00
gracefulexit.go sql: capitalize keywords 2022-03-01 15:19:38 +00:00
invoiceprojectrecords.go satellite: use segment count for billing 2021-10-27 19:21:50 +00:00
migrate_gen.go all: fix linting issues 2022-03-21 15:26:42 +00:00
migrate_test.go satellitedb: revert migration for suspension column removal change 2022-03-23 13:42:11 +00:00
migrate.go satellitedb: revert migration for suspension column removal change 2022-03-23 13:42:11 +00:00
migratez.go satellitedb: revert migration for suspension column removal change 2022-03-23 13:42:11 +00:00
nodeapiversion.go ci: fix lint errors 2021-05-17 13:37:31 +00:00
nodeselection.go sql: capitalize keywords 2022-03-01 15:19:38 +00:00
orders.go satellite/{accounting,orders,satellitedb}: group bucket bandwidth rollups by time window 2022-01-05 20:24:48 +00:00
overlaycache.go satellite/repairer: handle excluded countries 2022-03-14 10:59:36 -04:00
payouts.go satellite/compensation: smaller txns for RecordPeriod 2021-03-02 20:14:25 +00:00
peeridentities.go all: fix dots 2020-07-16 14:58:28 +00:00
projectaccounting_test.go satellite/{projectaccounting, console}:query to get single bucket rollup 2022-03-03 12:04:29 +00:00
projectaccounting.go satellite/{projectaccounting, console}:query to get single bucket rollup 2022-03-03 12:04:29 +00:00
projectmembers_test.go web/satellite: project members sorting fixed (#3231) 2019-10-15 15:24:53 +03:00
projectmembers.go all: fix linter complaints 2020-10-13 15:59:01 +03:00
projects_test.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
projects.go satellite/{console,satellitedb}: add project segment limit to user 2021-12-16 08:46:01 +00:00
regtokens.go all: fix dots 2020-07-16 14:58:28 +00:00
repairqueue.go satellite: adjust to latest CRDB version 2022-03-23 07:16:38 +00:00
reputations.go satellite/satellitedb: remove suspension column from nodes and reputations 2022-03-21 16:56:12 +00:00
resetpasstokens.go all: fix dots 2020-07-16 14:58:28 +00:00
revocation.go sql: capitalize keywords 2022-03-01 15:19:38 +00:00
storagenodeaccounting.go sql: capitalize keywords 2022-03-01 15:19:38 +00:00
stripecoinpaymentsdb.go satellite/{payments,satellitedb}: Remove custom coupon implementation 2021-10-11 19:47:00 +00:00
users_test.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
users.go satellite/{console,satellitedb}: increase project limit on paid tier upgrade 2022-03-14 16:10:23 +00:00