Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
bfe560ee
Commit
bfe560ee
authored
Aug 11, 2016
by
Eric Chiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename
parent
1cbb7700
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
52 additions
and
52 deletions
+52
-52
Dockerfile
Dockerfile
+2
-2
user-object.md
Documentation/proposals/user-object.md
+1
-1
Makefile
Makefile
+6
-6
config.go
cmd/dex/config.go
+8
-8
config_test.go
cmd/dex/config_test.go
+1
-1
init.go
cmd/dex/init.go
+0
-0
poke.go
cmd/dex/poke.go
+1
-1
serve.go
cmd/dex/serve.go
+3
-3
version.go
cmd/dex/version.go
+1
-1
github.go
connector/github/github.go
+1
-1
ldap.go
connector/ldap/ldap.go
+1
-1
connectortest.go
connector/mock/connectortest.go
+1
-1
oidc.go
connector/oidc/oidc.go
+1
-1
deployment.yaml
examples/k8s/deployment.yaml
+2
-2
glide.yaml
glide.yaml
+1
-1
handlers.go
server/handlers.go
+2
-2
oauth2.go
server/oauth2.go
+1
-1
rotation.go
server/rotation.go
+1
-1
server.go
server/server.go
+2
-2
server_test.go
server/server_test.go
+3
-3
templates.go
server/templates.go
+1
-1
client.go
storage/kubernetes/client.go
+2
-2
garbage_collection_test.go
storage/kubernetes/garbage_collection_test.go
+1
-1
storage.go
storage/kubernetes/storage.go
+2
-2
storage_test.go
storage/kubernetes/storage_test.go
+1
-1
types.go
storage/kubernetes/types.go
+2
-2
memory.go
storage/memory/memory.go
+1
-1
memory_test.go
storage/memory/memory_test.go
+1
-1
static_clients_test.go
storage/memory/static_clients_test.go
+1
-1
storagetest.go
storage/storagetest/storagetest.go
+1
-1
No files found.
Dockerfile
View file @
bfe560ee
...
...
@@ -4,8 +4,8 @@ MAINTAINER Eric Chiang <eric.chiang@coreos.com>
RUN
apk add
--update
ca-certificates
COPY
bin/
poke /poke
COPY
bin/
dex /dex
ENTRYPOINT
["/
poke
"]
ENTRYPOINT
["/
dex
"]
CMD
["version"]
Documentation/proposals/user-object.md
View file @
bfe560ee
...
...
@@ -73,7 +73,7 @@ type RemoteIdentity struct {
`UserID`
fields will be added to the
`AuthRequest`
,
`AuthCode`
and
`RefreshToken`
structs. When a user logs in successfully through a connector
[
here
](
https://github.com/coreos/
poke
/blob/95a61454b522edd6643ced36b9d4b9baa8059556/server/handlers.go#L227
)
,
[
here
](
https://github.com/coreos/
dex
/blob/95a61454b522edd6643ced36b9d4b9baa8059556/server/handlers.go#L227
)
,
the server will attempt to either get the user, or create one if none exists with
the remote identity.
...
...
Makefile
View file @
bfe560ee
PROJ
=
poke
PROJ
=
dex
ORG_PATH
=
github.com/coreos
REPO_PATH
=
$(ORG_PATH)
/
$(PROJ)
export
PATH
:=
$(PWD)
/bin:
$(PATH)
VERSION
=
$(
shell
./scripts/git-version
)
DOCKER_REPO
=
quay.io/ericchiang/
poke
DOCKER_REPO
=
quay.io/ericchiang/
dex
DOCKER_IMAGE
=
$(DOCKER_REPO)
:
$(VERSION)
export
GOBIN
=
$(PWD)
/bin
...
...
@@ -17,10 +17,10 @@ LD_FLAGS="-w -X $(REPO_PATH)/version.Version=$(VERSION)"
GOOS
=
$(
shell
go
env
GOOS
)
GOARCH
=
$(
shell
go
env
GOARCH
)
build
:
bin/
poke
bin/example-app
build
:
bin/
dex
bin/example-app
bin/
poke
:
FORCE
@
go
install
-ldflags
$(LD_FLAGS)
$(REPO_PATH)
/cmd/
poke
bin/
dex
:
FORCE
@
go
install
-ldflags
$(LD_FLAGS)
$(REPO_PATH)
/cmd/
dex
bin/example-app
:
FORCE
@
go
install
-ldflags
$(LD_FLAGS)
$(REPO_PATH)
/cmd/example-app
...
...
@@ -43,7 +43,7 @@ lint:
done
.PHONY
:
docker-build
docker-build
:
bin/
poke
docker-build
:
bin/
dex
@
docker build
-t
$(DOCKER_IMAGE)
.
.PHONY
:
docker-push
...
...
cmd/
poke
/config.go
→
cmd/
dex
/config.go
View file @
bfe560ee
...
...
@@ -3,14 +3,14 @@ package main
import
(
"fmt"
"github.com/coreos/
poke
/connector"
"github.com/coreos/
poke
/connector/github"
"github.com/coreos/
poke
/connector/ldap"
"github.com/coreos/
poke
/connector/mock"
"github.com/coreos/
poke
/connector/oidc"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
poke
/storage/kubernetes"
"github.com/coreos/
poke
/storage/memory"
"github.com/coreos/
dex
/connector"
"github.com/coreos/
dex
/connector/github"
"github.com/coreos/
dex
/connector/ldap"
"github.com/coreos/
dex
/connector/mock"
"github.com/coreos/
dex
/connector/oidc"
"github.com/coreos/
dex
/storage"
"github.com/coreos/
dex
/storage/kubernetes"
"github.com/coreos/
dex
/storage/memory"
)
// Config is the config format for the main application.
...
...
cmd/
poke
/config_test.go
→
cmd/
dex
/config_test.go
View file @
bfe560ee
...
...
@@ -3,7 +3,7 @@ package main
import
(
"testing"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
dex
/storage"
"github.com/kylelemons/godebug/pretty"
yaml
"gopkg.in/yaml.v2"
...
...
cmd/
poke
/init.go
→
cmd/
dex
/init.go
View file @
bfe560ee
File moved
cmd/
poke
/poke.go
→
cmd/
dex
/poke.go
View file @
bfe560ee
...
...
@@ -9,7 +9,7 @@ import (
func
commandRoot
()
*
cobra
.
Command
{
rootCmd
:=
&
cobra
.
Command
{
Use
:
"
poke
"
,
Use
:
"
dex
"
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
cmd
.
Help
()
os
.
Exit
(
2
)
...
...
cmd/
poke
/serve.go
→
cmd/
dex
/serve.go
View file @
bfe560ee
...
...
@@ -10,8 +10,8 @@ import (
"github.com/spf13/cobra"
yaml
"gopkg.in/yaml.v2"
"github.com/coreos/
poke
/server"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
dex
/server"
"github.com/coreos/
dex
/storage"
)
func
commandServe
()
*
cobra
.
Command
{
...
...
@@ -19,7 +19,7 @@ func commandServe() *cobra.Command {
Use
:
"serve [ config file ]"
,
Short
:
"Connect to the storage and begin serving requests."
,
Long
:
``
,
Example
:
"
poke
serve c.yaml"
,
Example
:
"
dex
serve c.yaml"
,
RunE
:
serve
,
}
}
...
...
cmd/
poke
/version.go
→
cmd/
dex
/version.go
View file @
bfe560ee
...
...
@@ -4,7 +4,7 @@ import (
"fmt"
"runtime"
"github.com/coreos/
poke
/version"
"github.com/coreos/
dex
/version"
"github.com/spf13/cobra"
)
...
...
connector/github/github.go
View file @
bfe560ee
...
...
@@ -13,7 +13,7 @@ import (
"golang.org/x/oauth2"
"golang.org/x/oauth2/github"
"github.com/coreos/
poke
/connector"
"github.com/coreos/
dex
/connector"
)
const
baseURL
=
"https://api.github.com"
...
...
connector/ldap/ldap.go
View file @
bfe560ee
...
...
@@ -7,7 +7,7 @@ import (
"gopkg.in/ldap.v2"
"github.com/coreos/
poke
/connector"
"github.com/coreos/
dex
/connector"
)
// Config holds the configuration parameters for the LDAP connector.
...
...
connector/mock/connectortest.go
View file @
bfe560ee
...
...
@@ -8,7 +8,7 @@ import (
"net/http"
"net/url"
"github.com/coreos/
poke
/connector"
"github.com/coreos/
dex
/connector"
)
// New returns a mock connector which requires no user interaction. It always returns
...
...
connector/oidc/oidc.go
View file @
bfe560ee
...
...
@@ -11,7 +11,7 @@ import (
"golang.org/x/net/context"
"golang.org/x/oauth2"
"github.com/coreos/
poke
/connector"
"github.com/coreos/
dex
/connector"
)
// Config holds configuration options for OpenID Connect logins.
...
...
examples/k8s/deployment.yaml
View file @
bfe560ee
...
...
@@ -12,10 +12,10 @@ spec:
app
:
dex
spec
:
containers
:
-
image
:
quay.io/ericchiang/
poke
-
image
:
quay.io/ericchiang/
dex
name
:
dex
command
:
-
"
/
poke
"
-
"
/
dex
"
-
"
serve"
-
"
/dex/config.yaml"
env
:
...
...
glide.yaml
View file @
bfe560ee
# NOTE(ericchiang): Create a separate block for each dependency so it's clear
# which dependencies require which transitive dependencies.
package
:
github.com/coreos/
poke
package
:
github.com/coreos/
dex
import
:
-
package
:
github.com/spf13/cobra
...
...
server/handlers.go
View file @
bfe560ee
...
...
@@ -15,8 +15,8 @@ import (
"github.com/gorilla/mux"
jose
"gopkg.in/square/go-jose.v2"
"github.com/coreos/
poke
/connector"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
dex
/connector"
"github.com/coreos/
dex
/storage"
)
func
(
s
*
Server
)
handlePublicKeys
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
...
...
server/oauth2.go
View file @
bfe560ee
...
...
@@ -10,7 +10,7 @@ import (
"strings"
"time"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
dex
/storage"
)
// TODO(ericchiang): clean this file up and figure out more idiomatic error handling.
...
...
server/rotation.go
View file @
bfe560ee
...
...
@@ -13,7 +13,7 @@ import (
"golang.org/x/net/context"
"gopkg.in/square/go-jose.v2"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
dex
/storage"
)
// rotationStrategy describes a strategy for generating cryptographic keys, how
...
...
server/server.go
View file @
bfe560ee
...
...
@@ -11,8 +11,8 @@ import (
"github.com/gorilla/mux"
"github.com/coreos/
poke
/connector"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
dex
/connector"
"github.com/coreos/
dex
/storage"
)
// Connector is a connector with metadata.
...
...
server/server_test.go
View file @
bfe560ee
...
...
@@ -14,9 +14,9 @@ import (
"golang.org/x/net/context"
"golang.org/x/oauth2"
"github.com/coreos/
poke
/connector/mock"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
poke
/storage/memory"
"github.com/coreos/
dex
/connector/mock"
"github.com/coreos/
dex
/storage"
"github.com/coreos/
dex
/storage/memory"
)
func
mustLoad
(
s
string
)
*
rsa
.
PrivateKey
{
...
...
server/templates.go
View file @
bfe560ee
...
...
@@ -5,7 +5,7 @@ import (
"net/http"
"text/template"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
dex
/storage"
)
type
connectorInfo
struct
{
...
...
storage/kubernetes/client.go
View file @
bfe560ee
...
...
@@ -22,8 +22,8 @@ import (
"golang.org/x/net/context"
yaml
"gopkg.in/yaml.v2"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
poke
/storage/kubernetes/k8sapi"
"github.com/coreos/
dex
/storage"
"github.com/coreos/
dex
/storage/kubernetes/k8sapi"
)
type
client
struct
{
...
...
storage/kubernetes/garbage_collection_test.go
View file @
bfe560ee
...
...
@@ -4,7 +4,7 @@ import (
"testing"
"time"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
dex
/storage"
)
func
muster
(
t
*
testing
.
T
)
func
(
err
error
)
{
...
...
storage/kubernetes/storage.go
View file @
bfe560ee
...
...
@@ -10,8 +10,8 @@ import (
homedir
"github.com/mitchellh/go-homedir"
"golang.org/x/net/context"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
poke
/storage/kubernetes/k8sapi"
"github.com/coreos/
dex
/storage"
"github.com/coreos/
dex
/storage/kubernetes/k8sapi"
)
const
(
...
...
storage/kubernetes/storage_test.go
View file @
bfe560ee
...
...
@@ -4,7 +4,7 @@ import (
"os"
"testing"
"github.com/coreos/
poke
/storage/storagetest"
"github.com/coreos/
dex
/storage/storagetest"
)
func
TestLoadClient
(
t
*
testing
.
T
)
{
...
...
storage/kubernetes/types.go
View file @
bfe560ee
...
...
@@ -5,8 +5,8 @@ import (
jose
"gopkg.in/square/go-jose.v2"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
poke
/storage/kubernetes/k8sapi"
"github.com/coreos/
dex
/storage"
"github.com/coreos/
dex
/storage/kubernetes/k8sapi"
)
// There will only ever be a single keys resource. Maintain this by setting a
...
...
storage/memory/memory.go
View file @
bfe560ee
...
...
@@ -5,7 +5,7 @@ import (
"errors"
"sync"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
dex
/storage"
)
// New returns an in memory storage.
...
...
storage/memory/memory_test.go
View file @
bfe560ee
...
...
@@ -3,7 +3,7 @@ package memory
import
(
"testing"
"github.com/coreos/
poke
/storage/storagetest"
"github.com/coreos/
dex
/storage/storagetest"
)
func
TestStorage
(
t
*
testing
.
T
)
{
...
...
storage/memory/static_clients_test.go
View file @
bfe560ee
...
...
@@ -4,7 +4,7 @@ import (
"reflect"
"testing"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
dex
/storage"
)
func
TestStaticClients
(
t
*
testing
.
T
)
{
...
...
storage/storagetest/storagetest.go
View file @
bfe560ee
...
...
@@ -8,7 +8,7 @@ import (
"testing"
"time"
"github.com/coreos/
poke
/storage"
"github.com/coreos/
dex
/storage"
)
var
neverExpire
=
time
.
Now
()
.
Add
(
time
.
Hour
*
24
*
365
*
100
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment