ldap: Add user DN attributes list config param (#19758)

This change uses the updated ldap library in minio/pkg (bumped
up to v3). A new config parameter is added for LDAP configuration to
specify extra user attributes to load from the LDAP server and to store
them as additional claims for the user.

A test is added in sts_handlers.go that shows how to access the LDAP
attributes as a claim.

This is in preparation for adding SSH pubkey authentication to MinIO's SFTP
integration.
This commit is contained in:
Aditya Manthramurthy
2024-05-24 16:05:23 -07:00
committed by GitHub
parent a591e06ae5
commit 5f78691fcf
179 changed files with 524 additions and 362 deletions

View File

@@ -26,7 +26,7 @@ import (
internalAudit "github.com/minio/minio/internal/logger/message/audit"
"github.com/minio/minio/internal/mcontext"
"github.com/minio/pkg/v2/logger/message/audit"
"github.com/minio/pkg/v3/logger/message/audit"
xhttp "github.com/minio/minio/internal/http"
)

View File

@@ -24,8 +24,8 @@ import (
"strconv"
"strings"
"github.com/minio/pkg/v2/env"
xnet "github.com/minio/pkg/v2/net"
"github.com/minio/pkg/v3/env"
xnet "github.com/minio/pkg/v3/net"
"github.com/minio/minio/internal/config"
"github.com/minio/minio/internal/logger/target/http"

View File

@@ -25,7 +25,7 @@ import (
"time"
"github.com/minio/minio/internal/color"
"github.com/minio/pkg/v2/logger/message/log"
"github.com/minio/pkg/v3/logger/message/log"
)
// ConsoleLoggerTgt is a stringified value to represent console logging

View File

@@ -36,7 +36,7 @@ import (
"github.com/minio/madmin-go/v3"
"github.com/minio/minio/internal/color"
xhttp "github.com/minio/minio/internal/http"
"github.com/minio/pkg/v2/logger/message/log"
"github.com/minio/pkg/v3/logger/message/log"
)
// HighwayHash key for logging in anonymous mode

View File

@@ -27,7 +27,7 @@ import (
"github.com/klauspost/compress/gzip"
xioutil "github.com/minio/minio/internal/ioutil"
"github.com/minio/pkg/v2/logger/message/log"
"github.com/minio/pkg/v3/logger/message/log"
)
func defaultFilenameFunc() string {

View File

@@ -22,7 +22,7 @@ import (
"strings"
"time"
"github.com/minio/pkg/v2/logger/message/audit"
"github.com/minio/pkg/v3/logger/message/audit"
"github.com/minio/minio/internal/handlers"
xhttp "github.com/minio/minio/internal/http"

View File

@@ -26,7 +26,7 @@ import (
"github.com/minio/minio/internal/color"
"github.com/minio/minio/internal/logger"
"github.com/minio/pkg/v2/logger/message/log"
"github.com/minio/pkg/v3/logger/message/log"
)
// Target implements loggerTarget to send log

View File

@@ -36,7 +36,7 @@ import (
"github.com/minio/minio/internal/logger/target/types"
"github.com/minio/minio/internal/once"
"github.com/minio/minio/internal/store"
xnet "github.com/minio/pkg/v2/net"
xnet "github.com/minio/pkg/v3/net"
"github.com/valyala/bytebufferpool"
)

View File

@@ -37,7 +37,7 @@ import (
"github.com/minio/minio/internal/logger/target/types"
"github.com/minio/minio/internal/once"
"github.com/minio/minio/internal/store"
xnet "github.com/minio/pkg/v2/net"
xnet "github.com/minio/pkg/v3/net"
)
// the suffix for the configured queue dir where the logs will be persisted.

View File

@@ -36,7 +36,7 @@ import (
"github.com/minio/minio/internal/logger"
"github.com/minio/minio/internal/logger/target/types"
"github.com/minio/pkg/v2/logger/message/log"
"github.com/minio/pkg/v3/logger/message/log"
)
const (