Package com.github.ambry.frontend
Class AmbryIdSigningService
- java.lang.Object
-
- com.github.ambry.frontend.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 anIdSigningService
.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.
-
-
Constructor Summary
Constructors Constructor Description AmbryIdSigningService()
-
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)
-
-
-
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 interfacecom.github.ambry.frontend.IdSigningService
- Throws:
com.github.ambry.rest.RestServiceException
-
isIdSigned
public boolean isIdSigned(java.lang.String id)
- Specified by:
isIdSigned
in interfacecom.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 interfacecom.github.ambry.frontend.IdSigningService
- Throws:
com.github.ambry.rest.RestServiceException
-
-