Fix LDAP responseXML to be named appropriately (#8285)

This PR additionally also adds support for missing

- Session policy support for AD/LDAP
- Add API request/response parameters detail
- Update example to take ldap username,
  password input from the command line
- Fixes session policy handling for
  ClientGrants and WebIdentity
This commit is contained in:
Harshavardhana
2019-09-23 15:21:16 -07:00
committed by kannappanr
parent 975134e42b
commit 77dc2031a2
8 changed files with 190 additions and 58 deletions

View File

@@ -18,6 +18,7 @@
package main
import (
"flag"
"fmt"
"log"
@@ -27,14 +28,26 @@ import (
var (
// LDAP integrated Minio endpoint
stsEndpoint = "http://localhost:9000"
stsEndpoint string
// LDAP credentials
ldapUsername = "ldapuser"
ldapPassword = "ldapsecret"
ldapUsername string
ldapPassword string
)
func init() {
flag.StringVar(&stsEndpoint, "sts-ep", "http://localhost:9000", "STS endpoint")
flag.StringVar(&ldapUsername, "u", "", "AD/LDAP Username")
flag.StringVar(&ldapPassword, "p", "", "AD/LDAP Password")
}
func main() {
flag.Parse()
if ldapUsername == "" || ldapPassword == "" {
flag.PrintDefaults()
return
}
// The credentials package in minio-go provides an interface to call the
// LDAP STS API.