Skip to content

Commit

Permalink
add PreWin2kLogonNameDomain to ldap configs
Browse files Browse the repository at this point in the history
  • Loading branch information
abbas-gheydi committed May 31, 2024
1 parent 69958e1 commit 75b3348
Show file tree
Hide file tree
Showing 17 changed files with 14 additions and 573 deletions.
3 changes: 3 additions & 0 deletions deploy/config/radiusd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
# By default, this setting is false, which means that if set to false, the search will be conducted for userPrincipalName instead
ForceSearchForSamAccountName = false

# If PreWin2kLogonNameDomain is not set, it will be automatically generated from the basedn.
#PreWin2kLogonNameDomain = ""


[metrics]
# prometheus exporter settings.
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "2"
services:
radotp:
image: ghcr.io/abbas-gheydi/radotp:2.2.0
image: ghcr.io/abbas-gheydi/radotp:2.3.0
restart: always
ports:
- "80:8080"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (

require (
github.com/Azure/go-ntlmssp v0.0.0-20220621081337-cb9428e4ac1e // indirect
github.com/abbas-gheydi/go-ad-auth/v3 v3.4.41 // indirect
github.com/abbas-gheydi/go-ad-auth/v3 v3.4.42 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/abbas-gheydi/go-ad-auth/v3 v3.4.41 h1:5xm0QEIGGExRRR1UWHYlekmH3xlahcm4dsyODaQK5CM=
github.com/abbas-gheydi/go-ad-auth/v3 v3.4.41/go.mod h1:hEFwR0rdKWT0OpQPGztCV+eFXdRoaUfKB2LM0Kd84bw=
github.com/abbas-gheydi/go-ad-auth/v3 v3.4.42 h1:z+iF3mDKMhnm09hs92L5gsSZTpO55GenqkVRCSfGdM4=
github.com/abbas-gheydi/go-ad-auth/v3 v3.4.42/go.mod h1:hEFwR0rdKWT0OpQPGztCV+eFXdRoaUfKB2LM0Kd84bw=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
Expand Down
1 change: 1 addition & 0 deletions pkgs/confs/confs.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ type LdapProvider struct {
Port int
Security int
ForceSearchForSamAccountName bool
PreWin2kLogonNameDomain string
}
1 change: 1 addition & 0 deletions pkgs/confs/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func LoadConfigs() {
rad.Auth_Provider.LdapConfig.Server = Cfg.Ldap.LdapServers[0]
rad.Auth_Provider.LdapServers = Cfg.Ldap.LdapServers
rad.Auth_Provider.LdapConfig.ForceSearchForSamAccountName = Cfg.Ldap.ForceSearchForSamAccountName
rad.Auth_Provider.LdapConfig.PreWin2kLogonNameDomain = Cfg.Ldap.PreWin2kLogonNameDomain

//database configs
storage.Dsn = fmt.Sprintf("host=%v user=%v password=%v dbname=%v port=%v sslmode=%v TimeZone=%v", Cfg.Database.Server, Cfg.Database.Username, Cfg.Database.Password, Cfg.Database.Dbname, Cfg.Database.Port, Cfg.Database.Sslmode, Cfg.Database.Timezone)
Expand Down
4 changes: 4 additions & 0 deletions vendor/github.com/abbas-gheydi/go-ad-auth/v3/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions vendor/github.com/korylprince/go-ad-auth/v3/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions vendor/github.com/korylprince/go-ad-auth/v3/LICENSE

This file was deleted.

89 changes: 0 additions & 89 deletions vendor/github.com/korylprince/go-ad-auth/v3/README.md

This file was deleted.

79 changes: 0 additions & 79 deletions vendor/github.com/korylprince/go-ad-auth/v3/auth.go

This file was deleted.

58 changes: 0 additions & 58 deletions vendor/github.com/korylprince/go-ad-auth/v3/config.go

This file was deleted.

81 changes: 0 additions & 81 deletions vendor/github.com/korylprince/go-ad-auth/v3/conn.go

This file was deleted.

Loading

0 comments on commit 75b3348

Please sign in to comment.