From 46aab041cc620b8033b32ecb6b514523b5ded6cc Mon Sep 17 00:00:00 2001 From: Ben McClelland Date: Wed, 17 Apr 2024 09:27:10 -0700 Subject: [PATCH] fix: auth iam single error for GetUserAccount() Fixes #524. The iam single needs to return ErrNoSuchUser instead of ErrNotSupported in GetUserAccount to return the correct error when the client access is not done by the single user account. This fixes the internal error when accessing the gateway in iam single user mode with incorrect access keys. --- auth/iam_single.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/iam_single.go b/auth/iam_single.go index 6557a2ee..af8b7659 100644 --- a/auth/iam_single.go +++ b/auth/iam_single.go @@ -32,7 +32,7 @@ func (IAMServiceSingle) CreateAccount(account Account) error { // GetUserAccount no accounts in single tenant mode func (IAMServiceSingle) GetUserAccount(access string) (Account, error) { - return Account{}, ErrNotSupported + return Account{}, ErrNoSuchUser } // DeleteUserAccount no accounts in single tenant mode