Class KeyStoreServiceImpl

java.lang.Object
org.openremote.manager.security.KeyStoreServiceImpl
All Implemented Interfaces:
org.openremote.model.ContainerService, org.openremote.model.security.KeyStoreService

public class KeyStoreServiceImpl extends Object implements org.openremote.model.security.KeyStoreService

This service is used for retrieving, creating, or editing KeyStore (and TrustStore) files.

Currently the KeyStores are stored in the Storage directory of OpenRemote, which is usually volumed and persisted.

Each realm is allocated 2 KeyStores; A Client KeyStore, which is used for storing key-pairs that are used by clients (be that as an Agent or as a plain client), and a TrustStore, which contains trusted certificates, usually SSL certificates. To ensure both security and extensibility, both the default and predefined TrustStores are used to find the correct certificates.

  • Field Details

    • persistenceService

      protected org.openremote.container.persistence.PersistenceService persistenceService
    • identityService

      protected ManagerIdentityService identityService
    • keyStorePath

      protected Path keyStorePath
    • trustStorePath

      protected Path trustStorePath
  • Constructor Details

    • KeyStoreServiceImpl

      public KeyStoreServiceImpl()
  • Method Details

    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface org.openremote.model.ContainerService
    • init

      public void init(org.openremote.model.Container container) throws Exception
      Specified by:
      init in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • start

      public void start(org.openremote.model.Container container) throws Exception
      Specified by:
      start in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • getKeyManagerFactory

      public KeyManagerFactory getKeyManagerFactory(String alias) throws Exception
      Specified by:
      getKeyManagerFactory in interface org.openremote.model.security.KeyStoreService
      Throws:
      Exception
    • getTrustManagerFactory

      public TrustManagerFactory getTrustManagerFactory() throws Exception
      Specified by:
      getTrustManagerFactory in interface org.openremote.model.security.KeyStoreService
      Throws:
      Exception
    • createKeyStore

      protected KeyStore createKeyStore(Path path) throws Exception
      Throws:
      Exception
    • stop

      public void stop(org.openremote.model.Container container) throws Exception
      Specified by:
      stop in interface org.openremote.model.ContainerService
      Throws:
      Exception