Class AmbryIdSigningService

  • All Implemented Interfaces:
    com.github.ambry.frontend.IdSigningService

    public class AmbryIdSigningService
    extends java.lang.Object
    implements com.github.ambry.frontend.IdSigningService
    Reference implementation for an IdSigningService.

    Warning: This implementation is not secure or tamper-proof, since it does not actually sign the data that it is passed. A secure implementation would either need to use an authenticated encryption scheme or attach a signature.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getSignedId​(java.lang.String blobId, java.util.Map<java.lang.String,​java.lang.String> metadata)  
      boolean isIdSigned​(java.lang.String id)  
      com.github.ambry.utils.Pair<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> parseSignedId​(java.lang.String signedId)  
      • Methods inherited from class java.lang.Object

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

      • AmbryIdSigningService

        public AmbryIdSigningService()
    • Method Detail

      • getSignedId

        public java.lang.String getSignedId​(java.lang.String blobId,
                                            java.util.Map<java.lang.String,​java.lang.String> metadata)
                                     throws com.github.ambry.rest.RestServiceException
        Specified by:
        getSignedId in interface com.github.ambry.frontend.IdSigningService
        Throws:
        com.github.ambry.rest.RestServiceException
      • isIdSigned

        public boolean isIdSigned​(java.lang.String id)
        Specified by:
        isIdSigned in interface com.github.ambry.frontend.IdSigningService
      • parseSignedId

        public com.github.ambry.utils.Pair<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> parseSignedId​(java.lang.String signedId)
                                                                                                                                 throws com.github.ambry.rest.RestServiceException
        Specified by:
        parseSignedId in interface com.github.ambry.frontend.IdSigningService
        Throws:
        com.github.ambry.rest.RestServiceException