Continue AuthToken development changes.

This commit is contained in:
Juan Carlos Luciani 2006-09-08 21:53:13 +00:00
parent 20608a9f65
commit b25b691642
9 changed files with 61 additions and 30 deletions

View File

@ -93,6 +93,9 @@ make
install -d %{buildroot}%{prefix}
install -d %{buildroot}%{prefix}/share
install -d %{buildroot}%{prefix}/share/java
install -d %{buildroot}/etc
install -d -m 777 %{buildroot}/etc/CASA
install -d -m 777 %{buildroot}/etc/CASA/authtoken
## CASA_auth_token_svc ##
# Libs
@ -106,6 +109,7 @@ ln -sf CasaAuthTokenSvc-%{bldno}.war %{buildroot}%{prefix}/share/java/CasaAuthTo
# Libs
install -m 755 %{_lib}/java/CasaJaasSupport.jar %{buildroot}%{prefix}/share/java/CasaJaasSupport-%{bldno}.jar
install -m 755 %{_lib}/java/CasaAuthToken.jar %{buildroot}%{prefix}/share/java/CasaAuthToken-%{bldno}.jar
install -m 755 server/Svc/crypto.properties %{buildroot}/etc/CASA/authtoken/crypto.properties
# Lib Symbolic Links
ln -sf CasaJaasSupport-%{bldno}.jar %{buildroot}%{prefix}/share/java/CasaJaasSupport.jar
@ -132,6 +136,8 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%dir /etc/CASA
%dir /etc/CASA/authtoken
%{prefix}/share/java/CasaAuthTokenSvc-%{bldno}.war
%{prefix}/share/java/CasaAuthTokenSvc.war
%{prefix}/share/java/CasaAuthTokenSvc.war.1
@ -152,12 +158,15 @@ rm -rf $RPM_BUILD_ROOT
%files -n CASA_auth_token_jaas_support
%defattr(-,root,root)
%dir /etc/CASA
%dir /etc/CASA/authtoken
%{prefix}/share/java/CasaJaasSupport-%{bldno}.jar
%{prefix}/share/java/CasaJaasSupport.jar
%{prefix}/share/java/CasaJaasSupport.jar.1
%{prefix}/share/java/CasaAuthToken-%{bldno}.jar
%{prefix}/share/java/CasaAuthToken.jar
%{prefix}/share/java/CasaAuthToken.jar.1
/etc/CASA/authtoken/crypto.properties
%changelog -n CASA_auth_token_svc

View File

@ -27,7 +27,8 @@ EXTRA_DIST = authtoken.settings \
README \
svc.settings \
TODO \
web.xml
web.xml \
crypto.properties
ROOT = ../..
@ -100,6 +101,7 @@ $(BUILDDIR)/$(WEBAPP): $(BUILDDIR) $(CLASSES)
cp svc.settings $(BUILDDIR)/webapp/WEB-INF/conf/svc.settings
cp authtoken.settings $(BUILDDIR)/webapp/WEB-INF/conf/authtoken.settings
cp identoken.settings $(BUILDDIR)/webapp/WEB-INF/conf/identoken.settings
cp crypto.properties $(BUILDDIR)/webapp/WEB-INF/classes/crypto.properties
cp src/com/novell/casa/authtoksvc/Krb5_mechanism.settings $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/Krb5Authenticate/mechanism.settings
cp src/com/novell/casa/authtoksvc/Pwd_mechanism.settings $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/PwdAuthenticate/mechanism.settings
cp $(IDENT_ABSTRACTION_DIR)/*.jar $(BUILDDIR)/webapp/WEB-INF/lib/

View File

@ -287,24 +287,23 @@ public class AuthToken
*/
public static String validate(String authTokenString)
{
String idenTokenString = NULL;
// Instantiate the AuthToken, this validates the token itself.
try
{
AuthToken authToken = new AuthToken(authTokenString);
// If we are here is because the token validation succeeded,
// obtain the identity token string.
idenTokenString = authToken.getIdentityToken();
// return the identity token string.
return authToken.getIdentityToken();
}
catch (Exception e)
{
// The validation of one of the tokens failed
// tbd - Log
System.err.println("AuthToken.validate()- Exception caught during token processing, msg: " + e.getMessage());
}
return idenTokenString;
return null;
}
}
}

View File

@ -15,7 +15,7 @@ Name: CASA_auth_token_native
%define debug_opt ""
URL: http://www.novell.com/products
BuildRequires: CASA-devel apache2-devel expat gcc-c++ glib2-devel krb5-devel libgcc libgssapi libstdc++ libstdc++-devel mono-devel pam-devel pkgconfig update-alternatives
BuildRequires: CASA-devel apache2-devel expat gcc-c++ glib2-devel krb5-devel libgcc libgssapi libstdc++ libstdc++-devel mono-devel pam-devel pkgconfig update-alternatives java-1_5_0-sun java-1_5_0-sun-devel
%define prefix /usr
License: LGPL
Group: System/Libraries
@ -26,7 +26,7 @@ Release: 1
Summary: Novell CASA Authentication Token Libraries
Source: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: expat
Requires: expat java-1_5_0-sun CASA_auth_token_jaas_support
PreReq: %fillup_prereq %insserv_prereq
%description
@ -149,9 +149,17 @@ make
## Prime the file system ##
install -d %{buildroot}%{prefix}
install -d %{buildroot}%{prefix}/bin
install -d %{buildroot}%{prefix}/%{_lib}
install -d %{buildroot}%{prefix}/%{_lib}/security
install -d %{buildroot}%{prefix}/include
install -d %{buildroot}/etc/init.d
install -d %{buildroot}/etc/ld.so.conf.d
install -d %{buildroot}/var
install -d %{buildroot}/var/lib
install -d -m 777 %{buildroot}/var/lib/CASA
install -d -m 777 %{buildroot}/var/lib/CASA/authtoken
install -d -m 777 %{buildroot}/var/lib/CASA/authtoken/validate
## CASA_auth_token_native ##
# Libs
@ -167,6 +175,9 @@ ln -sf libcasa_c_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_c_ipc.so.
ln -sf libcasa_s_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_ipc.so
ln -sf libcasa_s_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_ipc.so.1
# Bins
install -m 755 bin/%{cfg}/CasaAuthtokenValidateD %{buildroot}%{prefix}/bin/CasaAuthtokenValidateD
## CASA_auth_token_pam_support ##
# Libs
install -m 755 %{_lib}/%{cfg}/pam_casaauthtok.so %{buildroot}%{prefix}/%{_lib}/security/pam_casaauthtok.so.%{bldno}
@ -207,10 +218,13 @@ rm -rf $RPM_BUILD_ROOT
# Nothing to do in this preun script
%postun
# Nothing to do in this postun script
/sbin/ldconfig
%files
%defattr(-,root,root)
%dir /var/lib/CASA
%dir /var/lib/CASA/authtoken
%dir /var/lib/CASA/authtoken/validate
%{prefix}/%{_lib}/libcasa_s_authtoken.so.%{bldno}
%{prefix}/%{_lib}/libcasa_s_authtoken.so
%{prefix}/%{_lib}/libcasa_s_authtoken.so.1
@ -220,6 +234,7 @@ rm -rf $RPM_BUILD_ROOT
%{prefix}/%{_lib}/libcasa_s_ipc.so.%{bldno}
%{prefix}/%{_lib}/libcasa_s_ipc.so
%{prefix}/%{_lib}/libcasa_s_ipc.so.1
%{prefix}/bin/CasaAuthtokenValidateD
## CASA_auth_token_pam_support ##
@ -233,7 +248,7 @@ rm -rf $RPM_BUILD_ROOT
# Nothing to do in this preun script
%postun -n CASA_auth_token_pam_support
# Nothing to do in this postun script
/sbin/ldconfig
%files -n CASA_auth_token_pam_support
%defattr(-,root,root)
@ -254,7 +269,7 @@ rm -rf $RPM_BUILD_ROOT
# Nothing to do in this preun script
%postun -n CASA_auth_token_apache2_2_support
# Nothing to do in this postun script
/sbin/ldconfig
%files -n CASA_auth_token_apache2_2_support
%defattr(-,root,root)

View File

@ -40,7 +40,9 @@ ROOT = ../../../..
LIBDIR = $(ROOT)/$(LIB)
BINDIR = $(ROOT)/$(BIN)
JAVA_LIBDIR = /usr/lib/jvm/java-1.5.0-sun-1.5.0_07/jre/lib/i386/server
#JAVA_LIBDIR = /usr/lib/jvm/java-1.5.0-sun-1.5.0_07/jre/lib/i386/server
JAVA_LIBDIR = /usr/lib/jvm/jre-1.5.0-sun/lib/$(HOSTTYPE)/server
JAVA_INCDIR = /usr/lib/jvm/java-1.5.0-sun/include
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
@ -52,18 +54,18 @@ CFILES =
CPPFILES = server.cpp
CSFILES_CSC :=
INCLUDES = -I. -I$(ROOT)/include
INCLUDES = -I. -I$(ROOT)/include -I$(JAVA_INCDIR) -I$(JAVA_INCDIR)/linux
RESOURCES =
DEFINES += -Wno-format-extra-args -fno-strict-aliasing -fshort-wchar
CFLAGS += $(INCLUDES) $(DEFINES)
CPPFLAGS += -fPIC $(INCLUDES) $(DEFINES)
CPPFLAGS += -fPIC $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
LIBS = -lpthread -lcasa_s_ipc -ljvm
LDFLAGS = -L$(LIBDIR)/$(TARGET_CFG) -L$(JAVA_LIBDIR)
LDFLAGS = -L$(LIBDIR)/$(TARGET_CFG) -L$(JAVA_LIBDIR) -Xlinker -rpath -Xlinker $(JAVA_LIBDIR)
OBJDIR = ./$(TARGET_CFG)/$(LIB)
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o)) $(addprefix $(OBJDIR)/, $(CPPFILES:%.cpp=%.o))
EXTRA_DIST = $(CFILES) *.h
EXTRA_DIST = $(CFILES) $(CPPFILES) *.h
CUR_DIR := $(shell pwd)

View File

@ -36,7 +36,7 @@
#define MAXFD 64
#define DOMAIN_SOCKET_FILE_NAME "/var/CASA/authtoken/validate/socket"
#define DOMAIN_SOCKET_FILE_NAME "/var/lib/CASA/authtoken/validate/socket"
//===[ Type definitions ]==================================================
@ -617,7 +617,7 @@ childContinue:
UseSyslog = true;
// Change the working directory
chdir("/var/CASA/authtoken/validate");
chdir("/var/lib/CASA/authtoken/validate");
// Clear our file mode creation mask
umask(0);

View File

@ -51,25 +51,26 @@ MODULE_EXT = so
CFILES =
CPPFILES = channelproto.cpp \
cchannel.cpp \
CPPFILES = cchannel.cpp \
clientreq.cpp \
remoteendpoint.cpp \
client.cpp
COMMONCPPFILES = channelproto.cpp
CSFILES_CSC :=
INCLUDES = -I. -I.. -I../common -I../../../../include
RESOURCES =
DEFINES += -Wno-format-extra-args -fno-strict-aliasing -fshort-wchar
CFLAGS += $(INCLUDES) $(DEFINES)
CPPFLAGS += -fPIC $(INCLUDES) $(DEFINES)
CPPFLAGS += -fPIC $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
LIBS = -lpthread
LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT)
OBJDIR = ./$(TARGET_CFG)/$(LIB)
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o)) $(addprefix $(OBJDIR)/, $(CPPFILES:%.cpp=%.o))
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o)) $(addprefix $(OBJDIR)/, $(COMMONCPPFILES:%.cpp=%.o)) $(addprefix $(OBJDIR)/, $(CPPFILES:%.cpp=%.o))
EXTRA_DIST = $(CFILES) *.h
EXTRA_DIST = $(CFILES) $(CPPFILES) *.h
CUR_DIR := $(shell pwd)

View File

@ -26,7 +26,9 @@ DIST_SUBDIRS =
CFILES =
EXTRA_DIST = $(CFILES) *.h
CPPFILES = channelproto.cpp
EXTRA_DIST = $(CFILES) $(CPPFILES) *.h
.PHONY: package package-clean package-install package-uninstall
package package-clean package-install package-uninstall:

View File

@ -51,25 +51,26 @@ MODULE_EXT = so
CFILES =
CPPFILES = channelproto.cpp \
schannel.cpp \
CPPFILES = schannel.cpp \
serverreq.cpp \
serverthread.cpp \
server.cpp
COMMONCPPFILES = channelproto.cpp
CSFILES_CSC :=
INCLUDES = -I. -I.. -I../common -I../../../../include
RESOURCES =
DEFINES += -Wno-format-extra-args -fno-strict-aliasing -fshort-wchar
CFLAGS += $(INCLUDES) $(DEFINES)
CPPFLAGS += -fPIC $(INCLUDES) $(DEFINES)
CPPFLAGS += -fPIC $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
LIBS = -lpthread
LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT)
OBJDIR = ./$(TARGET_CFG)/$(LIB)
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o)) $(addprefix $(OBJDIR)/, $(CPPFILES:%.cpp=%.o))
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o)) $(addprefix $(OBJDIR)/, $(COMMONCPPFILES:%.cpp=%.o)) $(addprefix $(OBJDIR)/, $(CPPFILES:%.cpp=%.o))
EXTRA_DIST = $(CFILES) *.h
EXTRA_DIST = $(CFILES) $(CPPFILES) *.h
CUR_DIR := $(shell pwd)