diff --git a/auth/iam_proxy.go b/auth/iam_proxy.go index cdb427a9..83ca8a1c 100644 --- a/auth/iam_proxy.go +++ b/auth/iam_proxy.go @@ -88,8 +88,12 @@ func (s *IAMServiceProxy) CreateAccount(account Account) error { return nil } -func (IAMServiceProxy) GetUserAccount(access string) (Account, error) { - return Account{}, nil +func (s *IAMServiceProxy) GetUserAccount(access string) (Account, error) { + return Account{ + Access: s.access, + Secret: s.secret, + Role: "admin", + }, nil } func (s *IAMServiceProxy) DeleteUserAccount(access string) error { diff --git a/cmd/versitygw/main.go b/cmd/versitygw/main.go index 34617bb2..79d03719 100644 --- a/cmd/versitygw/main.go +++ b/cmd/versitygw/main.go @@ -342,6 +342,8 @@ func runGateway(ctx context.Context, be backend.Backend) error { var iam auth.IAMService if s3proxyEndpoint != "" { + rootUserAccess = s3proxyAccess + rootUserSecret = s3proxySecret iam = auth.NewProxy(s3proxyAccess, s3proxySecret, s3proxyRegion, s3proxyEndpoint) } else { var err error