Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
f11c905
Changing the error message
kalroy Oct 27, 2021
f3963d2
Update config.go
kalroy Oct 28, 2021
7ee3ba5
Vallidate Auth Request ID
kalroy Nov 10, 2021
d437071
Merge branch 'add_request_validators' of https://github.com/chef/dex-…
kalroy Nov 10, 2021
1893430
Fix regex
kalroy Nov 10, 2021
6dd36cc
Return on error
kalroy Nov 10, 2021
7d6b6b8
fix error syntax issue
kalroy Nov 10, 2021
7464915
Added test cases
kalroy Nov 14, 2021
6f4412c
Added some comments
kalroy Nov 14, 2021
be56c52
added logs
iamazzeez Mar 25, 2022
3137215
added blocked_user talble
iamazzeez Mar 29, 2022
67b0bc9
createblockeduser type fix
iamazzeez Mar 29, 2022
7f0ff86
added test cases
iamazzeez Mar 29, 2022
05d24a6
added test cases
iamazzeez Mar 29, 2022
1fe8fce
added kubernetes storage code
iamazzeez Mar 29, 2022
728a568
added etcd storage code
iamazzeez Mar 29, 2022
8b3712b
migrate stmts
iamazzeez Mar 29, 2022
dc21cd3
migrate only for psql
iamazzeez Mar 29, 2022
11ddfe4
migrate only for psql
iamazzeez Mar 29, 2022
fc31c46
migration fix
iamazzeez Mar 30, 2022
5066d37
test
iamazzeez Mar 30, 2022
1743e3e
test
iamazzeez Mar 30, 2022
8fa56ff
check if user is blocked logic
iamazzeez Mar 30, 2022
1cdf876
migration syntax fix
iamazzeez Mar 30, 2022
69efe69
wip blocked user logic
iamazzeez Mar 30, 2022
9eba331
update counter syntax fix
iamazzeez Mar 30, 2022
21a88e4
added ui render logic
iamazzeez Mar 30, 2022
720100b
added ui render logic fix
iamazzeez Mar 30, 2022
d10e5b5
check if user is blocked condition
iamazzeez Mar 31, 2022
b1da635
check if user is blocked condition fix
iamazzeez Mar 31, 2022
ce0950f
check if user is blocked condition fix
iamazzeez Mar 31, 2022
34cf44e
check if user is blocked condition fix
iamazzeez Mar 31, 2022
b68997b
delete user on successful login
iamazzeez Mar 31, 2022
8a9bca6
delete user on successful login fix
iamazzeez Mar 31, 2022
f54f96e
add config from automate
iamazzeez Apr 1, 2022
55455ae
typo fix
iamazzeez Apr 1, 2022
b830d59
added invalidAttempts config to server
iamazzeez Apr 1, 2022
0ab2774
added invalidAttempts config to server fix
iamazzeez Apr 1, 2022
d6fa7b7
maxAllowedAttempts type fix
iamazzeez Apr 1, 2022
eb46ede
maxAllowedAttempts send to ui
iamazzeez Apr 1, 2022
aee619c
maxAllowedAttempts send to ui fix
iamazzeez Apr 1, 2022
8312d75
blockDuration send to ui fix
iamazzeez Apr 1, 2022
256a595
removed unnecessary commits
iamazzeez Apr 4, 2022
81d15a7
code refactored
iamazzeez Apr 5, 2022
bd0c6d9
code refactor
iamazzeez Apr 5, 2022
4e5c55c
renamed BlockedUser to InvalidLoginAttempt
iamazzeez Apr 11, 2022
b44b303
config terminology update.
iamazzeez Apr 12, 2022
fbc74d2
sql row name update
iamazzeez Apr 12, 2022
bc65a45
debug stmts
iamazzeez Apr 12, 2022
c1fe8c0
removed logs
iamazzeez Apr 13, 2022
bc5ae47
enable/disable invalid_login_attempts
iamazzeez Apr 13, 2022
c94d07d
added logs
iamazzeez Apr 14, 2022
55798a5
removeed logs
iamazzeez Apr 14, 2022
b162f79
ldap invalidattempts handle fix
iamazzeez Apr 25, 2022
258273b
handle duplicate entries in invalid_attempts table
iamazzeez Apr 25, 2022
5ceaece
handleInvalidLoginAttempts update for ldap
iamazzeez Apr 25, 2022
f6cd315
error fix
iamazzeez Apr 25, 2022
83cd8b8
error fix
iamazzeez Apr 25, 2022
70d1856
changed blockedDuration to blockedDurationInMinutes
iamazzeez Apr 26, 2022
f5f1c79
reverted if not exists from create table
iamazzeez Apr 28, 2022
b8e1a0b
Merge pull request #53 from chef/ldap_fix
Dmaddu Apr 28, 2022
aacac1d
updated_at time
iamazzeez Apr 29, 2022
b5b1255
updatedat fix
iamazzeez Apr 30, 2022
492576f
Merge pull request #56 from chef/ldap_fix
Dmaddu May 2, 2022
6c1614c
Sanju/test refresh (#81)
SanjuPal01 Jul 26, 2022
c2ca124
merge branch to master_copy
iamazzeez Nov 23, 2022
03c66a7
db crud for invalidloginattempts
iamazzeez Nov 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions cmd/dex/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ import (

// Config is the config format for the main application.
type Config struct {
Issuer string `json:"issuer"`
Storage Storage `json:"storage"`
Web Web `json:"web"`
Telemetry Telemetry `json:"telemetry"`
OAuth2 OAuth2 `json:"oauth2"`
GRPC GRPC `json:"grpc"`
Expiry Expiry `json:"expiry"`
Logger Logger `json:"logger"`
Issuer string `json:"issuer"`
Storage Storage `json:"storage"`
Web Web `json:"web"`
Telemetry Telemetry `json:"telemetry"`
OAuth2 OAuth2 `json:"oauth2"`
GRPC GRPC `json:"grpc"`
Expiry Expiry `json:"expiry"`
InvalidLoginAttempts InvalidLoginAttempts `json:"invalidLoginAttempts`
Logger Logger `json:"logger"`

Frontend server.WebConfig `json:"frontend"`

Expand Down Expand Up @@ -350,3 +351,8 @@ type RefreshToken struct {
AbsoluteLifetime string `json:"absoluteLifetime"`
ValidIfNotUsedFor string `json:"validIfNotUsedFor"`
}
type InvalidLoginAttempts struct {
EnableInvalidLoginAttempts bool `json:"enableInvalidLoginAttempts"`
BlockedDurationInMinutes int32 `json:"blockedDurationInMinutes"`
MaxInvalidLoginAttemptsAllowed int32 `json:"maxInvalidLoginAttemptsAllowed"`
}
7 changes: 7 additions & 0 deletions cmd/dex/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,13 @@ func runServe(options serveOptions) error {
logger.Infof("config id tokens valid for: %v", idTokens)
serverConfig.IDTokensValidFor = idTokens
}

if c.InvalidLoginAttempts.EnableInvalidLoginAttempts {
serverConfig.EnableInvalidLoginAttempts = c.InvalidLoginAttempts.EnableInvalidLoginAttempts
serverConfig.BlockedDurationInMinutes = c.InvalidLoginAttempts.BlockedDurationInMinutes
serverConfig.MaxInvalidLoginAttemptsAllowed = c.InvalidLoginAttempts.MaxInvalidLoginAttemptsAllowed
}

if c.Expiry.AuthRequests != "" {
authRequests, err := time.ParseDuration(c.Expiry.AuthRequests)
if err != nil {
Expand Down
Loading