File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -544,15 +544,17 @@ impl Coordinator {
544544 }
545545 if let Some ( auth) = self . catalog ( ) . try_get_role_auth_by_id ( & role. id ) {
546546 if let Some ( hash) = & auth. password_hash {
547- let _ = match mz_auth:: hash:: scram256_verify ( & password, hash) {
548- Ok ( _) => tx. send ( Ok ( AuthResponse {
549- role_id : role. id ,
550- superuser : role. attributes . superuser . unwrap_or ( false ) ,
551- } ) ) ,
552- Err ( _) => tx. send ( Err ( AdapterError :: AuthenticationError (
553- AuthenticationError :: InvalidCredentials ,
554- ) ) ) ,
555- } ;
547+ let hash = hash. clone ( ) ;
548+ let role_id = role. id ;
549+ let superuser = role. attributes . superuser . unwrap_or ( false ) ;
550+ task:: spawn ( || "auth-check-hash" , async move {
551+ let _ = match mz_auth:: hash:: scram256_verify ( & password, & hash) {
552+ Ok ( _) => tx. send ( Ok ( AuthResponse { role_id, superuser } ) ) ,
553+ Err ( _) => tx. send ( Err ( AdapterError :: AuthenticationError (
554+ AuthenticationError :: InvalidCredentials ,
555+ ) ) ) ,
556+ } ;
557+ } ) ;
556558 return ;
557559 }
558560 }
You can’t perform that action at this time.
0 commit comments