Skip to content

Commit

Permalink
update ldap lib for upndomain (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrannosaurus-becks authored Feb 14, 2020
1 parent 3a958d8 commit b19d831
Show file tree
Hide file tree
Showing 291 changed files with 29,635 additions and 2,965 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ require (
github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect
github.com/hashicorp/errwrap v1.0.0
github.com/hashicorp/go-cleanhttp v0.5.1
github.com/hashicorp/go-hclog v0.9.2
github.com/hashicorp/go-hclog v0.12.0
github.com/hashicorp/go-version v1.2.0 // indirect
github.com/hashicorp/vault/api v1.0.5-0.20191208020111-805a0bc9b460
github.com/hashicorp/vault/sdk v0.1.14-0.20191218174015-a912eb5f02e8
github.com/hashicorp/vault/sdk v0.1.14-0.20200214182630-348b04ecb4e1
github.com/jcmturner/gokrb5/v8 v8.0.0
github.com/lib/pq v1.2.0 // indirect
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
Expand Down
99 changes: 99 additions & 0 deletions go.sum

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion path_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func (b *backend) pathLoginUpdate(ctx context.Context, req *logical.Request, d *
// The SPNEGOKRB5Authenticate method only calls an inner function if it's
// successful. Let's use it to record success, and to retrieve the caller's
// identity.
username := ""
authenticated := false
var identity goidentity.Identity
inner := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -128,6 +129,7 @@ func (b *backend) pathLoginUpdate(ctx context.Context, req *logical.Request, d *
return
}
b.Logger().Debug(fmt.Sprintf("identity: %+v", identity))
username = identity.UserName()

// Verify that the realm on the LDAP config is the same as the identity's
// realm. The UPNDomain denotes the realm on the LDAP config, and the identity
Expand Down Expand Up @@ -207,7 +209,7 @@ func (b *backend) pathLoginUpdate(ctx context.Context, req *logical.Request, d *
}
b.Logger().Debug("auth/ldap: User BindDN fetched", "username", identity.UserName(), "binddn", userBindDN)

userDN, err := ldapClient.GetUserDN(ldapCfg.ConfigEntry, ldapConnection, userBindDN)
userDN, err := ldapClient.GetUserDN(ldapCfg.ConfigEntry, ldapConnection, userBindDN, username)
if err != nil {
return nil, errwrap.Wrapf("unable to get user dn: {{err}}", err)
}
Expand Down
5 changes: 5 additions & 0 deletions vendor/github.com/fatih/color/.travis.yml

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

27 changes: 27 additions & 0 deletions vendor/github.com/fatih/color/Gopkg.lock

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

30 changes: 30 additions & 0 deletions vendor/github.com/fatih/color/Gopkg.toml

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

20 changes: 20 additions & 0 deletions vendor/github.com/fatih/color/LICENSE.md

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

179 changes: 179 additions & 0 deletions vendor/github.com/fatih/color/README.md

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

Loading

0 comments on commit b19d831

Please sign in to comment.