The current trino kerberos mapping rules are defined as follow
http-server.authentication.krb5.user-mapping.pattern=(.*)(/)(.*)
this allows interactions from Hue as the hue kerberos principal hue/<machine>@<domain> matches the pattern but does not allow to use the trino-cli with AD users as the related principal username@<domain> does not match the pattern.