Class SingleKeyManagementServiceFactory

  • All Implemented Interfaces:
    com.github.ambry.router.KeyManagementServiceFactory<javax.crypto.spec.SecretKeySpec>

    public class SingleKeyManagementServiceFactory
    extends java.lang.Object
    implements com.github.ambry.router.KeyManagementServiceFactory<javax.crypto.spec.SecretKeySpec>
    SingleKeyManagementServiceFactory specific implementation of KeyManagementServiceFactory.

    Sets up all the supporting cast required for the operation of SingleKeyManagementService and returns a new instance on getKeyManagementService(). The default key that the SingleKeyManagementService returns for any KeyManagementService.getKey(short, short) is fetched from config "kms.default.container.key" which has to be hex string.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.github.ambry.router.KeyManagementService<javax.crypto.spec.SecretKeySpec> getKeyManagementService()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SingleKeyManagementServiceFactory

        public SingleKeyManagementServiceFactory​(com.github.ambry.config.VerifiableProperties verifiableProperties,
                                                 java.lang.String clusterName,
                                                 com.codahale.metrics.MetricRegistry registry)
        Parameters:
        verifiableProperties - VerifiableProperties to load configs from
        clusterName - Cluster name for which KeyManagementService is requested for
        registry - MetricRegistry to use
    • Method Detail

      • getKeyManagementService

        public com.github.ambry.router.KeyManagementService<javax.crypto.spec.SecretKeySpec> getKeyManagementService()
                                                                                                              throws java.security.GeneralSecurityException
        Specified by:
        getKeyManagementService in interface com.github.ambry.router.KeyManagementServiceFactory<javax.crypto.spec.SecretKeySpec>
        Throws:
        java.security.GeneralSecurityException