Eric Chiang
d255007ed9
db: log ignored base64 decode error
...
Closes #270
2016-01-15 15:31:46 -08:00
Bobby Rullo
c1f8effe1a
db, functional: make value column in key not pkey
...
go-oidc increased the size of the generated keys, which were too large
to be used as primary keys in postgres.
2015-12-28 16:02:16 -08:00
Eric Chiang
a7138b3cfd
db: rebuild miration assets using go generate
2015-12-21 09:45:53 -08:00
Eric Chiang
6cb3146b09
build,db: don't call go-bindata on every build
...
Add go generate rule to generate migration assets.
2015-12-21 09:43:45 -08:00
Eric Chiang
49389c9b90
cmd, db: verify at least one secret is passed to --key-secrets
...
Passing an empty list to the overlord or worker's --key-secrets
flag currently causes an out of range panic. Always check to ensure
there's at least one element passed.
Fixes #130
Fixes #217
2015-12-16 20:28:21 -08:00
Eric Chiang
9f3bf0d160
db: strconv.ParseInt specify base 10
...
closes #99
2015-12-09 14:47:21 -08:00
Eric Chiang
5295344f9e
db: fixed missing return statement GetConnectorByID
...
Added missing err return introduced by #199
2015-12-07 20:58:36 -08:00
Eric Chiang
f43655a8c3
user/manager: connector must exists when creating remote identity
...
Add ConnectorConfigRepo to UserManager. When trying to create a
RemoteIdentity, validate that the connector ID exists.
Fixes #198
2015-12-07 17:34:08 -08:00
George Tankersley
07a4d4441e
pkg/crypto: replace old crypto with new crypto
2015-10-29 13:45:25 -07:00
Joe Bowers
c70b29f83d
db: log schema errors, distinguish them from nil results where needed
2015-09-29 20:07:36 -07:00
Joe Bowers
2ed2859896
repo: functional repo tests
...
includes changes to ensure uniform errors for DB and in-memory repos
2015-09-29 16:46:48 -07:00
Joe Bowers
e5db302312
server: expose user disable API endpoint
2015-09-29 16:46:30 -07:00
Joe Bowers
60a36e2c2e
server,db: flag for disabling user login
2015-09-25 14:25:06 -07:00
Giulio Iotti
472e4a02a4
*: Remove unnecessary else statements
...
Whenever it makes the code easier to follow, use early return to
avoid else statements.
2015-09-04 22:45:32 +03:00
Yifan Gu
44c6cb44f5
refresh: bcrypt raw bytes rather than base64 encoded string.
...
This enables us to control the length of the bytes that will be bcrypted,
by default it's 64.
Also changed the token's stored form from string('text') to []byte('bytea')
and added some test cases for different types of invalid tokens.
2015-09-02 14:23:20 -07:00
Yifan Gu
066fd859ec
session: add 'scope' field in session.
2015-08-31 13:51:59 -07:00
bobbyrullo
5abc7633fb
Merge pull request #87 from bobbyrullo/keyspace
...
Base64 Encode secrets, and allow >1 of them
2015-08-26 10:43:42 -07:00
Bobby Rullo
c8feb5c33d
db: PrivateKeySetRepo now takes >1 secrets
...
The first secret is used to encrypt, the rest are for decryption; if the
first doesn't work, the rest are tried in order.
The makes it possible to rotate keys.
2015-08-25 16:41:20 -07:00
Bobby Rullo
74df09acb6
db: gorp moved to github.com/go-gorp/gorp
2015-08-24 15:43:15 -07:00
Bobby Rullo
4ce5a36d08
db: initialize bigint, boolean columns
...
gorp hates nil.
2015-08-20 12:38:15 -07:00
Bobby Rullo
8b6a2699d9
cmd/dex-overlord, db: migrations in overlord
...
Migrations happen only in the overlord, so there's no thundering herd,
and database initialziation can be more easily controlled.
2015-08-20 11:44:43 -07:00
Bobby Rullo
c16e3b5a10
db: add DB migration code and scripts.
2015-08-20 11:44:43 -07:00
Bobby Rullo
66fe201c24
*: move original project to dex
2015-08-18 11:26:57 -07:00