You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2013/07/29 22:59:02 UTC
svn commit: r1508197 - in /juddi/trunk: bin/
juddi-core-openjpa/src/test/resources/
juddi-core/src/main/java/org/apache/juddi/config/
juddi-core/src/main/java/org/apache/juddi/cryptor/
juddi-core/src/test/java/org/apache/juddi/auth/ juddi-core/src/test...
Author: alexoree
Date: Mon Jul 29 20:59:02 2013
New Revision: 1508197
URL: http://svn.apache.org/r1508197
Log:
JUDDI-602 adding additional unit tests and test/resources/juddiv3-enc-* files
Added:
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml
juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml
juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml
juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml
juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml
Modified:
juddi/trunk/bin/cryptor-dev.bat
juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/AppConfig.java
juddi/trunk/juddi-core/src/main/java/org/apache/juddi/cryptor/AES128Cryptor.java
juddi/trunk/juddi-core/src/main/java/org/apache/juddi/cryptor/AESCryptorAbstract.java
juddi/trunk/juddi-core/src/test/java/org/apache/juddi/auth/AuthenticatorTest.java
juddi/trunk/juddi-examples/uddi-samples/nbproject/project.properties
juddi/trunk/juddi-examples/uddi-samples/src/uddi/examples/AES.java
juddi/trunk/juddi-examples/uddi-samples/src/uddi/examples/DES.java
Modified: juddi/trunk/bin/cryptor-dev.bat
URL: http://svn.apache.org/viewvc/juddi/trunk/bin/cryptor-dev.bat?rev=1508197&r1=1508196&r2=1508197&view=diff
==============================================================================
--- juddi/trunk/bin/cryptor-dev.bat (original)
+++ juddi/trunk/bin/cryptor-dev.bat Mon Jul 29 20:59:02 2013
@@ -1 +1,7 @@
-java -cp ../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/juddi-core-3.2.0-SNAPSHOT.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/uddi-ws-3.2.0-SNAPSHOT.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-logging-api-1.1.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-configuration-1.6.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-lang-2.4.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-collections-3.2.1.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-codec-1.3.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/classes/* org.apache.juddi.v3.auth.CrytorUtil org.apache.juddi.cryptor.DefaultCryptor
\ No newline at end of file
+@echo off
+rem java -cp ../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/juddi-core-3.2.0-SNAPSHOT.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/uddi-ws-3.2.0-SNAPSHOT.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-logging-api-1.1.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-configuration-1.6.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-lang-2.4.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-collections-3.2.1.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-codec-1.3.jar;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/classes/* org.apache.juddi.v3.auth.CrytorUtil org.apache.juddi.cryptor.DefaultCryptor
+
+rem java -cp ../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddi-gui/WEB-INF/lib;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddi-gui/WEB-INF/lib/*;../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/lib/* org.apache.juddi.v3.auth.CrytorUtil org.apache.juddi.cryptor.DefaultCryptor
+
+cd ../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib
+java -cp .;./* org.apache.juddi.v3.auth.CrytorUtil
\ No newline at end of file
Added: juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml?rev=1508197&view=auto
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml (added)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml Mon Jul 29 20:59:02 2013
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+################################################################
+# jUDDI-v3.0 configuration. #
+################################################################
+# Note that the property settings in this #
+# file can be overriden by system parameters #
+# #
+################################################################
+-->
+<config>
+ <juddi>
+ <!-- The ${juddi.server.baseurl} token can be referenced in accessPoints and will be resolved at runtime. -->
+ <server>
+ <baseurl>http://localhost:8080/juddiv3</baseurl>
+ </server>
+ <root>
+ <publisher>root</publisher>
+ </root>
+ <seed>
+ <always>false</always>
+ </seed>
+
+ <!-- Name of the persistence unit to use (the default, "juddiDatabase" refers to the unit compiled into the juddi library)-->
+ <persistenceunit>
+ <name>juddiDatabase</name>
+ </persistenceunit>
+
+ <!-- Check-the-time-stamp-on-this-file Interval in milli seconds -->
+ <configuration>
+ <reload>
+ <delay>2000</delay>
+ </reload>
+ </configuration>
+ <!--Default locale-->
+ <locale>en_US</locale>
+
+ <!--The UDDI Operator Contact Email Address-->
+ <operatorEmailAddress>admin@local.localhost</operatorEmailAddress>
+
+ <!-- The maximum name size and maximum number of name elements allows in several of the FindXxxx and SaveXxxx UDDI functions.-->
+ <maxNameLength>255</maxNameLength>
+ <maxNameElementsAllowed>5</maxNameElementsAllowed>
+
+
+ <!-- The maximum number of rows returned in a find_* operation. Each call can set this independently, but this property defines a global maximum.-->
+ <maxRows>1000</maxRows>
+ <!-- The maximum number of "IN" clause parameters. Some RDMBS limit the number of parameters allowed in a SQL "IN" clause.-->
+ <maxInClause>1000</maxInClause>
+
+ <!-- The maximum number of UDDI artifacts allowed per publisher. A value of '-1' indicates any number of artifacts is valid (These values can be overridden at the individual publisher level).-->
+ <maxBusinessesPerPublisher>100</maxBusinessesPerPublisher>
+ <maxServicesPerBusiness>100</maxServicesPerBusiness>
+ <maxBindingsPerService>100</maxBindingsPerService>
+ <maxTModelsPerPublisher>100</maxTModelsPerPublisher>
+
+ <!-- Days before a transfer request expires-->
+ <transfer>
+ <expiration>
+ <days>3</days>
+ </expiration>
+ </transfer>
+
+ <!-- Days before a subscription expires-->
+ <subscription>
+ <expiration>
+ <days>30</days>
+ </expiration>
+
+ <!-- Minutes before a "chunked" subscription call expires-->
+ <chunkexpiration>
+ <minutes>5</minutes>
+ </chunkexpiration>
+
+ <!--Since 3.1.5 the maxium ammount of returned subscription entities allowed-->
+ <maxentities>1000</maxentities>
+ </subscription>
+
+ <!-- jUDDI UUIDGen implementation to use-->
+ <uuidgen>org.apache.juddi.uuidgen.DefaultUUIDGen</uuidgen>
+
+ <!-- jUDDI Cryptor implementation to use-->
+ <cryptor>org.apache.juddi.cryptor.DefaultCryptor</cryptor>
+
+ <!-- jUDDI Key Generator to use-->
+ <keygenerator>org.apache.juddi.keygen.DefaultKeyGenerator</keygenerator>
+
+ <notification>
+ <!-- Specifies the interval at which the notification timer triggers-->
+ <interval>5000</interval>
+ <!-- Specifies the amount of time to wait before the notification timer initially fires-->
+ <start>
+ <buffer>0</buffer>
+ </start>
+ </notification>
+ <!-- All Authentication related settings -->
+ <auth>
+ <!-- Specifies whether the inquiry API requires authentication, all other APIs require authN-->
+ <Inquiry>false</Inquiry>
+ <!-- jUDDI Authentication module to use-->
+
+ <authenticator>
+ <class>org.apache.juddi.v3.auth.JUDDIAuthenticator</class>
+ <!-- other settings
+ url
+ initialcontext
+ style
+ ldapexp
+ -->
+ </authenticator>
+
+ <token>
+ <!-- Time in minutes to expire tokes after inactivity-->
+ <Timeout>15</Timeout>
+ <!-- As of 3.1.5 Duration of time for tokens to expire, regardless of inactivity -->
+ <Expiration>15</Expiration>
+ </token>
+ </auth>
+
+
+
+
+ <validation>
+ <!-- As of 3.1.5 This setting will force referential integrity for all tModels (except keyGenerators), category bags, bindingTemplate/AccessPoint/hostingRedirector (referencing another host), tModelinstanceparms and anything else that references a KeyName default value is true. set to false for backwards compatibility or for a more lax registry-->
+ <enforceReferentialIntegrity>true</enforceReferentialIntegrity>
+ </validation>
+
+ <!--As of 3.1.5 Email delivery options for subscription API functions-->
+ <mail>
+ <smtp>
+ <!--The Operatorâs Email address
+ <from>admin@local.localhost</from>-->
+
+ <!--the hostname of the SMTP server
+ <host>localhost</host>-->
+
+ <!--The portname of the SMTP server
+ <port>25</port>-->
+
+ <!--If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets.-->
+ <socketFactory>
+ <!--<class></class>-->
+
+ <!--If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.
+ <fallback>true</fallback>-->
+ <!--Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.
+ <port>25</port>-->
+ </socketFactory>
+ <!--if true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the serverâs certificate. Defaults to false.
+ <starttls>
+ <enabled>false</enabled>
+ </starttls>-->
+
+ <!--If true, attempt to authenticate the user using the AUTH command. Defaults to false.
+ <auth>false</auth>-->
+
+ <!--Username used to authenticate to the SMTP server used only if mail.smtp.auth is true
+ <username>user</username>-->
+
+ <!--Password used to authenticate to the SMTP server, used only if mail.smtp.auth is true-->
+ <password encrypted="true">7WJq9dOME/hvPMmxKliDKw==</password>
+ </smtp>
+ </mail>
+ </juddi>
+</config>
\ No newline at end of file
Added: juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml?rev=1508197&view=auto
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml (added)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml Mon Jul 29 20:59:02 2013
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+################################################################
+# jUDDI-v3.0 configuration. #
+################################################################
+# Note that the property settings in this #
+# file can be overriden by system parameters #
+# #
+################################################################
+-->
+<config>
+ <juddi>
+ <!-- The ${juddi.server.baseurl} token can be referenced in accessPoints and will be resolved at runtime. -->
+ <server>
+ <baseurl>http://localhost:8080/juddiv3</baseurl>
+ </server>
+ <root>
+ <publisher>root</publisher>
+ </root>
+ <seed>
+ <always>false</always>
+ </seed>
+
+ <!-- Name of the persistence unit to use (the default, "juddiDatabase" refers to the unit compiled into the juddi library)-->
+ <persistenceunit>
+ <name>juddiDatabase</name>
+ </persistenceunit>
+
+ <!-- Check-the-time-stamp-on-this-file Interval in milli seconds -->
+ <configuration>
+ <reload>
+ <delay>2000</delay>
+ </reload>
+ </configuration>
+ <!--Default locale-->
+ <locale>en_US</locale>
+
+ <!--The UDDI Operator Contact Email Address-->
+ <operatorEmailAddress>admin@local.localhost</operatorEmailAddress>
+
+ <!-- The maximum name size and maximum number of name elements allows in several of the FindXxxx and SaveXxxx UDDI functions.-->
+ <maxNameLength>255</maxNameLength>
+ <maxNameElementsAllowed>5</maxNameElementsAllowed>
+
+
+ <!-- The maximum number of rows returned in a find_* operation. Each call can set this independently, but this property defines a global maximum.-->
+ <maxRows>1000</maxRows>
+ <!-- The maximum number of "IN" clause parameters. Some RDMBS limit the number of parameters allowed in a SQL "IN" clause.-->
+ <maxInClause>1000</maxInClause>
+
+ <!-- The maximum number of UDDI artifacts allowed per publisher. A value of '-1' indicates any number of artifacts is valid (These values can be overridden at the individual publisher level).-->
+ <maxBusinessesPerPublisher>100</maxBusinessesPerPublisher>
+ <maxServicesPerBusiness>100</maxServicesPerBusiness>
+ <maxBindingsPerService>100</maxBindingsPerService>
+ <maxTModelsPerPublisher>100</maxTModelsPerPublisher>
+
+ <!-- Days before a transfer request expires-->
+ <transfer>
+ <expiration>
+ <days>3</days>
+ </expiration>
+ </transfer>
+
+ <!-- Days before a subscription expires-->
+ <subscription>
+ <expiration>
+ <days>30</days>
+ </expiration>
+
+ <!-- Minutes before a "chunked" subscription call expires-->
+ <chunkexpiration>
+ <minutes>5</minutes>
+ </chunkexpiration>
+
+ <!--Since 3.1.5 the maxium ammount of returned subscription entities allowed-->
+ <maxentities>1000</maxentities>
+ </subscription>
+
+ <!-- jUDDI UUIDGen implementation to use-->
+ <uuidgen>org.apache.juddi.uuidgen.DefaultUUIDGen</uuidgen>
+
+ <!-- jUDDI Cryptor implementation to use-->
+ <cryptor>org.apache.juddi.cryptor.DefaultCryptor</cryptor>
+
+ <!-- jUDDI Key Generator to use-->
+ <keygenerator>org.apache.juddi.keygen.DefaultKeyGenerator</keygenerator>
+
+ <notification>
+ <!-- Specifies the interval at which the notification timer triggers-->
+ <interval>5000</interval>
+ <!-- Specifies the amount of time to wait before the notification timer initially fires-->
+ <start>
+ <buffer>0</buffer>
+ </start>
+ </notification>
+ <!-- All Authentication related settings -->
+ <auth>
+ <!-- Specifies whether the inquiry API requires authentication, all other APIs require authN-->
+ <Inquiry>false</Inquiry>
+ <!-- jUDDI Authentication module to use-->
+
+ <authenticator>
+ <class>org.apache.juddi.v3.auth.JUDDIAuthenticator</class>
+ <!-- other settings
+ url
+ initialcontext
+ style
+ ldapexp
+ -->
+ </authenticator>
+
+ <token>
+ <!-- Time in minutes to expire tokes after inactivity-->
+ <Timeout>15</Timeout>
+ <!-- As of 3.1.5 Duration of time for tokens to expire, regardless of inactivity -->
+ <Expiration>15</Expiration>
+ </token>
+ </auth>
+
+
+
+
+ <validation>
+ <!-- As of 3.1.5 This setting will force referential integrity for all tModels (except keyGenerators), category bags, bindingTemplate/AccessPoint/hostingRedirector (referencing another host), tModelinstanceparms and anything else that references a KeyName default value is true. set to false for backwards compatibility or for a more lax registry-->
+ <enforceReferentialIntegrity>true</enforceReferentialIntegrity>
+ </validation>
+
+ <!--As of 3.1.5 Email delivery options for subscription API functions-->
+ <mail>
+ <smtp>
+ <!--The Operatorâs Email address
+ <from>admin@local.localhost</from>-->
+
+ <!--the hostname of the SMTP server
+ <host>localhost</host>-->
+
+ <!--The portname of the SMTP server
+ <port>25</port>-->
+
+ <!--If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets.-->
+ <socketFactory>
+ <!--<class></class>-->
+
+ <!--If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.
+ <fallback>true</fallback>-->
+ <!--Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.
+ <port>25</port>-->
+ </socketFactory>
+ <!--if true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the serverâs certificate. Defaults to false.
+ <starttls>
+ <enabled>false</enabled>
+ </starttls>-->
+
+ <!--If true, attempt to authenticate the user using the AUTH command. Defaults to false.
+ <auth>false</auth>-->
+
+ <!--Username used to authenticate to the SMTP server used only if mail.smtp.auth is true
+ <username>user</username>-->
+
+ <!--Password used to authenticate to the SMTP server, used only if mail.smtp.auth is true-->
+ <password encrypted="true">18604180541d172f9827e08c998db568</password>
+ </smtp>
+ </mail>
+ </juddi>
+</config>
\ No newline at end of file
Added: juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml?rev=1508197&view=auto
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml (added)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml Mon Jul 29 20:59:02 2013
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+################################################################
+# jUDDI-v3.0 configuration. #
+################################################################
+# Note that the property settings in this #
+# file can be overriden by system parameters #
+# #
+################################################################
+-->
+<config>
+ <juddi>
+ <!-- The ${juddi.server.baseurl} token can be referenced in accessPoints and will be resolved at runtime. -->
+ <server>
+ <baseurl>http://localhost:8080/juddiv3</baseurl>
+ </server>
+ <root>
+ <publisher>root</publisher>
+ </root>
+ <seed>
+ <always>false</always>
+ </seed>
+
+ <!-- Name of the persistence unit to use (the default, "juddiDatabase" refers to the unit compiled into the juddi library)-->
+ <persistenceunit>
+ <name>juddiDatabase</name>
+ </persistenceunit>
+
+ <!-- Check-the-time-stamp-on-this-file Interval in milli seconds -->
+ <configuration>
+ <reload>
+ <delay>2000</delay>
+ </reload>
+ </configuration>
+ <!--Default locale-->
+ <locale>en_US</locale>
+
+ <!--The UDDI Operator Contact Email Address-->
+ <operatorEmailAddress>admin@local.localhost</operatorEmailAddress>
+
+ <!-- The maximum name size and maximum number of name elements allows in several of the FindXxxx and SaveXxxx UDDI functions.-->
+ <maxNameLength>255</maxNameLength>
+ <maxNameElementsAllowed>5</maxNameElementsAllowed>
+
+
+ <!-- The maximum number of rows returned in a find_* operation. Each call can set this independently, but this property defines a global maximum.-->
+ <maxRows>1000</maxRows>
+ <!-- The maximum number of "IN" clause parameters. Some RDMBS limit the number of parameters allowed in a SQL "IN" clause.-->
+ <maxInClause>1000</maxInClause>
+
+ <!-- The maximum number of UDDI artifacts allowed per publisher. A value of '-1' indicates any number of artifacts is valid (These values can be overridden at the individual publisher level).-->
+ <maxBusinessesPerPublisher>100</maxBusinessesPerPublisher>
+ <maxServicesPerBusiness>100</maxServicesPerBusiness>
+ <maxBindingsPerService>100</maxBindingsPerService>
+ <maxTModelsPerPublisher>100</maxTModelsPerPublisher>
+
+ <!-- Days before a transfer request expires-->
+ <transfer>
+ <expiration>
+ <days>3</days>
+ </expiration>
+ </transfer>
+
+ <!-- Days before a subscription expires-->
+ <subscription>
+ <expiration>
+ <days>30</days>
+ </expiration>
+
+ <!-- Minutes before a "chunked" subscription call expires-->
+ <chunkexpiration>
+ <minutes>5</minutes>
+ </chunkexpiration>
+
+ <!--Since 3.1.5 the maxium ammount of returned subscription entities allowed-->
+ <maxentities>1000</maxentities>
+ </subscription>
+
+ <!-- jUDDI UUIDGen implementation to use-->
+ <uuidgen>org.apache.juddi.uuidgen.DefaultUUIDGen</uuidgen>
+
+ <!-- jUDDI Cryptor implementation to use-->
+ <cryptor>org.apache.juddi.cryptor.DefaultCryptor</cryptor>
+
+ <!-- jUDDI Key Generator to use-->
+ <keygenerator>org.apache.juddi.keygen.DefaultKeyGenerator</keygenerator>
+
+ <notification>
+ <!-- Specifies the interval at which the notification timer triggers-->
+ <interval>5000</interval>
+ <!-- Specifies the amount of time to wait before the notification timer initially fires-->
+ <start>
+ <buffer>0</buffer>
+ </start>
+ </notification>
+ <!-- All Authentication related settings -->
+ <auth>
+ <!-- Specifies whether the inquiry API requires authentication, all other APIs require authN-->
+ <Inquiry>false</Inquiry>
+ <!-- jUDDI Authentication module to use-->
+
+ <authenticator>
+ <class>org.apache.juddi.v3.auth.JUDDIAuthenticator</class>
+ <!-- other settings
+ url
+ initialcontext
+ style
+ ldapexp
+ -->
+ </authenticator>
+
+ <token>
+ <!-- Time in minutes to expire tokes after inactivity-->
+ <Timeout>15</Timeout>
+ <!-- As of 3.1.5 Duration of time for tokens to expire, regardless of inactivity -->
+ <Expiration>15</Expiration>
+ </token>
+ </auth>
+
+
+
+
+ <validation>
+ <!-- As of 3.1.5 This setting will force referential integrity for all tModels (except keyGenerators), category bags, bindingTemplate/AccessPoint/hostingRedirector (referencing another host), tModelinstanceparms and anything else that references a KeyName default value is true. set to false for backwards compatibility or for a more lax registry-->
+ <enforceReferentialIntegrity>true</enforceReferentialIntegrity>
+ </validation>
+
+ <!--As of 3.1.5 Email delivery options for subscription API functions-->
+ <mail>
+ <smtp>
+ <!--The Operatorâs Email address
+ <from>admin@local.localhost</from>-->
+
+ <!--the hostname of the SMTP server
+ <host>localhost</host>-->
+
+ <!--The portname of the SMTP server
+ <port>25</port>-->
+
+ <!--If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets.-->
+ <socketFactory>
+ <!--<class></class>-->
+
+ <!--If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.
+ <fallback>true</fallback>-->
+ <!--Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.
+ <port>25</port>-->
+ </socketFactory>
+ <!--if true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the serverâs certificate. Defaults to false.
+ <starttls>
+ <enabled>false</enabled>
+ </starttls>-->
+
+ <!--If true, attempt to authenticate the user using the AUTH command. Defaults to false.
+ <auth>false</auth>-->
+
+ <!--Username used to authenticate to the SMTP server used only if mail.smtp.auth is true
+ <username>user</username>-->
+
+ <!--Password used to authenticate to the SMTP server, used only if mail.smtp.auth is true-->
+ <password encrypted="true">cce2f4b3f1dfe3211408c71cd8c38ee3</password>
+ </smtp>
+ </mail>
+ </juddi>
+</config>
\ No newline at end of file
Added: juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml?rev=1508197&view=auto
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml (added)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml Mon Jul 29 20:59:02 2013
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+################################################################
+# jUDDI-v3.0 configuration. #
+################################################################
+# Note that the property settings in this #
+# file can be overriden by system parameters #
+# #
+################################################################
+-->
+<config>
+ <juddi>
+ <!-- The ${juddi.server.baseurl} token can be referenced in accessPoints and will be resolved at runtime. -->
+ <server>
+ <baseurl>http://localhost:8080/juddiv3</baseurl>
+ </server>
+ <root>
+ <publisher>root</publisher>
+ </root>
+ <seed>
+ <always>false</always>
+ </seed>
+
+ <!-- Name of the persistence unit to use (the default, "juddiDatabase" refers to the unit compiled into the juddi library)-->
+ <persistenceunit>
+ <name>juddiDatabase</name>
+ </persistenceunit>
+
+ <!-- Check-the-time-stamp-on-this-file Interval in milli seconds -->
+ <configuration>
+ <reload>
+ <delay>2000</delay>
+ </reload>
+ </configuration>
+ <!--Default locale-->
+ <locale>en_US</locale>
+
+ <!--The UDDI Operator Contact Email Address-->
+ <operatorEmailAddress>admin@local.localhost</operatorEmailAddress>
+
+ <!-- The maximum name size and maximum number of name elements allows in several of the FindXxxx and SaveXxxx UDDI functions.-->
+ <maxNameLength>255</maxNameLength>
+ <maxNameElementsAllowed>5</maxNameElementsAllowed>
+
+
+ <!-- The maximum number of rows returned in a find_* operation. Each call can set this independently, but this property defines a global maximum.-->
+ <maxRows>1000</maxRows>
+ <!-- The maximum number of "IN" clause parameters. Some RDMBS limit the number of parameters allowed in a SQL "IN" clause.-->
+ <maxInClause>1000</maxInClause>
+
+ <!-- The maximum number of UDDI artifacts allowed per publisher. A value of '-1' indicates any number of artifacts is valid (These values can be overridden at the individual publisher level).-->
+ <maxBusinessesPerPublisher>100</maxBusinessesPerPublisher>
+ <maxServicesPerBusiness>100</maxServicesPerBusiness>
+ <maxBindingsPerService>100</maxBindingsPerService>
+ <maxTModelsPerPublisher>100</maxTModelsPerPublisher>
+
+ <!-- Days before a transfer request expires-->
+ <transfer>
+ <expiration>
+ <days>3</days>
+ </expiration>
+ </transfer>
+
+ <!-- Days before a subscription expires-->
+ <subscription>
+ <expiration>
+ <days>30</days>
+ </expiration>
+
+ <!-- Minutes before a "chunked" subscription call expires-->
+ <chunkexpiration>
+ <minutes>5</minutes>
+ </chunkexpiration>
+
+ <!--Since 3.1.5 the maxium ammount of returned subscription entities allowed-->
+ <maxentities>1000</maxentities>
+ </subscription>
+
+ <!-- jUDDI UUIDGen implementation to use-->
+ <uuidgen>org.apache.juddi.uuidgen.DefaultUUIDGen</uuidgen>
+
+ <!-- jUDDI Cryptor implementation to use-->
+ <cryptor>org.apache.juddi.cryptor.DefaultCryptor</cryptor>
+
+ <!-- jUDDI Key Generator to use-->
+ <keygenerator>org.apache.juddi.keygen.DefaultKeyGenerator</keygenerator>
+
+ <notification>
+ <!-- Specifies the interval at which the notification timer triggers-->
+ <interval>5000</interval>
+ <!-- Specifies the amount of time to wait before the notification timer initially fires-->
+ <start>
+ <buffer>0</buffer>
+ </start>
+ </notification>
+ <!-- All Authentication related settings -->
+ <auth>
+ <!-- Specifies whether the inquiry API requires authentication, all other APIs require authN-->
+ <Inquiry>false</Inquiry>
+ <!-- jUDDI Authentication module to use-->
+
+ <authenticator>
+ <class>org.apache.juddi.v3.auth.JUDDIAuthenticator</class>
+ <!-- other settings
+ url
+ initialcontext
+ style
+ ldapexp
+ -->
+ </authenticator>
+
+ <token>
+ <!-- Time in minutes to expire tokes after inactivity-->
+ <Timeout>15</Timeout>
+ <!-- As of 3.1.5 Duration of time for tokens to expire, regardless of inactivity -->
+ <Expiration>15</Expiration>
+ </token>
+ </auth>
+
+
+
+
+ <validation>
+ <!-- As of 3.1.5 This setting will force referential integrity for all tModels (except keyGenerators), category bags, bindingTemplate/AccessPoint/hostingRedirector (referencing another host), tModelinstanceparms and anything else that references a KeyName default value is true. set to false for backwards compatibility or for a more lax registry-->
+ <enforceReferentialIntegrity>true</enforceReferentialIntegrity>
+ </validation>
+
+ <!--As of 3.1.5 Email delivery options for subscription API functions-->
+ <mail>
+ <smtp>
+ <!--The Operatorâs Email address
+ <from>admin@local.localhost</from>-->
+
+ <!--the hostname of the SMTP server
+ <host>localhost</host>-->
+
+ <!--The portname of the SMTP server
+ <port>25</port>-->
+
+ <!--If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets.-->
+ <socketFactory>
+ <!--<class></class>-->
+
+ <!--If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.
+ <fallback>true</fallback>-->
+ <!--Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.
+ <port>25</port>-->
+ </socketFactory>
+ <!--if true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the serverâs certificate. Defaults to false.
+ <starttls>
+ <enabled>false</enabled>
+ </starttls>-->
+
+ <!--If true, attempt to authenticate the user using the AUTH command. Defaults to false.
+ <auth>false</auth>-->
+
+ <!--Username used to authenticate to the SMTP server used only if mail.smtp.auth is true
+ <username>user</username>-->
+
+ <!--Password used to authenticate to the SMTP server, used only if mail.smtp.auth is true-->
+ <password encrypted="true">+j/kXkZJftwTFTBH6Cf6IQ==</password>
+ </smtp>
+ </mail>
+ </juddi>
+</config>
\ No newline at end of file
Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/AppConfig.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/AppConfig.java?rev=1508197&r1=1508196&r2=1508197&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/AppConfig.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/AppConfig.java Mon Jul 29 20:59:02 2013
@@ -44,13 +44,20 @@ import org.uddi.api_v3.KeyedReference;
/**
* Handles the application level configuration for jUDDI. By default it first
- * looks at system properties
+ * looks at system properties (juddi.propertiesFile)
* @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
* @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
*/
public class AppConfig
{
- private final static String JUDDI_PROPERTIES = "juddiv3.xml";
+ /**
+ * This system property's value should be a path to a configuration file
+ */
+ public static final String JUDDI_CONFIGURATION_FILE_SYSTEM_PROPERTY="juddi.propertiesFile";
+ /**
+ * The default configuration file name for juddi
+ */
+ public static final String JUDDI_PROPERTIES = "juddiv3.xml";
private Log log = LogFactory.getLog(AppConfig.class);
private Configuration config;
private static AppConfig instance=null;
@@ -77,7 +84,7 @@ public class AppConfig
//Properties from file
//changed 7-19-2013 AO for JUDDI-627
XMLConfiguration propConfig = null;
- final String filename = System.getProperty("juddi.propertiesFile");
+ final String filename = System.getProperty(JUDDI_CONFIGURATION_FILE_SYSTEM_PROPERTY);
if (filename != null) {
propConfig = new XMLConfiguration (filename);
// propConfig = new PropertiesConfiguration(filename);
Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/cryptor/AES128Cryptor.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/cryptor/AES128Cryptor.java?rev=1508197&r1=1508196&r2=1508197&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/cryptor/AES128Cryptor.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/cryptor/AES128Cryptor.java Mon Jul 29 20:59:02 2013
@@ -44,7 +44,7 @@ public class AES128Cryptor extends AESC
@Override
protected String getKey()
{
- return "ee4bd3eefe38c3d996a89589de5b9698";
+ return "72d93747ba0162f2f2985f5cb3e24b30";
}
@Override
Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/cryptor/AESCryptorAbstract.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/cryptor/AESCryptorAbstract.java?rev=1508197&r1=1508196&r2=1508197&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/cryptor/AESCryptorAbstract.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/cryptor/AESCryptorAbstract.java Mon Jul 29 20:59:02 2013
@@ -56,26 +56,25 @@ public abstract class AESCryptorAbstract
return raw;
}
- protected String getKey() {
- return null;
- }
-
+ protected abstract String getKey();
+
/**
* Constructor for DefaultCryptor.
*/
public AESCryptorAbstract()
throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException {
- byte[] raw =//skey.getEncoded();
- hexToBytes(getKey()); //
- SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+ //byte[] raw =//skey.getEncoded();
+ // hexToBytes(getKey()); //
+ //SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
// Instantiate the cipher
- Cipher cipher = Cipher.getInstance("AES");
- cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+ //Cipher cipher = Cipher.getInstance("AES");
+ //cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
}
/**
* Encrypt the string
*/
+ @Override
public String encrypt(String cleartext)
throws NoSuchPaddingException,
NoSuchAlgorithmException,
@@ -95,6 +94,7 @@ public abstract class AESCryptorAbstract
/**
* Encrypt the string
*/
+ @Override
public String decrypt(String str)
throws NoSuchPaddingException,
NoSuchAlgorithmException,
Modified: juddi/trunk/juddi-core/src/test/java/org/apache/juddi/auth/AuthenticatorTest.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/java/org/apache/juddi/auth/AuthenticatorTest.java?rev=1508197&r1=1508196&r2=1508197&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/test/java/org/apache/juddi/auth/AuthenticatorTest.java (original)
+++ juddi/trunk/juddi-core/src/test/java/org/apache/juddi/auth/AuthenticatorTest.java Mon Jul 29 20:59:02 2013
@@ -14,6 +14,7 @@
*/
package org.apache.juddi.auth;
+import java.io.File;
import java.io.IOException;
import java.io.StringWriter;
import java.security.InvalidKeyException;
@@ -293,9 +294,9 @@ public class AuthenticatorTest
}
@Test
- public void testDecryptFromConfigXML()
+ public void testDecryptFromConfigXML_InMemory()
{
- System.out.println("testDecryptFromConfigXML");
+ System.out.println("testDecryptFromConfigXML_InMemory");
try {
Configuration config =AppConfig.getConfiguration();
@@ -310,7 +311,7 @@ public class AuthenticatorTest
//retrieve it
String pwd = config.getString("testDecryptFromConfigXML");
-
+ Assert.assertNotNull(pwd);
//test for encryption
if (config.getBoolean("testDecryptFromConfigXML" + Property.ENCRYPTED_ATTRIBUTE, false))
{
@@ -327,5 +328,142 @@ public class AuthenticatorTest
Assert.fail("unexpected");
}
}
+
+ @Test
+ public void testDecryptFromConfigXML_Disk_Default()
+ {
+ System.out.println("testDecryptFromConfigXML_Disk_Default");
+ try {
+ File f = new File(".");
+ System.out.println("Current working dir is " + f.getAbsolutePath());
+ System.setProperty(AppConfig.JUDDI_CONFIGURATION_FILE_SYSTEM_PROPERTY,f.getAbsolutePath() + "/src/test/resources/juddiv3-enc-default.xml");
+ AppConfig.reloadConfig();
+ Configuration config =AppConfig.getConfiguration();
+
+ Cryptor auth = new DefaultCryptor();
+
+ //retrieve it
+ String pwd = config.getString("juddi.mail.smtp.password");
+ Assert.assertNotNull(pwd);
+ //test for encryption
+ if (config.getBoolean("juddi.mail.smtp.password" + Property.ENCRYPTED_ATTRIBUTE, false))
+ {
+ String test=auth.decrypt(pwd);
+ Assert.assertEquals(test, "password");
+ }
+ else
+ {
+ Assert.fail("config reports that the setting is not encrypted");
+ }
+ }
+ catch (Exception e) {
+ logger.error(e.getMessage(),e);
+ Assert.fail("unexpected");
+ }
+ }
+
+
+ @Test
+ public void testDecryptFromConfigXML_Disk_3DES()
+ {
+ System.out.println("testDecryptFromConfigXML_Disk_3DES");
+ try {
+ File f = new File(".");
+ System.out.println("Current working dir is " + f.getAbsolutePath());
+ System.setProperty(AppConfig.JUDDI_CONFIGURATION_FILE_SYSTEM_PROPERTY, f.getAbsolutePath() +"/src/test/resources/juddiv3-enc-3des.xml");
+ AppConfig.reloadConfig();
+ Configuration config =AppConfig.getConfiguration();
+
+ Cryptor auth = new TripleDESCrytor();
+
+ //retrieve it
+ String pwd = config.getString("juddi.mail.smtp.password");
+ Assert.assertNotNull(pwd);
+ //test for encryption
+ if (config.getBoolean("juddi.mail.smtp.password" + Property.ENCRYPTED_ATTRIBUTE, false))
+ {
+ String test=auth.decrypt(pwd);
+ Assert.assertEquals(test, "password");
+ }
+ else
+ {
+ Assert.fail("config reports that the setting is not encrypted");
+ }
+ }
+ catch (Exception e) {
+ logger.error(e.getMessage(),e);
+ Assert.fail("unexpected");
+ }
+ }
+
+ @Test
+ public void testDecryptFromConfigXML_Disk_AES128()
+ {
+ System.out.println("testDecryptFromConfigXML_Disk_AES128");
+ try {
+ File f = new File(".");
+ System.out.println("Current working dir is " + f.getAbsolutePath());
+
+ System.setProperty(AppConfig.JUDDI_CONFIGURATION_FILE_SYSTEM_PROPERTY, f.getAbsolutePath() +"/src/test/resources/juddiv3-enc-aes128.xml");
+ AppConfig.reloadConfig();
+ Configuration config =AppConfig.getConfiguration();
+
+ Cryptor auth = new AES128Cryptor();
+
+ //retrieve it
+ String pwd = config.getString("juddi.mail.smtp.password");
+ Assert.assertNotNull(pwd);
+ //test for encryption
+ if (config.getBoolean("juddi.mail.smtp.password" + Property.ENCRYPTED_ATTRIBUTE, false))
+ {
+ String test=auth.decrypt(pwd);
+ Assert.assertEquals(test, "password");
+ }
+ else
+ {
+ Assert.fail("config reports that the setting is not encrypted");
+ }
+ }
+ catch (Exception e) {
+ logger.error(e.getMessage(),e);
+ Assert.fail("unexpected");
+ }
+ }
+
+
+
+ @Test
+ public void testDecryptFromConfigXML_Disk_AES256()
+ {
+ System.out.println("testDecryptFromConfigXML_Disk_AES256");
+ try {
+ File f = new File(".");
+ System.out.println("Current working dir is " + f.getAbsolutePath());
+ System.setProperty(AppConfig.JUDDI_CONFIGURATION_FILE_SYSTEM_PROPERTY, f.getAbsolutePath() + "/src/test/resources/juddiv3-enc-aes256.xml");
+ AppConfig.reloadConfig();
+ Configuration config =AppConfig.getConfiguration();
+
+ Cryptor auth = new AES256Cryptor();
+
+ //retrieve it
+ String pwd = config.getString("juddi.mail.smtp.password");
+ Assert.assertNotNull(pwd);
+ //test for encryption
+ if (config.getBoolean("juddi.mail.smtp.password" + Property.ENCRYPTED_ATTRIBUTE, false))
+ {
+ String test=auth.decrypt(pwd);
+ Assert.assertEquals(test, "password");
+ }
+ else
+ {
+ Assert.fail("config reports that the setting is not encrypted");
+ }
+ }
+ catch (Exception e) {
+ logger.error(e.getMessage(),e);
+ Assert.fail("unexpected");
+ }
+ }
+
}
Added: juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml?rev=1508197&view=auto
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml (added)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml Mon Jul 29 20:59:02 2013
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+################################################################
+# jUDDI-v3.0 configuration. #
+################################################################
+# Note that the property settings in this #
+# file can be overriden by system parameters #
+# #
+################################################################
+-->
+<config>
+ <juddi>
+ <!-- The ${juddi.server.baseurl} token can be referenced in accessPoints and will be resolved at runtime. -->
+ <server>
+ <baseurl>http://localhost:8080/juddiv3</baseurl>
+ </server>
+ <root>
+ <publisher>root</publisher>
+ </root>
+ <seed>
+ <always>false</always>
+ </seed>
+
+ <!-- Name of the persistence unit to use (the default, "juddiDatabase" refers to the unit compiled into the juddi library)-->
+ <persistenceunit>
+ <name>juddiDatabase</name>
+ </persistenceunit>
+
+ <!-- Check-the-time-stamp-on-this-file Interval in milli seconds -->
+ <configuration>
+ <reload>
+ <delay>2000</delay>
+ </reload>
+ </configuration>
+ <!--Default locale-->
+ <locale>en_US</locale>
+
+ <!--The UDDI Operator Contact Email Address-->
+ <operatorEmailAddress>admin@local.localhost</operatorEmailAddress>
+
+ <!-- The maximum name size and maximum number of name elements allows in several of the FindXxxx and SaveXxxx UDDI functions.-->
+ <maxNameLength>255</maxNameLength>
+ <maxNameElementsAllowed>5</maxNameElementsAllowed>
+
+
+ <!-- The maximum number of rows returned in a find_* operation. Each call can set this independently, but this property defines a global maximum.-->
+ <maxRows>1000</maxRows>
+ <!-- The maximum number of "IN" clause parameters. Some RDMBS limit the number of parameters allowed in a SQL "IN" clause.-->
+ <maxInClause>1000</maxInClause>
+
+ <!-- The maximum number of UDDI artifacts allowed per publisher. A value of '-1' indicates any number of artifacts is valid (These values can be overridden at the individual publisher level).-->
+ <maxBusinessesPerPublisher>100</maxBusinessesPerPublisher>
+ <maxServicesPerBusiness>100</maxServicesPerBusiness>
+ <maxBindingsPerService>100</maxBindingsPerService>
+ <maxTModelsPerPublisher>100</maxTModelsPerPublisher>
+
+ <!-- Days before a transfer request expires-->
+ <transfer>
+ <expiration>
+ <days>3</days>
+ </expiration>
+ </transfer>
+
+ <!-- Days before a subscription expires-->
+ <subscription>
+ <expiration>
+ <days>30</days>
+ </expiration>
+
+ <!-- Minutes before a "chunked" subscription call expires-->
+ <chunkexpiration>
+ <minutes>5</minutes>
+ </chunkexpiration>
+
+ <!--Since 3.1.5 the maxium ammount of returned subscription entities allowed-->
+ <maxentities>1000</maxentities>
+ </subscription>
+
+ <!-- jUDDI UUIDGen implementation to use-->
+ <uuidgen>org.apache.juddi.uuidgen.DefaultUUIDGen</uuidgen>
+
+ <!-- jUDDI Cryptor implementation to use-->
+ <cryptor>org.apache.juddi.cryptor.DefaultCryptor</cryptor>
+
+ <!-- jUDDI Key Generator to use-->
+ <keygenerator>org.apache.juddi.keygen.DefaultKeyGenerator</keygenerator>
+
+ <notification>
+ <!-- Specifies the interval at which the notification timer triggers-->
+ <interval>5000</interval>
+ <!-- Specifies the amount of time to wait before the notification timer initially fires-->
+ <start>
+ <buffer>0</buffer>
+ </start>
+ </notification>
+ <!-- All Authentication related settings -->
+ <auth>
+ <!-- Specifies whether the inquiry API requires authentication, all other APIs require authN-->
+ <Inquiry>false</Inquiry>
+ <!-- jUDDI Authentication module to use-->
+
+ <authenticator>
+ <class>org.apache.juddi.v3.auth.JUDDIAuthenticator</class>
+ <!-- other settings
+ url
+ initialcontext
+ style
+ ldapexp
+ -->
+ </authenticator>
+
+ <token>
+ <!-- Time in minutes to expire tokes after inactivity-->
+ <Timeout>15</Timeout>
+ <!-- As of 3.1.5 Duration of time for tokens to expire, regardless of inactivity -->
+ <Expiration>15</Expiration>
+ </token>
+ </auth>
+
+
+
+
+ <validation>
+ <!-- As of 3.1.5 This setting will force referential integrity for all tModels (except keyGenerators), category bags, bindingTemplate/AccessPoint/hostingRedirector (referencing another host), tModelinstanceparms and anything else that references a KeyName default value is true. set to false for backwards compatibility or for a more lax registry-->
+ <enforceReferentialIntegrity>true</enforceReferentialIntegrity>
+ </validation>
+
+ <!--As of 3.1.5 Email delivery options for subscription API functions-->
+ <mail>
+ <smtp>
+ <!--The Operatorâs Email address
+ <from>admin@local.localhost</from>-->
+
+ <!--the hostname of the SMTP server
+ <host>localhost</host>-->
+
+ <!--The portname of the SMTP server
+ <port>25</port>-->
+
+ <!--If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets.-->
+ <socketFactory>
+ <!--<class></class>-->
+
+ <!--If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.
+ <fallback>true</fallback>-->
+ <!--Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.
+ <port>25</port>-->
+ </socketFactory>
+ <!--if true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the serverâs certificate. Defaults to false.
+ <starttls>
+ <enabled>false</enabled>
+ </starttls>-->
+
+ <!--If true, attempt to authenticate the user using the AUTH command. Defaults to false.
+ <auth>false</auth>-->
+
+ <!--Username used to authenticate to the SMTP server used only if mail.smtp.auth is true
+ <username>user</username>-->
+
+ <!--Password used to authenticate to the SMTP server, used only if mail.smtp.auth is true-->
+ <password encrypted="true">7WJq9dOME/hvPMmxKliDKw==</password>
+ </smtp>
+ </mail>
+ </juddi>
+</config>
\ No newline at end of file
Added: juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml?rev=1508197&view=auto
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml (added)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml Mon Jul 29 20:59:02 2013
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+################################################################
+# jUDDI-v3.0 configuration. #
+################################################################
+# Note that the property settings in this #
+# file can be overriden by system parameters #
+# #
+################################################################
+-->
+<config>
+ <juddi>
+ <!-- The ${juddi.server.baseurl} token can be referenced in accessPoints and will be resolved at runtime. -->
+ <server>
+ <baseurl>http://localhost:8080/juddiv3</baseurl>
+ </server>
+ <root>
+ <publisher>root</publisher>
+ </root>
+ <seed>
+ <always>false</always>
+ </seed>
+
+ <!-- Name of the persistence unit to use (the default, "juddiDatabase" refers to the unit compiled into the juddi library)-->
+ <persistenceunit>
+ <name>juddiDatabase</name>
+ </persistenceunit>
+
+ <!-- Check-the-time-stamp-on-this-file Interval in milli seconds -->
+ <configuration>
+ <reload>
+ <delay>2000</delay>
+ </reload>
+ </configuration>
+ <!--Default locale-->
+ <locale>en_US</locale>
+
+ <!--The UDDI Operator Contact Email Address-->
+ <operatorEmailAddress>admin@local.localhost</operatorEmailAddress>
+
+ <!-- The maximum name size and maximum number of name elements allows in several of the FindXxxx and SaveXxxx UDDI functions.-->
+ <maxNameLength>255</maxNameLength>
+ <maxNameElementsAllowed>5</maxNameElementsAllowed>
+
+
+ <!-- The maximum number of rows returned in a find_* operation. Each call can set this independently, but this property defines a global maximum.-->
+ <maxRows>1000</maxRows>
+ <!-- The maximum number of "IN" clause parameters. Some RDMBS limit the number of parameters allowed in a SQL "IN" clause.-->
+ <maxInClause>1000</maxInClause>
+
+ <!-- The maximum number of UDDI artifacts allowed per publisher. A value of '-1' indicates any number of artifacts is valid (These values can be overridden at the individual publisher level).-->
+ <maxBusinessesPerPublisher>100</maxBusinessesPerPublisher>
+ <maxServicesPerBusiness>100</maxServicesPerBusiness>
+ <maxBindingsPerService>100</maxBindingsPerService>
+ <maxTModelsPerPublisher>100</maxTModelsPerPublisher>
+
+ <!-- Days before a transfer request expires-->
+ <transfer>
+ <expiration>
+ <days>3</days>
+ </expiration>
+ </transfer>
+
+ <!-- Days before a subscription expires-->
+ <subscription>
+ <expiration>
+ <days>30</days>
+ </expiration>
+
+ <!-- Minutes before a "chunked" subscription call expires-->
+ <chunkexpiration>
+ <minutes>5</minutes>
+ </chunkexpiration>
+
+ <!--Since 3.1.5 the maxium ammount of returned subscription entities allowed-->
+ <maxentities>1000</maxentities>
+ </subscription>
+
+ <!-- jUDDI UUIDGen implementation to use-->
+ <uuidgen>org.apache.juddi.uuidgen.DefaultUUIDGen</uuidgen>
+
+ <!-- jUDDI Cryptor implementation to use-->
+ <cryptor>org.apache.juddi.cryptor.DefaultCryptor</cryptor>
+
+ <!-- jUDDI Key Generator to use-->
+ <keygenerator>org.apache.juddi.keygen.DefaultKeyGenerator</keygenerator>
+
+ <notification>
+ <!-- Specifies the interval at which the notification timer triggers-->
+ <interval>5000</interval>
+ <!-- Specifies the amount of time to wait before the notification timer initially fires-->
+ <start>
+ <buffer>0</buffer>
+ </start>
+ </notification>
+ <!-- All Authentication related settings -->
+ <auth>
+ <!-- Specifies whether the inquiry API requires authentication, all other APIs require authN-->
+ <Inquiry>false</Inquiry>
+ <!-- jUDDI Authentication module to use-->
+
+ <authenticator>
+ <class>org.apache.juddi.v3.auth.JUDDIAuthenticator</class>
+ <!-- other settings
+ url
+ initialcontext
+ style
+ ldapexp
+ -->
+ </authenticator>
+
+ <token>
+ <!-- Time in minutes to expire tokes after inactivity-->
+ <Timeout>15</Timeout>
+ <!-- As of 3.1.5 Duration of time for tokens to expire, regardless of inactivity -->
+ <Expiration>15</Expiration>
+ </token>
+ </auth>
+
+
+
+
+ <validation>
+ <!-- As of 3.1.5 This setting will force referential integrity for all tModels (except keyGenerators), category bags, bindingTemplate/AccessPoint/hostingRedirector (referencing another host), tModelinstanceparms and anything else that references a KeyName default value is true. set to false for backwards compatibility or for a more lax registry-->
+ <enforceReferentialIntegrity>true</enforceReferentialIntegrity>
+ </validation>
+
+ <!--As of 3.1.5 Email delivery options for subscription API functions-->
+ <mail>
+ <smtp>
+ <!--The Operatorâs Email address
+ <from>admin@local.localhost</from>-->
+
+ <!--the hostname of the SMTP server
+ <host>localhost</host>-->
+
+ <!--The portname of the SMTP server
+ <port>25</port>-->
+
+ <!--If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets.-->
+ <socketFactory>
+ <!--<class></class>-->
+
+ <!--If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.
+ <fallback>true</fallback>-->
+ <!--Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.
+ <port>25</port>-->
+ </socketFactory>
+ <!--if true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the serverâs certificate. Defaults to false.
+ <starttls>
+ <enabled>false</enabled>
+ </starttls>-->
+
+ <!--If true, attempt to authenticate the user using the AUTH command. Defaults to false.
+ <auth>false</auth>-->
+
+ <!--Username used to authenticate to the SMTP server used only if mail.smtp.auth is true
+ <username>user</username>-->
+
+ <!--Password used to authenticate to the SMTP server, used only if mail.smtp.auth is true-->
+ <password encrypted="true">18604180541d172f9827e08c998db568</password>
+ </smtp>
+ </mail>
+ </juddi>
+</config>
\ No newline at end of file
Added: juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml?rev=1508197&view=auto
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml (added)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml Mon Jul 29 20:59:02 2013
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+################################################################
+# jUDDI-v3.0 configuration. #
+################################################################
+# Note that the property settings in this #
+# file can be overriden by system parameters #
+# #
+################################################################
+-->
+<config>
+ <juddi>
+ <!-- The ${juddi.server.baseurl} token can be referenced in accessPoints and will be resolved at runtime. -->
+ <server>
+ <baseurl>http://localhost:8080/juddiv3</baseurl>
+ </server>
+ <root>
+ <publisher>root</publisher>
+ </root>
+ <seed>
+ <always>false</always>
+ </seed>
+
+ <!-- Name of the persistence unit to use (the default, "juddiDatabase" refers to the unit compiled into the juddi library)-->
+ <persistenceunit>
+ <name>juddiDatabase</name>
+ </persistenceunit>
+
+ <!-- Check-the-time-stamp-on-this-file Interval in milli seconds -->
+ <configuration>
+ <reload>
+ <delay>2000</delay>
+ </reload>
+ </configuration>
+ <!--Default locale-->
+ <locale>en_US</locale>
+
+ <!--The UDDI Operator Contact Email Address-->
+ <operatorEmailAddress>admin@local.localhost</operatorEmailAddress>
+
+ <!-- The maximum name size and maximum number of name elements allows in several of the FindXxxx and SaveXxxx UDDI functions.-->
+ <maxNameLength>255</maxNameLength>
+ <maxNameElementsAllowed>5</maxNameElementsAllowed>
+
+
+ <!-- The maximum number of rows returned in a find_* operation. Each call can set this independently, but this property defines a global maximum.-->
+ <maxRows>1000</maxRows>
+ <!-- The maximum number of "IN" clause parameters. Some RDMBS limit the number of parameters allowed in a SQL "IN" clause.-->
+ <maxInClause>1000</maxInClause>
+
+ <!-- The maximum number of UDDI artifacts allowed per publisher. A value of '-1' indicates any number of artifacts is valid (These values can be overridden at the individual publisher level).-->
+ <maxBusinessesPerPublisher>100</maxBusinessesPerPublisher>
+ <maxServicesPerBusiness>100</maxServicesPerBusiness>
+ <maxBindingsPerService>100</maxBindingsPerService>
+ <maxTModelsPerPublisher>100</maxTModelsPerPublisher>
+
+ <!-- Days before a transfer request expires-->
+ <transfer>
+ <expiration>
+ <days>3</days>
+ </expiration>
+ </transfer>
+
+ <!-- Days before a subscription expires-->
+ <subscription>
+ <expiration>
+ <days>30</days>
+ </expiration>
+
+ <!-- Minutes before a "chunked" subscription call expires-->
+ <chunkexpiration>
+ <minutes>5</minutes>
+ </chunkexpiration>
+
+ <!--Since 3.1.5 the maxium ammount of returned subscription entities allowed-->
+ <maxentities>1000</maxentities>
+ </subscription>
+
+ <!-- jUDDI UUIDGen implementation to use-->
+ <uuidgen>org.apache.juddi.uuidgen.DefaultUUIDGen</uuidgen>
+
+ <!-- jUDDI Cryptor implementation to use-->
+ <cryptor>org.apache.juddi.cryptor.DefaultCryptor</cryptor>
+
+ <!-- jUDDI Key Generator to use-->
+ <keygenerator>org.apache.juddi.keygen.DefaultKeyGenerator</keygenerator>
+
+ <notification>
+ <!-- Specifies the interval at which the notification timer triggers-->
+ <interval>5000</interval>
+ <!-- Specifies the amount of time to wait before the notification timer initially fires-->
+ <start>
+ <buffer>0</buffer>
+ </start>
+ </notification>
+ <!-- All Authentication related settings -->
+ <auth>
+ <!-- Specifies whether the inquiry API requires authentication, all other APIs require authN-->
+ <Inquiry>false</Inquiry>
+ <!-- jUDDI Authentication module to use-->
+
+ <authenticator>
+ <class>org.apache.juddi.v3.auth.JUDDIAuthenticator</class>
+ <!-- other settings
+ url
+ initialcontext
+ style
+ ldapexp
+ -->
+ </authenticator>
+
+ <token>
+ <!-- Time in minutes to expire tokes after inactivity-->
+ <Timeout>15</Timeout>
+ <!-- As of 3.1.5 Duration of time for tokens to expire, regardless of inactivity -->
+ <Expiration>15</Expiration>
+ </token>
+ </auth>
+
+
+
+
+ <validation>
+ <!-- As of 3.1.5 This setting will force referential integrity for all tModels (except keyGenerators), category bags, bindingTemplate/AccessPoint/hostingRedirector (referencing another host), tModelinstanceparms and anything else that references a KeyName default value is true. set to false for backwards compatibility or for a more lax registry-->
+ <enforceReferentialIntegrity>true</enforceReferentialIntegrity>
+ </validation>
+
+ <!--As of 3.1.5 Email delivery options for subscription API functions-->
+ <mail>
+ <smtp>
+ <!--The Operatorâs Email address
+ <from>admin@local.localhost</from>-->
+
+ <!--the hostname of the SMTP server
+ <host>localhost</host>-->
+
+ <!--The portname of the SMTP server
+ <port>25</port>-->
+
+ <!--If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets.-->
+ <socketFactory>
+ <!--<class></class>-->
+
+ <!--If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.
+ <fallback>true</fallback>-->
+ <!--Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.
+ <port>25</port>-->
+ </socketFactory>
+ <!--if true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the serverâs certificate. Defaults to false.
+ <starttls>
+ <enabled>false</enabled>
+ </starttls>-->
+
+ <!--If true, attempt to authenticate the user using the AUTH command. Defaults to false.
+ <auth>false</auth>-->
+
+ <!--Username used to authenticate to the SMTP server used only if mail.smtp.auth is true
+ <username>user</username>-->
+
+ <!--Password used to authenticate to the SMTP server, used only if mail.smtp.auth is true-->
+ <password encrypted="true">cce2f4b3f1dfe3211408c71cd8c38ee3</password>
+ </smtp>
+ </mail>
+ </juddi>
+</config>
\ No newline at end of file
Added: juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml?rev=1508197&view=auto
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml (added)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml Mon Jul 29 20:59:02 2013
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+################################################################
+# jUDDI-v3.0 configuration. #
+################################################################
+# Note that the property settings in this #
+# file can be overriden by system parameters #
+# #
+################################################################
+-->
+<config>
+ <juddi>
+ <!-- The ${juddi.server.baseurl} token can be referenced in accessPoints and will be resolved at runtime. -->
+ <server>
+ <baseurl>http://localhost:8080/juddiv3</baseurl>
+ </server>
+ <root>
+ <publisher>root</publisher>
+ </root>
+ <seed>
+ <always>false</always>
+ </seed>
+
+ <!-- Name of the persistence unit to use (the default, "juddiDatabase" refers to the unit compiled into the juddi library)-->
+ <persistenceunit>
+ <name>juddiDatabase</name>
+ </persistenceunit>
+
+ <!-- Check-the-time-stamp-on-this-file Interval in milli seconds -->
+ <configuration>
+ <reload>
+ <delay>2000</delay>
+ </reload>
+ </configuration>
+ <!--Default locale-->
+ <locale>en_US</locale>
+
+ <!--The UDDI Operator Contact Email Address-->
+ <operatorEmailAddress>admin@local.localhost</operatorEmailAddress>
+
+ <!-- The maximum name size and maximum number of name elements allows in several of the FindXxxx and SaveXxxx UDDI functions.-->
+ <maxNameLength>255</maxNameLength>
+ <maxNameElementsAllowed>5</maxNameElementsAllowed>
+
+
+ <!-- The maximum number of rows returned in a find_* operation. Each call can set this independently, but this property defines a global maximum.-->
+ <maxRows>1000</maxRows>
+ <!-- The maximum number of "IN" clause parameters. Some RDMBS limit the number of parameters allowed in a SQL "IN" clause.-->
+ <maxInClause>1000</maxInClause>
+
+ <!-- The maximum number of UDDI artifacts allowed per publisher. A value of '-1' indicates any number of artifacts is valid (These values can be overridden at the individual publisher level).-->
+ <maxBusinessesPerPublisher>100</maxBusinessesPerPublisher>
+ <maxServicesPerBusiness>100</maxServicesPerBusiness>
+ <maxBindingsPerService>100</maxBindingsPerService>
+ <maxTModelsPerPublisher>100</maxTModelsPerPublisher>
+
+ <!-- Days before a transfer request expires-->
+ <transfer>
+ <expiration>
+ <days>3</days>
+ </expiration>
+ </transfer>
+
+ <!-- Days before a subscription expires-->
+ <subscription>
+ <expiration>
+ <days>30</days>
+ </expiration>
+
+ <!-- Minutes before a "chunked" subscription call expires-->
+ <chunkexpiration>
+ <minutes>5</minutes>
+ </chunkexpiration>
+
+ <!--Since 3.1.5 the maxium ammount of returned subscription entities allowed-->
+ <maxentities>1000</maxentities>
+ </subscription>
+
+ <!-- jUDDI UUIDGen implementation to use-->
+ <uuidgen>org.apache.juddi.uuidgen.DefaultUUIDGen</uuidgen>
+
+ <!-- jUDDI Cryptor implementation to use-->
+ <cryptor>org.apache.juddi.cryptor.DefaultCryptor</cryptor>
+
+ <!-- jUDDI Key Generator to use-->
+ <keygenerator>org.apache.juddi.keygen.DefaultKeyGenerator</keygenerator>
+
+ <notification>
+ <!-- Specifies the interval at which the notification timer triggers-->
+ <interval>5000</interval>
+ <!-- Specifies the amount of time to wait before the notification timer initially fires-->
+ <start>
+ <buffer>0</buffer>
+ </start>
+ </notification>
+ <!-- All Authentication related settings -->
+ <auth>
+ <!-- Specifies whether the inquiry API requires authentication, all other APIs require authN-->
+ <Inquiry>false</Inquiry>
+ <!-- jUDDI Authentication module to use-->
+
+ <authenticator>
+ <class>org.apache.juddi.v3.auth.JUDDIAuthenticator</class>
+ <!-- other settings
+ url
+ initialcontext
+ style
+ ldapexp
+ -->
+ </authenticator>
+
+ <token>
+ <!-- Time in minutes to expire tokes after inactivity-->
+ <Timeout>15</Timeout>
+ <!-- As of 3.1.5 Duration of time for tokens to expire, regardless of inactivity -->
+ <Expiration>15</Expiration>
+ </token>
+ </auth>
+
+
+
+
+ <validation>
+ <!-- As of 3.1.5 This setting will force referential integrity for all tModels (except keyGenerators), category bags, bindingTemplate/AccessPoint/hostingRedirector (referencing another host), tModelinstanceparms and anything else that references a KeyName default value is true. set to false for backwards compatibility or for a more lax registry-->
+ <enforceReferentialIntegrity>true</enforceReferentialIntegrity>
+ </validation>
+
+ <!--As of 3.1.5 Email delivery options for subscription API functions-->
+ <mail>
+ <smtp>
+ <!--The Operatorâs Email address
+ <from>admin@local.localhost</from>-->
+
+ <!--the hostname of the SMTP server
+ <host>localhost</host>-->
+
+ <!--The portname of the SMTP server
+ <port>25</port>-->
+
+ <!--If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets.-->
+ <socketFactory>
+ <!--<class></class>-->
+
+ <!--If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.
+ <fallback>true</fallback>-->
+ <!--Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.
+ <port>25</port>-->
+ </socketFactory>
+ <!--if true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the serverâs certificate. Defaults to false.
+ <starttls>
+ <enabled>false</enabled>
+ </starttls>-->
+
+ <!--If true, attempt to authenticate the user using the AUTH command. Defaults to false.
+ <auth>false</auth>-->
+
+ <!--Username used to authenticate to the SMTP server used only if mail.smtp.auth is true
+ <username>user</username>-->
+
+ <!--Password used to authenticate to the SMTP server, used only if mail.smtp.auth is true-->
+ <password encrypted="true">+j/kXkZJftwTFTBH6Cf6IQ==</password>
+ </smtp>
+ </mail>
+ </juddi>
+</config>
\ No newline at end of file
Modified: juddi/trunk/juddi-examples/uddi-samples/nbproject/project.properties
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-examples/uddi-samples/nbproject/project.properties?rev=1508197&r1=1508196&r2=1508197&view=diff
==============================================================================
--- juddi/trunk/juddi-examples/uddi-samples/nbproject/project.properties (original)
+++ juddi/trunk/juddi-examples/uddi-samples/nbproject/project.properties Mon Jul 29 20:59:02 2013
@@ -28,13 +28,7 @@ dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.aopalliance-1.0.jar=../../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/aopalliance-1.0.jar
-file.reference.commons-beanutils-1.7.0.jar=../../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-beanutils-1.7.0.jar
-file.reference.commons-beanutils-core-1.8.0.jar=../../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-beanutils-core-1.8.0.jar
file.reference.commons-codec-1.3.jar=../../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-codec-1.3.jar
-file.reference.commons-collections-3.2.1.jar=../../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-collections-3.2.1.jar
-file.reference.commons-configuration-1.6.jar=../../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-configuration-1.6.jar
-file.reference.commons-digester-1.8.jar=../../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-digester-1.8.jar
-file.reference.commons-lang-2.4.jar=../../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-lang-2.4.jar
file.reference.commons-logging-api-1.1.jar=../../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-logging-api-1.1.jar
file.reference.commons-pool-1.5.4.jar=../../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/commons-pool-1.5.4.jar
file.reference.geronimo-javamail_1.4_mail-1.8.2.jar=../../juddi-tomcat/target/tomcat/apache-tomcat-6.0.26/webapps/juddiv3/WEB-INF/lib/geronimo-javamail_1.4_mail-1.8.2.jar
@@ -59,13 +53,7 @@ jar.compress=false
jar.index=${jnlp.enabled}
javac.classpath=\
${file.reference.aopalliance-1.0.jar}:\
- ${file.reference.commons-beanutils-1.7.0.jar}:\
- ${file.reference.commons-beanutils-core-1.8.0.jar}:\
${file.reference.commons-codec-1.3.jar}:\
- ${file.reference.commons-collections-3.2.1.jar}:\
- ${file.reference.commons-configuration-1.6.jar}:\
- ${file.reference.commons-digester-1.8.jar}:\
- ${file.reference.commons-lang-2.4.jar}:\
${file.reference.commons-logging-api-1.1.jar}:\
${file.reference.commons-pool-1.5.4.jar}:\
${file.reference.geronimo-javamail_1.4_mail-1.8.2.jar}:\
Modified: juddi/trunk/juddi-examples/uddi-samples/src/uddi/examples/AES.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-examples/uddi-samples/src/uddi/examples/AES.java?rev=1508197&r1=1508196&r2=1508197&view=diff
==============================================================================
--- juddi/trunk/juddi-examples/uddi-samples/src/uddi/examples/AES.java (original)
+++ juddi/trunk/juddi-examples/uddi-samples/src/uddi/examples/AES.java Mon Jul 29 20:59:02 2013
@@ -4,8 +4,10 @@
*/
package uddi.examples;
+import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
+import javax.crypto.spec.SecretKeySpec;
/**
* This call is a simple test class that shows how to encrypt stuff in Java using AES
@@ -64,9 +66,27 @@ public class AES {
return raw;
}
//default key
- private final static String something2 = "dde284c781d60ca0b56c4b23eec85217951dc99869402abd42c7dcc9080d60aa";
+ // private final static String something2 = "dde284c781d60ca0b56c4b23eec85217951dc99869402abd42c7dcc9080d60aa";
- public static void main(String[] args){
- System.out.println(GEN(128));
+ public static void main(String[] args) throws Exception{
+ //ee4bd3eefe38c3d996a89589de5b9698
+ String key = GEN(128);
+ System.out.println(key);
+
+ byte[] raw = hexToBytes(key); //
+ SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
+ // Instantiate the cipher
+ Cipher cipher = Cipher.getInstance("AES");
+ cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
+ byte[] encrypted = cipher.doFinal("password".getBytes());
+ String enc = (asHex(encrypted));
+ System.out.println(enc);
+
+ skeySpec = new SecretKeySpec(hexToBytes(key), "AES");
+ cipher.init(Cipher.DECRYPT_MODE, skeySpec);
+ byte[] original = cipher.doFinal(hexToBytes(enc));
+
+ System.out.println( new String(original));
+
}
}
Modified: juddi/trunk/juddi-examples/uddi-samples/src/uddi/examples/DES.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-examples/uddi-samples/src/uddi/examples/DES.java?rev=1508197&r1=1508196&r2=1508197&view=diff
==============================================================================
--- juddi/trunk/juddi-examples/uddi-samples/src/uddi/examples/DES.java (original)
+++ juddi/trunk/juddi-examples/uddi-samples/src/uddi/examples/DES.java Mon Jul 29 20:59:02 2013
@@ -2,7 +2,6 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
-
package uddi.examples;
import java.security.InvalidAlgorithmParameterException;
@@ -20,33 +19,28 @@ import javax.crypto.spec.DESedeKeySpec;
import org.apache.commons.codec.binary.Base64;
/**
- * This call is a simple test class that shows how to encrypt stuff in Java using 3DES
+ * This call is a simple test class that shows how to encrypt stuff in Java
+ * using 3DES
+ *
* @author Alex O'Ree
*/
public class DES {
- private static final String UNICODE_FORMAT = "UTF8";
+
+ private static final String UNICODE_FORMAT = "UTF8";
public static final String DESEDE_ENCRYPTION_SCHEME = "DESede";
- private KeySpec ks;
- private SecretKeyFactory skf;
- private Cipher cipher;
- byte[] arrayBytes;
- private String myEncryptionKey;
- private String myEncryptionScheme;
- SecretKey key;
+ static private KeySpec ks;
+ static private SecretKeyFactory skf;
+ static private Cipher cipher;
+ static byte[] arrayBytes;
+ static private String myEncryptionKey;
+ static private String myEncryptionScheme;
+ static SecretKey key;
public DES() throws Exception {
- myEncryptionKey = "rioTEBCe/RAHRs6tTyYxDqettnVbZA6z";
- myEncryptionScheme = DESEDE_ENCRYPTION_SCHEME;
- arrayBytes = myEncryptionKey.getBytes(UNICODE_FORMAT);
- ks = new DESedeKeySpec(arrayBytes);
- skf = SecretKeyFactory.getInstance(myEncryptionScheme);
- cipher = Cipher.getInstance(myEncryptionScheme);
- key = skf.generateSecret(ks);
}
-
public String encrypt(String clear) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
- String encryptedString = null;
+ String encryptedString = null;
try {
cipher.init(Cipher.ENCRYPT_MODE, key);
byte[] plainText = clear.getBytes(UNICODE_FORMAT);
@@ -57,19 +51,42 @@ public class DES {
}
return encryptedString;
}
-
- public static void main(String[] args) throws Exception{
+
+ public String decrypt(String str) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
+ String encryptedString = null;
+ try {
+ cipher.init(Cipher.DECRYPT_MODE, key);
+ byte[] encryptedText = Base64.decodeBase64(str.getBytes());
+ byte[] clear = cipher.doFinal(encryptedText);
+ encryptedString = new String(Base64.encodeBase64(clear));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return encryptedString;
+ }
+
+ public static void main(String[] args) throws Exception {
DES des = new DES();
- /*KeyGenerator kgen;
+ KeyGenerator kgen;
try {
kgen = KeyGenerator.getInstance(DESEDE_ENCRYPTION_SCHEME);
kgen.init(168);
SecretKey skey = kgen.generateKey();
byte[] raw = skey.getEncoded();
- System.out.println(new String(Base64.encodeBase64(raw)));
+ myEncryptionKey = new String(Base64.encodeBase64(raw));
+ myEncryptionScheme = DESEDE_ENCRYPTION_SCHEME;
+ arrayBytes = myEncryptionKey.getBytes(UNICODE_FORMAT);
+ ks = new DESedeKeySpec(arrayBytes);
+ skf = SecretKeyFactory.getInstance(myEncryptionScheme);
+ cipher = Cipher.getInstance(myEncryptionScheme);
+ key = skf.generateSecret(ks);
+
+ System.out.println(new String(Base64.encodeBase64(raw)));
+ System.out.println(des.encrypt("password"));
+ System.out.println(des.decrypt(des.encrypt("password")));
} catch (Exception ex) {
ex.printStackTrace();;
- }*/
- System.out.println(des.encrypt("test"));
+ }
+
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org