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
33f01990
Commit
33f01990
authored
Mar 20, 2017
by
Eric Chiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*: fix spelling using github.com/client9/misspell
parent
4bf74d8a
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
10 deletions
+10
-10
saml.go
connector/saml/saml.go
+1
-1
config-dev.yaml
examples/config-dev.yaml
+2
-2
glide.yaml
glide.yaml
+1
-1
check-go-version
scripts/check-go-version
+2
-2
handlers.go
server/handlers.go
+2
-2
rotation_test.go
server/rotation_test.go
+1
-1
server_test.go
server/server_test.go
+1
-1
No files found.
connector/saml/saml.go
View file @
33f01990
...
@@ -341,7 +341,7 @@ func (p *provider) HandlePOST(s connector.Scopes, samlResponse string) (ident co
...
@@ -341,7 +341,7 @@ func (p *provider) HandlePOST(s connector.Scopes, samlResponse string) (ident co
if
!
ok
{
if
!
ok
{
return
ident
,
fmt
.
Errorf
(
"no attribute with name %q"
,
p
.
groupsAttr
)
return
ident
,
fmt
.
Errorf
(
"no attribute with name %q"
,
p
.
groupsAttr
)
}
}
// TO
OD
(ericchiang): Do we need to further trim whitespace?
// TO
DO
(ericchiang): Do we need to further trim whitespace?
ident
.
Groups
=
strings
.
Split
(
groupsStr
,
p
.
groupsDelim
)
ident
.
Groups
=
strings
.
Split
(
groupsStr
,
p
.
groupsDelim
)
}
else
{
}
else
{
groups
,
ok
:=
attributes
.
all
(
p
.
groupsAttr
)
groups
,
ok
:=
attributes
.
all
(
p
.
groupsAttr
)
...
...
examples/config-dev.yaml
View file @
33f01990
...
@@ -40,7 +40,7 @@ web:
...
@@ -40,7 +40,7 @@ web:
# Instead of reading from an external storage, use this list of clients.
# Instead of reading from an external storage, use this list of clients.
#
#
# If this option isn't cho
o
sen clients may be added through the gRPC API.
# If this option isn't chosen clients may be added through the gRPC API.
staticClients
:
staticClients
:
-
id
:
example-app
-
id
:
example-app
redirectURIs
:
redirectURIs
:
...
@@ -68,7 +68,7 @@ enablePasswordDB: true
...
@@ -68,7 +68,7 @@ enablePasswordDB: true
# A static list of passwords to login the end user. By identifying here, dex
# A static list of passwords to login the end user. By identifying here, dex
# won't look in its underlying storage for passwords.
# won't look in its underlying storage for passwords.
#
#
# If this option isn't cho
o
sen users may be added through the gRPC API.
# If this option isn't chosen users may be added through the gRPC API.
staticPasswords
:
staticPasswords
:
-
email
:
"
admin@example.com"
-
email
:
"
admin@example.com"
# bcrypt hash of the string "password"
# bcrypt hash of the string "password"
...
...
glide.yaml
View file @
33f01990
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
# * Use glide and glide-vc.
# * Use glide and glide-vc.
# * List transitive dependencies.
# * List transitive dependencies.
# * Create a separate block for each dependency group.
# * Create a separate block for each dependency group.
# * Keep updates to "vendor/" in a sep
e
rate commit from actual changes.
# * Keep updates to "vendor/" in a sep
a
rate commit from actual changes.
package
:
github.com/coreos/dex
package
:
github.com/coreos/dex
import
:
import
:
...
...
scripts/check-go-version
View file @
33f01990
...
@@ -11,7 +11,7 @@ FULL_GOVERSION=$( echo -n "$VERSION" | grep -o 'go1\.[0-9|\.]*' || true )
...
@@ -11,7 +11,7 @@ FULL_GOVERSION=$( echo -n "$VERSION" | grep -o 'go1\.[0-9|\.]*' || true )
# The list of unsupported major go versions.
# The list of unsupported major go versions.
UNSUPPORTED
=(
"go1.0"
"go1.1"
"go1.2"
"go1.3"
"go1.4"
"go1.5"
"go1.6"
)
UNSUPPORTED
=(
"go1.0"
"go1.1"
"go1.2"
"go1.3"
"go1.4"
"go1.5"
"go1.6"
)
# Minor go ver
is
ons which have known security vulnerabilities. Refuse to build with these.
# Minor go ver
si
ons which have known security vulnerabilities. Refuse to build with these.
#
#
# There aren't any security issues that impact dex in 1.7 but minor versions should be
# There aren't any security issues that impact dex in 1.7 but minor versions should be
# added here later if they do have issues.
# added here later if they do have issues.
...
@@ -26,7 +26,7 @@ done
...
@@ -26,7 +26,7 @@ done
for
V
in
"
${
KNOWN_INSECURE
[@]
}
"
;
do
for
V
in
"
${
KNOWN_INSECURE
[@]
}
"
;
do
if
[
"
$V
"
=
"
$FULL_GOVERSION
"
]
;
then
if
[
"
$V
"
=
"
$FULL_GOVERSION
"
]
;
then
>
&2
echo
"Go version
${
V
}
has known security vulnerabilities which impact dex. Please update your Go ver
is
on."
>
&2
echo
"Go version
${
V
}
has known security vulnerabilities which impact dex. Please update your Go ver
si
on."
exit
2
exit
2
fi
fi
done
done
...
...
server/handlers.go
View file @
33f01990
...
@@ -721,7 +721,7 @@ func (s *Server) handleAuthCode(w http.ResponseWriter, r *http.Request, client s
...
@@ -721,7 +721,7 @@ func (s *Server) handleAuthCode(w http.ResponseWriter, r *http.Request, client s
offlineSessions
.
Refresh
[
tokenRef
.
ClientID
]
=
&
tokenRef
offlineSessions
.
Refresh
[
tokenRef
.
ClientID
]
=
&
tokenRef
// Create a new OfflineSession object for the user and add a reference object for
// Create a new OfflineSession object for the user and add a reference object for
// the newly rec
ie
ved refreshtoken.
// the newly rec
ei
ved refreshtoken.
if
err
:=
s
.
storage
.
CreateOfflineSessions
(
offlineSessions
);
err
!=
nil
{
if
err
:=
s
.
storage
.
CreateOfflineSessions
(
offlineSessions
);
err
!=
nil
{
s
.
logger
.
Errorf
(
"failed to create offline session: %v"
,
err
)
s
.
logger
.
Errorf
(
"failed to create offline session: %v"
,
err
)
s
.
tokenErrHelper
(
w
,
errServerError
,
""
,
http
.
StatusInternalServerError
)
s
.
tokenErrHelper
(
w
,
errServerError
,
""
,
http
.
StatusInternalServerError
)
...
@@ -962,6 +962,6 @@ func (s *Server) renderError(w http.ResponseWriter, status int, description stri
...
@@ -962,6 +962,6 @@ func (s *Server) renderError(w http.ResponseWriter, status int, description stri
func
(
s
*
Server
)
tokenErrHelper
(
w
http
.
ResponseWriter
,
typ
string
,
description
string
,
statusCode
int
)
{
func
(
s
*
Server
)
tokenErrHelper
(
w
http
.
ResponseWriter
,
typ
string
,
description
string
,
statusCode
int
)
{
if
err
:=
tokenErr
(
w
,
typ
,
description
,
statusCode
);
err
!=
nil
{
if
err
:=
tokenErr
(
w
,
typ
,
description
,
statusCode
);
err
!=
nil
{
s
.
logger
.
Errorf
(
"token error re
ps
onse: %v"
,
err
)
s
.
logger
.
Errorf
(
"token error re
sp
onse: %v"
,
err
)
}
}
}
}
server/rotation_test.go
View file @
33f01990
...
@@ -90,7 +90,7 @@ func TestKeyRotater(t *testing.T) {
...
@@ -90,7 +90,7 @@ func TestKeyRotater(t *testing.T) {
got
:=
verificationKeyIDs
(
t
,
r
.
Storage
)
got
:=
verificationKeyIDs
(
t
,
r
.
Storage
)
if
!
slicesEq
(
expVerificationKeys
,
got
)
{
if
!
slicesEq
(
expVerificationKeys
,
got
)
{
t
.
Errorf
(
"after %d rotation, expected v
a
rification keys %q, got %q"
,
i
+
1
,
expVerificationKeys
,
got
)
t
.
Errorf
(
"after %d rotation, expected v
e
rification keys %q, got %q"
,
i
+
1
,
expVerificationKeys
,
got
)
}
}
expVerificationKeys
=
append
(
expVerificationKeys
,
signingKeyID
(
t
,
r
.
Storage
))
expVerificationKeys
=
append
(
expVerificationKeys
,
signingKeyID
(
t
,
r
.
Storage
))
...
...
server/server_test.go
View file @
33f01990
...
@@ -1070,7 +1070,7 @@ func TestRefreshTokenFlow(t *testing.T) {
...
@@ -1070,7 +1070,7 @@ func TestRefreshTokenFlow(t *testing.T) {
Expiry
:
time
.
Now
()
.
Add
(
-
time
.
Hour
),
Expiry
:
time
.
Now
()
.
Add
(
-
time
.
Hour
),
}
}
// Login in again to rec
ie
ve a new token.
// Login in again to rec
ei
ve a new token.
if
_
,
err
=
http
.
Get
(
oauth2Client
.
server
.
URL
+
"/login"
);
err
!=
nil
{
if
_
,
err
=
http
.
Get
(
oauth2Client
.
server
.
URL
+
"/login"
);
err
!=
nil
{
t
.
Fatalf
(
"get failed: %v"
,
err
)
t
.
Fatalf
(
"get failed: %v"
,
err
)
}
}
...
...
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