mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-17 17:26:06 +01:00
Wire IAM gRPC service to filer server
- Add CredentialManager field to FilerOption and FilerServer - Import credential store implementations in filer command - Initialize CredentialManager from credential.toml if available - Register IAM gRPC service on filer gRPC server - Enable credential management via gRPC alongside existing filer services
This commit is contained in:
1 parent
ad306519d7
commit
5798b6bc3a
2 files changed
+38
No files matched your search
@@ -10,6 +10,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/credential"
|
||||
"github.com/seaweedfs/seaweedfs/weed/stats"
|
||||
"golang.org/x/sync/singleflight"
|
||||
|
||||
@@ -81,6 +82,7 @@ type FilerOption struct {
|
||||
AllowedOrigins []string
|
||||
ExposeDirectoryData bool
|
||||
TusBasePath string
|
||||
CredentialManager *credential.CredentialManager
|
||||
}
|
||||
|
||||
type FilerServer struct {
|
||||
@@ -112,6 +114,9 @@ type FilerServer struct {
|
||||
|
||||
// deduplicates concurrent remote object caching operations
|
||||
remoteCacheGroup singleflight.Group
|
||||
|
||||
// credential manager for IAM operations
|
||||
credentialManager *credential.CredentialManager
|
||||
}
|
||||
|
||||
func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption) (fs *FilerServer, err error) {
|
||||
@@ -148,6 +153,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
|
||||
grpcDialOption: security.LoadClientTLS(util.GetViper(), "grpc.filer"),
|
||||
knownListeners: make(map[int32]int32),
|
||||
inFlightDataLimitCond: sync.NewCond(new(sync.Mutex)),
|
||||
credentialManager: option.CredentialManager,
|
||||
}
|
||||
fs.listenersCond = sync.NewCond(&fs.listenersLock)
|
||||
|
||||
|
||||
Reference in new issue
Block a user