Products Downloads


French version


Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

...

The element is optional, a wagon.key private key is provided by default in the application's /conf directory.

 


This file can be externalised in the form of a URL-type JNDI resource via the url/adeliaWagonKey alias.

Bloc de code
languagexml
<keystore file="java:comp/env/url/wagonKeystore"><parameters><item>
	<parameters>
		<item key="keyStoreType" value="jks" /><item>
		<item key="keystorePassword" value="kspass" /><item>
		<item key="keyAlias" value="test" /><item>
		<item key="keyPassword" value="keypass" /></parameters><>
	</parameters>
</keystore>

 


The "file" attribute indicates:

  • either a file name (if the path is not provided, the file is looked up in the application's "conf" directory), 
  • or a JNDI URL and enables the key file to be used to be located.

...


The keystore parameters are provided via a list of parameters ("parameters" section) and can take the following values:

Hardis - Tableau personnalisé
firstLineHeadertrue
marginLeft30px

Parameter

Description

Default value

keystoreType

Keystore type.

The possible values are jks, pkcs12 and jceks.

jks

keystorePassword

Keystore password.

wagon

keyAlias

Key alias in the keystore

wagonkey

keyPassword

Key password.

wagon


 Please note that, by definition, "keystore" element data cannot be encoded, the prefix {RSA} cannot appear in the specified values. 


All the keystore parameters may be specified via Java system properties (-Dxxx).

When the system properties are present, they systematically take priority over the wagon.xml configuration. 


Hardis - Tableau personnalisé
firstLineHeadertrue
marginLeft30px

Parameter

Description

Default value

-DWagonKeystoreType

Keystore type.

The possible values are jks, pkcs12 and jceks.

jks

-DWagonKeystorePassword

Keystore password.

wagon

-DWagonKeyAlias

Key alias in the keystore

wagonkey

-DWagonKeyPassword

Key password.

wagon

...


The data can be configured in the command line using the WagonKeyUtils utility. 


The utility parameters are:

Hardis - Tableau personnalisé
firstLineHeadertrue
marginLeft30px

Parameter

Description

Default value

-[action]

Action to execute.  The available actions are as follows:

Hardis - Tableau personnalisé
noBordertrue
marginLeft30px

-generate

Creates a keystore and encoding key.

-encode

Encodes a character string.

-check

Encoding check (tests if the encoded value corresponds to the provided value).

Mandatory parameter.

-

-keyfile <file_name>

Key file name (java keystore).

Mandatory parameter

-

-keystoreType <type>

Keystore type.

The possible values are jks, pkcs12 and jceks.

jks

-keystorePassword <mdp>

Keystore password.

wagon
-keyAlias

Key alias in the keystore

wagonkey

-DWagonKeyPassword

Key password.

wagon

[Text]

Text to encode (if -encode) or check (-check).

Mandatory if the action is -encode or -check.
-
[EncodedText]

Encoded text to check.

Mandatory if the action is -check.
-


 For example :

 


To encode a password with the default parameters:

java -cp "%ADELIWS%\javarun\*" com.hardis.wagon.runtime.tools.WagonKeyUtils -encode -keyfile pathto\wagon.key textToEncode

 


Response received:

NbuFLotGif3x84tycbzsT995n14WYsJssouQSO1/fQcSzyHR4TyFnJXH2m6Xg3cz7hodUcPJYSBawUyg9y4jx8hIXGcy+3HAgg+4HaOleeZOEgF9CIaxu6RxOLZbaqSzfz0e2fSLxzTvSYnVVam8Q1DzVXFZZ5GycxPChDWhRs6TYE1jDnedPoouh5k7c2Yt3OAM/ygZp+tsF8XHuL7i5iMW1Y1pDfU9zNIl5VFaO5kNvvTgWs8Vl9v+2+uJOtgyIFIi/mg4ryy89ylMM7pcfleMGlfxkSN95vh/1+/+wtv/lMly03MuFOZfvAJ1vmifgUd6JApBieOV+bCVCuf9YQ==

...


To use an encoded value in wagon.xml it needs to be prefixed by the {RSA} block:

<userConfiguration driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@hostname:1521:SID" username="MyUser" password="MyPwd" tableName="WGNSETTINGS"/>

 


becomes

<userConfiguration driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@hostname:1521:SID" username="MyUser" password="{RSA}NbuFLotGif3x84tycbzsT995n14WYsJssouQSO1/fQcSzyHR4TyFnJXH2m6Xg3cz7hodUcPJYSBawUyg9y4jx8hIXGcy+3HAgg+4HaOleeZOEgF9CIaxu6RxOLZbaqSzfz0e2fSLxzTvSYnV

Vam8Q1DzVXFZZ5GycxPChDWhRs6TYE1jDnedPoouh5k7c2Yt3OAM/ygZp+tsF8XHuL7i5iMW1Y1pDfU9zNIl5VFaO5kNvvTgWs8Vl9v+2+uJOtgyIFIi/mg4ryy89ylMM7pcfleMGlfxkSN95vh/1+/+wtv/lMly03MuFOZfvAJ1vmifgUd6JApBieOV+bCVCuf9YQ==" tableName="WGNSETTINGS"/> 

...


A new private key can be generated with the -generate command for example:

java -cp "%ADELIWS%\javarun\*" com.hardis.wagon.runtime.tools.WagonKeyUtils -generate pathto\wagon.key

...


Avertissement
iconfalse
titleImportant

When generating a new key, all the previously created {RSA} tags need to be regenerated.

The creation and verification of encoded strings is accessible via http://host[:port]/yourapplication/console/cipher.jsp.

Hardis - Haut de page

↑ Top of page

...