Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
id
go-sso
Commits
8d3f4507
Commit
8d3f4507
authored
Dec 20, 2019
by
ale
Browse files
Always set the keystore shard in maybeUnlockKeystore()
parent
0a0ca7d5
Changes
1
Show whitespace changes
Inline
Side-by-side
server/http.go
View file @
8d3f4507
...
...
@@ -193,7 +193,6 @@ func (h *Server) maybeUnlockKeystore(ctx context.Context, username, password str
return
false
,
nil
}
var
shard
string
if
len
(
h
.
keystoreGroups
)
>
0
{
if
userinfo
==
nil
{
return
false
,
nil
...
...
@@ -201,8 +200,13 @@ func (h *Server) maybeUnlockKeystore(ctx context.Context, username, password str
if
!
inAnyGroups
(
userinfo
.
Groups
,
h
.
keystoreGroups
)
{
return
false
,
nil
}
}
var
shard
string
if
userinfo
!=
nil
{
shard
=
userinfo
.
Shard
}
// Add a 'grace time' of 30 minutes to the key ttl.
ttl
:=
h
.
authSessionLifetime
+
1800
return
true
,
h
.
keystore
.
Open
(
ctx
,
shard
,
username
,
password
,
ttl
)
...
...
Write
Preview
Supports
Markdown
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