All Downloads are FREE. Search and download functionalities are using the official Maven repository.

refcodes-forwardsecrecy-alt-filesystem.3.0.9.source-code.refcodes-forwardsecrecy-context.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8"?>
<!-- ===========================================================================
// REFCODES.ORG
// =============================================================================
// This code is copyright (c) by Siegfried Steiner, Munich, Germany and licensed
// under the following (see "http://en.wikipedia.org/wiki/Multi-licensing")
// licenses:
// =============================================================================
// GNU General Public License, v3.0 ("http://www.gnu.org/licenses/gpl-3.0.html")
// =============================================================================
// Apache License, v2.0 ("http://www.apache.org/licenses/LICENSE-2.0")
// =============================================================================
// Please contact the copyright holding author(s) of the software artifacts in
// question for licensing issues not being covered by the above listed licenses,
// also regarding commercial licensing models or regarding the compatibility
// with other open source licenses.
// ========================================================================= -->

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/tx
        http://www.springframework.org/schema/tx/spring-tx.xsd">

	<!--/////////////////////////////////////////////////////////////////// -->
	<!-- FORWARD_SECRECY DATA STORE SERVICE                                     -->
	<!--/////////////////////////////////////////////////////////////////// -->
	<bean id="forwardSecrecyFileSystem" class="org.refcodes.filesystem.InMemoryFileSystem" lazy-init="true" />

	<!--/////////////////////////////////////////////////////////////////// -->
	<!-- ENCRYPTION SERVER                                                   -->
	<!--/////////////////////////////////////////////////////////////////// -->
	<bean id="encryptionServer" class="org.refcodes.forwardsecrecy.alt.filesystem.FileSystemEncryptionServer" lazy-init="true">
		<constructor-arg ref="forwardSecrecyFileSystem" />
		<constructor-arg value="${FORWARD_SECRECY_FILESYSTEM_PATH}"/>
	</bean>

	<!--/////////////////////////////////////////////////////////////////// -->
	<!-- ENCRYPTION SERVICE                                                  -->
	<!--/////////////////////////////////////////////////////////////////// -->
	<bean id="encryptionService" class="org.refcodes.forwardsecrecy.PublicKeyEncryptionService" lazy-init="true">
		<constructor-arg value="${FORWARD_SECRECY_NAMESPACE}"/>
		<constructor-arg value="${FORWARD_SECRECY_SERVER_PUBLIC_KEY_PATH}"/>
		<constructor-arg ref="encryptionServer"/>
	</bean>
	
	<!--/////////////////////////////////////////////////////////////////// -->
	<!-- ENCRYPTION PROVIDER                                                 -->
	<!--/////////////////////////////////////////////////////////////////// -->
	<bean id="encryptionProvider" class="org.refcodes.forwardsecrecy.EncryptionProviderImpl" lazy-init="true">
		<constructor-arg ref="encryptionService"/>
	</bean>
	
	<!--/////////////////////////////////////////////////////////////////// -->
	<!-- DECRYPTION PROVIDER                                                 -->
	<!--/////////////////////////////////////////////////////////////////// -->
	<bean id="decryptionProvider" class="org.refcodes.forwardsecrecy.DecryptionProviderImpl" lazy-init="true">
		<constructor-arg ref="decryptionService"/>
	</bean>
	
	<!--/////////////////////////////////////////////////////////////////// -->
	<!-- DECRYPTION SERVICE                                                  -->
	<!--/////////////////////////////////////////////////////////////////// -->
	<bean id="decryptionService" class="org.refcodes.forwardsecrecy.PublicKeyDecryptionService" lazy-init="true">
		<constructor-arg value="${FORWARD_SECRECY_NAMESPACE}"/>
		<constructor-arg value="${FORWARD_SECRECY_SERVICE_PRIVATE_KEY_PATH}"/>
		<constructor-arg ref="decryptionServerWrapper"/>
		<property name="CipherVersionsExpireTimeMillis" value="${FORWARD_SECRECY_DECRYPTION_SERVICE_CIPHER_VERSIONS_EXPIRE_TIME_IN_MS}"/>
	</bean>
	
	<!--/////////////////////////////////////////////////////////////////// -->
	<!-- DECRYPTION SERVER                                                   -->
	<!--/////////////////////////////////////////////////////////////////// -->
	<bean id="decryptionServer" class="org.refcodes.forwardsecrecy.alt.filesystem.FileSystemDecryptionServer" lazy-init="true">
		<constructor-arg ref="forwardSecrecyFileSystem" />
		<constructor-arg value="${FORWARD_SECRECY_FILESYSTEM_PATH}"/>
	</bean>
	
	<!--/////////////////////////////////////////////////////////////////// -->
	<!-- DECRYPTION SERVER WRAPPER                                           -->
	<!--/////////////////////////////////////////////////////////////////// -->
	<!-- This configuration is special as it uses not only one key pair for  -->
	<!-- encryption and decryption. It uses one key pair for encrypting the  -->
	<!-- ciphers by the "encryptionService" to be stored by the              -->
	<!-- "encryptionServer" and for decrypting ciphers from the              -->
	<!-- "decryptionServer" by "decryptionServerWrapper".                    -->
	<!-- =================================================================== -->
	<!-- This wrapper also  requires public keys of separate key pairs for   -->
	<!-- encrypting the ciphers requested by a "decryptionService" which has -->
	<!-- an according private key for finally decrypting. There may be cases -->
	<!-- where the second encryption step may be skipped, for such cases the -->
	<!-- wrapper can be omitted as done for the "simple" cryptography        -->
	<!-- context!                                                            -->
	<!--/////////////////////////////////////////////////////////////////// -->
	<bean id="decryptionServerWrapper" class="org.refcodes.forwardsecrecy.PublicKeyDecryptionServerWrapper" lazy-init="true">
		<constructor-arg value="${FORWARD_SECRECY_SERVER_PRIVATE_KEY_PATH}" />
		<constructor-arg value="${FORWARD_SECRECY_SERVICE_PUBLIC_KEYS_PATH}" />
		<constructor-arg ref="decryptionServer" />
	</bean>
</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy