concept certificate in category osgi

appears as: certificate, certificates, A certificate, certificates
OSGi in Action: Creating Modular Applications in Java

This is an excerpt from Manning's book OSGi in Action: Creating Modular Applications in Java.

The key concept of an OBR repository is a generic description of a resource and its dependencies. A resource is an abstract entity used to represent any type of artifact such as a bundle, a certificate, or a configuration file. The resource description allows an agent to discover applicable artifacts, typically bundles, and deploy them along with their transitive dependencies. Each resource description has

  • It’s inherently tricky to establish meaningful identity of third-party software providers. It’s often necessary to differentiate between providers or types of providers to properly grant or deny permissions. Often the origin of the software artifact (where it came from) is used for this purpose, but techniques like digital signatures are also needed to ensure that the software hasn’t been tampered with. Digital signatures introduce the complicated process of creating and maintaining certificates and trust between certificates, which can be onerous for both users and developers.
  • 14.5.2. Creating certificates and signing bundles

    You’ll be using digital signing based on public key cryptography, which involves a public key and a private key. The public key is shared with the world in the form of a certificate. The private key is kept secret and used to sign data by performing a computation over it. The resulting value can be verified by performing another calculation over the data using the public key. This verifies that the signer has access to the private key and that the data hasn’t been modified.

    To implement the desired security policy for this scenario, you need to create two root certificates for the core and third-party domains. These root certificates will be used by the framework to establish a chain of trust for the two domains. With these two certificates, you can then sign certificates of core and third-party providers with the appropriate certificate. When they use their individual certificates to sign bundles they’ve created, the framework can use the root certificates to establish a chain of trust and determine to which domain a bundle belongs.

    The details of all this are based on Java 2 JAR file signing, which means the same tools you use to sign JAR files can be used for OSGi. To create the needed certificates and their associated public and private keys, you’ll use the keytool command provided by the JDK. It can create and manage certificates and keys inside a keystore, which is an encrypted file defined by Java for this purpose. For this scenario, you use key-tool to create two certificates and their associated public/private keys for the core and third-party domains like this:

    keytool -genkey -keystore keys.ks -alias core -storepass foobar  \
      -keypass barbaz -dname "CN=core,O=baz,C=de"
    keytool -genkey -keystore keys.ks -alias third-party \
      -storepass foobar -keypass barbaz -dname "CN=third-party,O=baz,C=de"

    This creates a keystore called keys.ks containing two new key pairs and a certificate for each pair with aliases of core and third-party. The keystore is protected by the password foobar, and the keys themselves have the password barbaz. The -dname switch allows you to specify the distinguished name you use to identify yourself, which in this case is the baz organization in Germany (de).