Commit Graph

23 Commits

Author SHA1 Message Date
rithu john
fa2f76bcdb examples: adding a gRPC client example. 2017-02-28 12:06:44 -08:00
Jeff Schroeder
4630f69f17 [Makefile] Allow specifying VERSION as an env var
This makes specifying the VERSION when building native operating system packages require less hacks.

Refs: #811
2017-02-23 12:23:33 -06:00
Eric Chiang
f778b2d33b server: update refresh tokens instead of deleting and creating another
The server implements a strategy called "Refresh Token Rotation" to
ensure refresh tokens can only be claimed once.

ref: https://tools.ietf.org/html/rfc6819#section-5.2.2.3

Previously "refresh_token" values in token responses where just the
ID of the internal refresh object. To implement rotation, when a
client redeemed a refresh token, the object would be deleted, a new
one created, and the new ID returned as the new "refresh_token".

However, this means there was no consistent ID for refresh tokens
internally, making things like foreign keys very hard to implement.
This is problematic for revocation features like showing all the
refresh tokens a user or client has out.

This PR updates the "refresh_token" to be an encoded protobuf
message, which holds the internal ID and a nonce. When a refresh
token is used, the nonce is updated to prevent reuse, but the ID
remains the same. Additionally it adds the timestamp of each
token's last use.
2017-01-11 12:07:48 -08:00
Eric Chiang
d87a4c35b9 *: add 'make revendor' and tests to catch incorrect glide usage
Introducing glide-vc caused us to unknowingly removed our Go
protobuf compiler (since it's a main). Add flags to glide-vc usage
to remedy this.

Since we now require several glide and glide-vc flags, add a Makfile
target and tests to catch when PRs don't use the correct flags.
2016-12-22 11:52:24 -08:00
Eric Chiang
18bbd94fba *: check go version before building
Add a script to check the Go version before building dex. This
gives a nice error message rather than just failing to compile.

With changes:

    $ go version
    go version go1.6.4 linux/amd64
    $ make
    ERROR: dex requires Go version 1.7+. Please update your Go installation: https://golang.org/dl/
    Makefile:93: recipe for target 'check-go-version' failed
    make: *** [check-go-version] Error 2

Checks only added for building the actual binary, not tests, since
this is aimed at users just starting off with the project.
2016-12-13 12:03:27 -08:00
Eric Chiang
391dc51c13 *: add theme based frontend configuration
This PR reworks the web layout so static files can be provided and
a "themes" directory to allow a certain degree of control over logos,
styles, etc.

This PR does NOT add general support for frontend customization,
only enough to allow us to start exploring theming internally.
The dex binary also must now be run from the root directory since
templates are no longer "compiled into" the binary.

The docker image has been updated with frontend assets.
2016-11-30 17:20:21 -08:00
Eric Chiang
26b43e19c8 *: build aci at the correct path including version, OS, and arch 2016-10-14 14:29:22 -07:00
Eric Chiang
96440e4cc5 *: fix linting 2016-10-13 18:15:20 -07:00
Eric Chiang
3dac0063df *: properly compile version into docker images 2016-10-13 17:58:40 -07:00
Eric Chiang
0fc8879da1 *: prepare build scripts for a release 2016-10-05 23:43:44 -07:00
Eric Chiang
ac4f94e848 *: add gRPC generation logic to build system 2016-10-04 00:30:30 -07:00
Eric Chiang
877eb3dc7b *: add standup script to run DB tests locally and hook up travis 2016-10-03 12:48:26 -07:00
Eric Chiang
63a62b6754 *: add code to serialize templates into go code
Add a small program to iterate over the templates directory and
generate a go map of name to file data. This is so we can compile
these templates into the dex binary instead of requiring files on
disk.

Also add a Makefile rule to do this automatically.
2016-09-05 17:25:12 -07:00
Eric Chiang
6349baf044 *: fix testing with the race detector 2016-08-10 23:00:32 -07:00
Eric Chiang
bfe560ee21 rename 2016-08-10 22:31:42 -07:00
Eric Chiang
9a5b25b27f *: add dockerfile 2016-08-09 15:27:10 -07:00
Eric Chiang
e6f34e1051 *: determine version from git 2016-08-09 14:38:09 -07:00
Eric Chiang
467d02738e *: add example-app 2016-08-08 16:32:42 -07:00
Eric Chiang
95a61454b5 *: remove reference to deleted binary 2016-08-05 15:05:46 -07:00
Eric Chiang
31082eed27 *: remove api and clt
It's not clear that the best way to manage clients is through a
gRPC based command line tool. For example we may explore an admin
dashboard and enable bootstrapping through static clients.

For now use static clients while we hold off on a more concrete
proposal.
2016-08-05 10:00:04 -07:00
Eric Chiang
c7af2c4885 *: make makefile less verbose 2016-08-01 23:02:23 -07:00
Eric Chiang
a28d22ff0c *: add gRPC to build system 2016-07-31 23:26:05 -07:00
Eric Chiang
cab271f304 initial commit 2016-07-26 15:51:24 -07:00