Author: ruwan Date: Wed Jul 1 01:04:35 2009 New Revision: 40482 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=40482
Log: Fixing the documentation issues Modified: trunk/esb/java/docs/xdoc/securing_secret_information.xml Modified: trunk/esb/java/docs/xdoc/securing_secret_information.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/docs/xdoc/securing_secret_information.xml?rev=40482&r1=40481&r2=40482&view=diff ============================================================================== --- trunk/esb/java/docs/xdoc/securing_secret_information.xml (original) +++ trunk/esb/java/docs/xdoc/securing_secret_information.xml Wed Jul 1 01:04:35 2009 @@ -1,31 +1,32 @@ -<?xml version="1.0" encoding="iso-8859-1"?> +<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -~ Copyright (c) 2009, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -~ -~ WSO2 Inc. licenses this file to you under the Apache License, -~ Version 2.0 (the "License"); you may not use this file except -~ in compliance with the License. -~ You may obtain a copy of the License at -~ -~ http://www.apache.org/licenses/LICENSE-2.0 -~ -~ Unless required by applicable law or agreed to in writing, -~ software distributed under the License is distributed on an -~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -~ KIND, either express or implied. See the License for the -~ specific language governing permissions and limitations -~ under the License. ---> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <meta content="text/html; charset=iso-8859-1" http-equiv="content-type" /> - <title>Securing Secret Information </title> - <link href="css/esb-docs.css" rel="stylesheet" /> - <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" - media="all" /> -</head> + ~ Copyright (c) 2009, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + ~ + ~ WSO2 Inc. licenses this file to you under the Apache License, + ~ Version 2.0 (the "License"); you may not use this file except + ~ in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/> + <title>Securing Secret Information </title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" media="all" /> + </head> <body> <h1>Securing Secret Information</h1> @@ -239,7 +240,7 @@ <p></p> -<p><pre>* @scr.reference name="secret.callback.handler.service" +<pre>* @scr.reference name="secret.callback.handler.service" * interface="org.wso2.carbon.securevault.SecretCallbackHandlerService" * cardinality="1..1" policy="dynamic" * bind="setSecretCallbackHandlerService" unbind="unsetSecretCallbackHandlerService @@ -252,48 +253,33 @@ protected void unsetSecretCallbackHandlerService(SecretCallbackHandlerService secretCallbackHandlerService) { Logic on Unset }</pre> -</p> - -<p></p> <p><strong>Logic on Set </strong></p> -<p></p> - <p>If the secret that need to be resolved can be accessed directly. For example passing as an argument. You can use following logic.</p> -<p></p> - -<p><pre>SecretCallbackHandler secretProvider = secretCallbackHandlerService.getSecretCallbackHandler()); +<pre> SecretCallbackHandler secretProvider = secretCallbackHandlerService.getSecretCallbackHandler()); + SecretInformation secretInformation = SecretInformationFactory.createSecretInformation(secretProvider, aliasPassword, passwordPrompt); + String actualPassword = secretInformation.getResolvedSecret();</pre> -SecretInformation secretInformation = SecretInformationFactory.createSecretInformation(secretProvider, aliasPassword, passwordPrompt); - -String actualPassword = secretInformation.getResolvedSecret();</pre> -</p> - -<p>Now you can pPass either actualPassword or secretProvider or +<p>Now you can pass either actualPassword or secretProvider or secretInformation to the code location that uses pasword . But if the code that do secret resolution can not be accessed. For example, when use a configuration such as follows - you cannot pass resolved password directly.</p> -<p></p> - -<p><pre><datasource> - <password>pass</password> - <secretProvider>any implementation of SecretCallbackHandler- class name</secretProvider> -</datasource></pre> -</p> +<pre> <datasource> + <password>pass</password> + <secretProvider>any implementation of SecretCallbackHandler- class name</secretProvider> + </datasource></pre> <p>You have to do following if the scenario is similar to the above.</p> -<p></p> - -<p><pre>if (secretCallbackHandlerService != null) { - SecretCallbackHandler secretCallbackHandler = secretCallbackHandlerService.getSecretCallbackHandler(); - SharedSecretCallbackHandlerCache.getInstance().setSecretCallbackHandler(secretCallbackHandler); -}</pre> -Then you have to specify <strong>secretProvider</strong> in the configuration +<pre> if (secretCallbackHandlerService != null) { + SecretCallbackHandler secretCallbackHandler = secretCallbackHandlerService.getSecretCallbackHandler(); + SharedSecretCallbackHandlerCache.getInstance().setSecretCallbackHandler(secretCallbackHandler); + }</pre> +<p>Then you have to specify <strong>secretProvider</strong> in the configuration as <strong>org.apache.synapse.commons.security.secret.handler.SharedSecretCallbackHandler</strong>. This is another <strong>SecretCallbackHandler</strong> that uses the handler @@ -325,13 +311,8 @@ be used </li> </ul> -<p></p> - <p>An example </p> -<p></p> - -<p><pre>ciphertool.bat -source testpass -keystore resources/security/client-truststore.jks -storepass wso2carbon -alias wo2carbon -outencode base64 -trusted</pre> -</p> +<pre>ciphertool.bat -source testpass -keystore resources/security/client-truststore.jks -storepass wso2carbon -alias wo2carbon -outencode base64 -trusted</pre> </body> </html> _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
