Alluxio LoginContext created with incorrect ClassLoader

Description

In LoginUser, when LoginContext is created, LoginContext saves the thread's context class loader, and uses that class loader to instantiate LoginModules.

The thread context class loader may be different from the class loader for User.class, so when User.class is being searched for via reflection, it doesn't find any users.

The exception stack typically looks like:

1 2 3 4 5 Caused by: alluxio.exception.status.UnauthenticatedException: Failed to login: No Alluxio User is found. at alluxio.security.LoginUser.login(LoginUser.java:105) at alluxio.security.LoginUser.get(LoginUser.java:60) at alluxio.security.authentication.PlainSaslTransportProvider.getClientTransport(PlainSaslTransportProvider.java:73) at alluxio.AbstractClient.connect(AbstractClient.java:178)

Environment

None

Status

Assignee

Gene Pang

Reporter

Gene Pang

Labels

Components

Fix versions

Affects versions

1.4.0

Priority

Major
Configure