Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useKerberos on AD results in ClassNotFoundException which leads to a NullPointerException #70

Open
pboos opened this issue Aug 30, 2019 · 0 comments

Comments

@pboos
Copy link

pboos commented Aug 30, 2019

The problem

Using:

server.AD.adinsert.config.useKerberos=true

Results in a NullPointerException (or actually a ClassNotFoundException).

More information

The quickStart shows how to use kerberos:

server.AD.adinsert.config.useKerberos=%AD_USE_KERB%

But if adding:

server.AD.adinsert.config.useKerberos=true

It will execute the following code in ADInsert

		if (useKerb.equalsIgnoreCase("true")) {
			insertNames.add("kerberos");
			props.setProperty("kerberos.className", "net.sourceforge.myvd.inserts.kerberos.ADKerberosInsert");
			props.setProperty("kerberos.config.host", compositeProps.getProperty("host"));
			props.setProperty("kerberos.config.port", compositeProps.getProperty("kerbPort","88"));
		}

net.sourceforge.myvd.inserts.kerberos.ADKerberosInsert is nowhere to be found in this repository. That is why on startup, it will then crash with a ClassNotFoundException.

Below is the error given. It is a NPE, because it tries to log the ClassNotFoundException with a logger through getLogger().error(e.toString(),e);. But ADInsert has this method with:

	@Override
	public Logger getLogger() {
		// TODO Auto-generated method stub
		return null;
	}

Error thrown when using useKerberos=true:

[2019-08-30 07:45:51,575][main] ERROR Server - Error starting server : java.lang.NullPointerException
java.lang.NullPointerException: null
	at net.sourceforge.myvd.inserts.composite.CompositeInsert.configure(CompositeInsert.java:127) ~[myvd-server-1.0.6.jar:?]
	at net.sourceforge.myvd.core.InsertChain.configureChain(InsertChain.java:192) ~[myvd-server-1.0.6.jar:?]
	at net.sourceforge.myvd.server.ServerCore.configureChain(ServerCore.java:72) ~[myvd-server-1.0.6.jar:?]
	at net.sourceforge.myvd.server.ServerCore.buildNamespaces(ServerCore.java:134) ~[myvd-server-1.0.6.jar:?]
	at net.sourceforge.myvd.server.ServerCore.startService(ServerCore.java:150) ~[myvd-server-1.0.6.jar:?]
	at net.sourceforge.myvd.server.Server.startServer(Server.java:192) ~[myvd-server-1.0.6.jar:?]
	at net.sourceforge.myvd.server.Server.main(Server.java:534) [myvd-server-1.0.6.jar:?]

Can we somehow add that class, or was it renamed (could not find a rename in git though)?

Or other question: Is there another way to force auth for every request to myvd (and have the auth done through kerberos)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant