Added some debug statements and added the sample jaas application into
the package that is submitted to autobuild.
This commit is contained in:
parent
392a4e7695
commit
f3126b10c9
@ -276,5 +276,6 @@ server/Jaas/src/com/Makefile
|
|||||||
server/Jaas/src/com/novell/Makefile
|
server/Jaas/src/com/novell/Makefile
|
||||||
server/Jaas/src/com/novell/casa/Makefile
|
server/Jaas/src/com/novell/casa/Makefile
|
||||||
server/Jaas/src/com/novell/casa/jaas/Makefile
|
server/Jaas/src/com/novell/casa/jaas/Makefile
|
||||||
|
server/Jaas/src/com/novell/casa/jaas/sample/Makefile
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 14 14:25:27 MDT 2006 - jluciani@novell.com
|
||||||
|
|
||||||
|
- Added some debug statements and added the sample Jaas application into
|
||||||
|
the tar file that is submitted to autobuild.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Aug 7 10:28:32 MDT 2006 - schoi@novell.com
|
Mon Aug 7 10:28:32 MDT 2006 - schoi@novell.com
|
||||||
- This file has been created for CASA_auth_token_svc project for the first
|
- This file has been created for CASA_auth_token_svc project for the first
|
||||||
|
@ -22,7 +22,10 @@
|
|||||||
SUBDIRS = src
|
SUBDIRS = src
|
||||||
DIST_SUBDIRS = src
|
DIST_SUBDIRS = src
|
||||||
|
|
||||||
EXTRA_DIST = $(JAVAFILES)
|
EXTRA_DIST = $(JAVAFILES) \
|
||||||
|
make_and_run_test.sh \
|
||||||
|
make_test.sh \
|
||||||
|
run_test.sh
|
||||||
|
|
||||||
ROOT = ../..
|
ROOT = ../..
|
||||||
|
|
||||||
@ -50,7 +53,7 @@ all: $(BUILDDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
|||||||
|
|
||||||
$(BUILDDIR)/%.class: %.java
|
$(BUILDDIR)/%.class: %.java
|
||||||
@echo [======== Compiling $@ ========]
|
@echo [======== Compiling $@ ========]
|
||||||
$(JAVAC) -sourcepath src -classpath $(CLASSPATH) -d $(BUILDDIR)/classes $<
|
$(JAVAC) -g -sourcepath src -classpath $(CLASSPATH) -d $(BUILDDIR)/classes $<
|
||||||
|
|
||||||
$(BUILDDIR)/$(MODULE_NAME).$(MODULE_EXT): $(BUILDDIR) $(CLASSES)
|
$(BUILDDIR)/$(MODULE_NAME).$(MODULE_EXT): $(BUILDDIR) $(CLASSES)
|
||||||
@echo [======== Jarring $@ ========]
|
@echo [======== Jarring $@ ========]
|
||||||
|
@ -8,10 +8,10 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "*** Compiling the test application ***"
|
echo "*** Compiling the test application ***"
|
||||||
javac -sourcepath src -classpath ../../../lib/java/CasaJaasSupport.jar:../../../lib/java/CasaAuthToken.jar -d build-test/classes src/com/novell/casa/jaas/sample/SampleApp.java src/com/novell/casa/jaas/sample/SampleAppCallbackHandler.java
|
javac -g -sourcepath src -classpath ../../lib/java/CasaJaasSupport.jar:../../lib/java/CasaAuthToken.jar -d build-test/classes src/com/novell/casa/jaas/sample/SampleApp.java src/com/novell/casa/jaas/sample/SampleAppCallbackHandler.java
|
||||||
echo "*** Done compiling ***"
|
echo "*** Done compiling ***"
|
||||||
echo ""
|
echo ""
|
||||||
echo "*** Starting the test application ***"
|
echo "*** Starting the test application ***"
|
||||||
java -classpath build-test/classes:../../../lib/java/CasaJaasSupport.jar:../../../lib/java/CasaAuthToken.jar:/usr/share/java/xerces-j2.jar -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Djava.security.auth.login.config=src/com/novell/casa/jaas/sample/SampleApp.conf com.novell.casa.jaas.sample.SampleApp
|
java -classpath build-test/classes:../../lib/java/CasaJaasSupport.jar:../../lib/java/CasaAuthToken.jar:/usr/share/java/xerces-j2.jar -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Djava.security.auth.login.config=src/com/novell/casa/jaas/sample/SampleApp.conf com.novell.casa.jaas.sample.SampleApp
|
||||||
#jdb -sourcepath src:../AuthTokenSvc/src -classpath build-test/classes:../../../lib/java/CasaJaasSupport.jar:../../../lib/java/CasaAuthToken.jar:/usr/share/java/xerces-j2.jar -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Djava.security.auth.login.config=src/com/novell/casa/jaas/sample/SampleApp.conf com.novell.casa.jaas.sample.SampleApp
|
#jdb -sourcepath src:../AuthTokenSvc/src -classpath build-test/classes:../../lib/java/CasaJaasSupport.jar:../../lib/java/CasaAuthToken.jar:/usr/share/java/xerces-j2.jar -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Djava.security.auth.login.config=src/com/novell/casa/jaas/sample/SampleApp.conf com.novell.casa.jaas.sample.SampleApp
|
||||||
|
|
||||||
|
13
CASA-auth-token/java/server/Jaas/make_test.sh
Executable file
13
CASA-auth-token/java/server/Jaas/make_test.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [ ! -d build-test ]; then
|
||||||
|
mkdir build-test
|
||||||
|
mkdir build-test/classes
|
||||||
|
else
|
||||||
|
if [ ! -d build-test/classes ]; then
|
||||||
|
mkdir build-test/classes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "*** Compiling the test application ***"
|
||||||
|
javac -g -sourcepath src -classpath ../../lib/java/CasaJaasSupport.jar:../../lib/java/CasaAuthToken.jar -d build-test/classes src/com/novell/casa/jaas/sample/SampleApp.java src/com/novell/casa/jaas/sample/SampleAppCallbackHandler.java
|
||||||
|
echo "*** Done compiling ***"
|
||||||
|
|
4
CASA-auth-token/java/server/Jaas/run_test.sh
Executable file
4
CASA-auth-token/java/server/Jaas/run_test.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
echo "*** Starting the test application ***"
|
||||||
|
java -classpath build-test/classes:../../lib/java/CasaJaasSupport.jar:../../lib/java/CasaAuthToken.jar:/usr/share/java/xerces-j2.jar -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Djava.security.auth.login.config=src/com/novell/casa/jaas/sample/SampleApp.conf -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n com.novell.casa.jaas.sample.SampleApp
|
||||||
|
#jdb -sourcepath src:../AuthTokenSvc/src -classpath build-test/classes:../../lib/java/CasaJaasSupport.jar:../../lib/java/CasaAuthToken.jar:/usr/share/java/xerces-j2.jar -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Djava.security.auth.login.config=src/com/novell/casa/jaas/sample/SampleApp.conf com.novell.casa.jaas.sample.SampleApp
|
||||||
|
|
@ -20,9 +20,9 @@
|
|||||||
#
|
#
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
||||||
SUBDIRS =
|
SUBDIRS = sample
|
||||||
|
|
||||||
DIST_SUBDIRS =
|
DIST_SUBDIRS = sample
|
||||||
|
|
||||||
JAVAFILES = CasaLoginModule.java \
|
JAVAFILES = CasaLoginModule.java \
|
||||||
CasaPrincipal.java
|
CasaPrincipal.java
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
#######################################################################
|
||||||
|
#
|
||||||
|
# Copyright (C) 2006 Novell, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2 of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public
|
||||||
|
# License along with this program; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
#
|
||||||
|
# Author: Juan Carlos Luciani <jluciani@novell.com>
|
||||||
|
#
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
SUBDIRS =
|
||||||
|
|
||||||
|
DIST_SUBDIRS =
|
||||||
|
|
||||||
|
JAVAFILES = SampleAppCallbackHandler.java \
|
||||||
|
SampleApp.java
|
||||||
|
|
||||||
|
|
||||||
|
EXTRA_DIST = $(JAVAFILES) \
|
||||||
|
SampleApp.conf
|
||||||
|
|
||||||
|
.PHONY: package package-clean package-install package-uninstall
|
||||||
|
package package-clean package-install package-uninstall:
|
||||||
|
$(MAKE) -C $(TARGET_OS) $@
|
||||||
|
|
||||||
|
maintainer-clean-local:
|
||||||
|
rm -f Makefile.in
|
||||||
|
|
@ -86,7 +86,7 @@ all: $(BUILDDIR)/$(WEBAPP) $(BUILDDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
|||||||
|
|
||||||
$(BUILDDIR)/%.class: %.java
|
$(BUILDDIR)/%.class: %.java
|
||||||
@echo [======== Compiling $@ ========]
|
@echo [======== Compiling $@ ========]
|
||||||
$(JAVAC) -sourcepath src -classpath $(CLASSPATH) -d $(BUILDDIR)/webapp/WEB-INF/classes $<
|
$(JAVAC) -g -sourcepath src -classpath $(CLASSPATH) -d $(BUILDDIR)/webapp/WEB-INF/classes $<
|
||||||
|
|
||||||
$(BUILDDIR)/$(WEBAPP): $(BUILDDIR) $(CLASSES)
|
$(BUILDDIR)/$(WEBAPP): $(BUILDDIR) $(CLASSES)
|
||||||
@echo [======== Creating Webapp $@ ========]
|
@echo [======== Creating Webapp $@ ========]
|
||||||
|
@ -97,6 +97,11 @@ public class GetAuthPolicy implements RpcMethod
|
|||||||
GetAuthPolicyRespMsg getAuthPolicyRespMsg = new GetAuthPolicyRespMsg(ProtoDefs.httpNotFoundStatusMsg,
|
GetAuthPolicyRespMsg getAuthPolicyRespMsg = new GetAuthPolicyRespMsg(ProtoDefs.httpNotFoundStatusMsg,
|
||||||
ProtoDefs.httpNotFoundStatusCode);
|
ProtoDefs.httpNotFoundStatusCode);
|
||||||
out.println(getAuthPolicyRespMsg.toString());
|
out.println(getAuthPolicyRespMsg.toString());
|
||||||
|
|
||||||
|
System.err.println("GetAuthPolicy.invoke()- Service "
|
||||||
|
+ getAuthPolicyReqMsg.getServiceName()
|
||||||
|
+ " at " + getAuthPolicyReqMsg.getHostName()
|
||||||
|
+ " not enabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -232,6 +232,10 @@ public class Krb5Authenticate implements AuthMechanism, Serializable
|
|||||||
identId = sr.getName() + "," + searchContext;
|
identId = sr.getName() + "," + searchContext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
System.err.println("Krb5Authenticate.invoke()- No matching identity entities found");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (NamingException e)
|
catch (NamingException e)
|
||||||
{
|
{
|
||||||
|
@ -162,6 +162,10 @@ public class PwdAuthenticate implements AuthMechanism, Serializable
|
|||||||
"(cn={0})",
|
"(cn={0})",
|
||||||
new String[] {pwToken.getUsername()},
|
new String[] {pwToken.getUsername()},
|
||||||
controls);
|
controls);
|
||||||
|
if (!answer.hasMore())
|
||||||
|
{
|
||||||
|
System.err.println("PwdAuthenticate.invoke()- No matching identity entities found");
|
||||||
|
}
|
||||||
|
|
||||||
// Enumerate through the users returned checking the password
|
// Enumerate through the users returned checking the password
|
||||||
while (answer.hasMore())
|
while (answer.hasMore())
|
||||||
@ -198,6 +202,12 @@ public class PwdAuthenticate implements AuthMechanism, Serializable
|
|||||||
System.err.println("PwdAuthenticate.invoke()- NamingException: " + e.getExplanation());
|
System.err.println("PwdAuthenticate.invoke()- NamingException: " + e.getExplanation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if we did not resolve the identity
|
||||||
|
if (identId == null)
|
||||||
|
{
|
||||||
|
System.err.println("PwdAuthenticate.invoke()- Failed to resolve identity for entity " + pwToken.getUsername());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (NamingException e)
|
catch (NamingException e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user