@Component public class AmbariAuthToLocalUserDetailsService extends Object implements org.springframework.security.core.userdetails.UserDetailsService
UserDetailsService that translates
a Kerberos principal name into a local username that may be used when looking up
and Ambari user account.| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.core.userdetails.UserDetails |
loadUserByUsername(String principal) |
String |
translatePrincipalName(String principalName)
Using the auth-to-local rules stored in
authentication.kerberos.auth_to_local.rules
in the ambari.properties file, translate the supplied principal name to a local name. |
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String principal) throws org.springframework.security.core.userdetails.UsernameNotFoundException
loadUserByUsername in interface org.springframework.security.core.userdetails.UserDetailsServiceorg.springframework.security.core.userdetails.UsernameNotFoundExceptionpublic String translatePrincipalName(String principalName)
authentication.kerberos.auth_to_local.rules
in the ambari.properties file, translate the supplied principal name to a local name.principalName - the principal name to translateCopyright © 2022 Apache Software Foundation. All rights reserved.