blob: 73740f4b3dd6f3f6292d5b8e071cc18c360a302e [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Connection Profiles Store Cipher Provider</title>
<style type="text/css">@import url("file:/D:/dev/eclipse_platform/eclipse_37/plugins/org.eclipse.sdk_3.7.0.v201106131736/book.css");</style>
<style type="text/css">@import url("file:/D:/dev/eclipse_platform/eclipse_37/configuration/org.eclipse.osgi/bundles/624/1/.cp/schema.css");</style>
</HEAD>
<BODY>
<H1 style="text-align:center">Connection Profiles Store Cipher Provider</H1>
<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.datatools.connectivity.cipherProvider<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>1.2.4 (DTP 1.9.2)
<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>This cipherProvider extension point allows a client to extend the connection profile store encryption framework with a custom provider of <i>javax.crypto.Cipher</i> instances.<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
<p></p>
<p class="code SchemaDtd">&lt;!ELEMENT <a name="e.extension">extension</a> (<a href="#e.cipherProvider">cipherProvider</a>+)&gt;</p>
<p class="code SchemaDtd">&lt;!ATTLIST extension</p>
<p class="code SchemaDtdAttlist">point&nbsp;CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name&nbsp;&nbsp;CDATA #IMPLIED</p>&gt;</p>
<p></p>
<ul class="ConfigMarkupAttlistDesc">
</ul>
<br><p class="code SchemaDtd">&lt;!ELEMENT <a name="e.cipherProvider">cipherProvider</a> EMPTY&gt;</p>
<p class="code SchemaDtd">&lt;!ATTLIST cipherProvider</p>
<p class="code SchemaDtdAttlist">fileExtension&nbsp;CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</p>&gt;</p>
<p></p>
<p class="ConfigMarkupElementDesc">
Defines the file extension and its corresponding provider of <i>javax.crypto.Cipher</i> instances for the encryption of connection profile store files.</p>
<br>
<ul class="ConfigMarkupAttlistDesc">
<li><b>fileExtension</b> - The file extension of connection profile store files that shall be encrypted and decrypted using the cipher provider class specified in the <i>class</i> attribute.
<br>This attribute value may include an optional dot before the file extension (e.g. "profiles" or ".profiles"). The keyword "default" may be specified as the attribute value to match files with no file extension.
<br>The default connection profile store files that persists in the workspace use the ".dat" and ".bak" file extensions. Adopters may need to handle potential conflict with the default encryption implementation, if implementing a cipherProvider extension for files with these file extensions.</li>
<li><b>class</b> - The concrete class that implements the <code>org.eclipse.datatools.connectivity.security.ICipherProvider</code> interface to provide the <i>javax.crypto.Cipher</i> instances for the encryption and decryption of connection profile store files.
<br>A custom class may optionally extend the <code>org.eclipse.datatools.connectivity.security.CipherProviderBase</code> base class implementation, which reads a secret (symmetric) key specification from a bundled resource.</li>
</ul>
<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6><code><pre class="Example"><span class="code SchemaTag">
&lt;extension
id=</span><span class="code SchemaCstring">&quot;org.company.connectivity.security.cipherProvider&quot;</span><span class="code SchemaTag">
point=</span><span class="code SchemaCstring">&quot;org.eclipse.datatools.connectivity.cipherProvider&quot;</span><span class="code SchemaTag">&gt;
&lt;cipherProvider
fileExtension=</span><span class="code SchemaCstring">&quot;profile&quot;</span><span class="code SchemaTag">
class=</span><span class="code SchemaCstring">&quot;org.company.connectivity.security.ProfileStoreCipherProvider&quot;</span><span class="code SchemaTag">&gt;
&lt;/cipherProvider&gt;
&lt;cipherProvider
fileExtension=</span><span class="code SchemaCstring">&quot;default&quot;</span><span class="code SchemaTag">
class=</span><span class="code SchemaCstring">&quot;org.company.connectivity.security.ProfileStoreCipherProvider&quot;</span><span class="code SchemaTag">&gt;
&lt;/cipherProvider&gt;
&lt;/extension&gt;
</span></pre></code>
This example registers org.company.connectivity.security.ProfileStoreCipherProvider as the provider for files with the extension ".profile" and for those with no file extension.
<br><br>
Sample class implementation of the org.eclipse.datatools.connectivity.security.ICipherProvider interface:
<code><pre class="Example"><span class="code SchemaTag">
import org.eclipse.core.runtime.Platform;
import org.eclipse.datatools.connectivity.security.CipherProviderBase;
import org.eclipse.datatools.connectivity.security.ICipherProvider;
import org.osgi.framework.Bundle;
public class ProfileStoreCipherProvider extends CipherProviderBase
implements ICipherProvider
{
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.security.CipherProviderBase#getKeyResource()
*/
@Override
protected URL getKeyResource()
{
Bundle bundle = Platform.getBundle( "org.company.connectivity.security" );
return bundle != null ?
bundle.getResource( "cpkey" ) : //$NON-NLS-1$
super.getKeyResource();
}
}
</span></pre></code>
<p></p>
<h6 class="CaptionFigColumn SchemaHeader">API Information: </h6>[Provisional] An extension must implement the ICipherProvider interface defined in the <code>org.eclipse.datatools.connectivity.security</code> package. See the package's JavaDoc documentation for more information.
<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6><code>org.eclipse.datatools.connectivity.security.CipherProviderBase</code> is the base class implementation of the <code>org.eclipse.datatools.connectivity.security.ICipherProvider</code> interface. It uses a default bundled encryption key as its <i>javax.crypto.spec.SecretKeySpec</i>.
<p></p>
<br>
<p class="note SchemaCopyright">
Copyright (c) 2011 Actuate Corporation.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html .
</p>
</BODY>
</HTML>