Connection Profiles Store Cipher Provider

Identifier:
org.eclipse.datatools.connectivity.cipherProvider

Since:
1.2.4 (DTP 1.9.2)

Description:
This cipherProvider extension point allows a client to extend the connection profile store encryption framework with a custom provider of javax.crypto.Cipher instances.

Configuration Markup:

<!ELEMENT extension (cipherProvider+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT cipherProvider EMPTY>

<!ATTLIST cipherProvider

fileExtension CDATA #REQUIRED

class         CDATA #REQUIRED

>

Defines the file extension and its corresponding provider of javax.crypto.Cipher instances for the encryption of connection profile store files.



Examples:

     <extension
           id="org.company.connectivity.security.cipherProvider"
           point="org.eclipse.datatools.connectivity.cipherProvider">
        <cipherProvider
              fileExtension="profile"
              class="org.company.connectivity.security.ProfileStoreCipherProvider">
        </cipherProvider>
        <cipherProvider
              fileExtension="default"
              class="org.company.connectivity.security.ProfileStoreCipherProvider">
        </cipherProvider>
     </extension>
This example registers org.company.connectivity.security.ProfileStoreCipherProvider as the provider for files with the extension ".profile" and for those with no file extension.

Sample class implementation of the org.eclipse.datatools.connectivity.security.ICipherProvider interface:

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();
    }
}

API Information:
[Provisional] An extension must implement the ICipherProvider interface defined in the org.eclipse.datatools.connectivity.security package. See the package's JavaDoc documentation for more information.

Supplied Implementation:
org.eclipse.datatools.connectivity.security.CipherProviderBase is the base class implementation of the org.eclipse.datatools.connectivity.security.ICipherProvider interface. It uses a default bundled encryption key as its javax.crypto.spec.SecretKeySpec.


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 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-2.0/ .