public class BlobCrypterSecurityTokenCodec extends Object implements SecurityTokenCodec
dd if=/dev/random bs=32 count=1 | openssl base64 > /tmp/key.txt
Wire format is "<container>:<encrypted-and-signed-token>"| Modifier and Type | Field and Description |
|---|---|
protected Map<String,BlobCrypter> |
crypters
Keys are container ids, values are crypters
|
protected Map<String,String> |
domains
Keys are container ids, values are domains used for signed fetch.
|
static String |
SECURITY_TOKEN_KEY_FILE |
static String |
SIGNED_FETCH_DOMAIN |
ACTIVE_URL_NAME, SECURITY_TOKEN_NAME| Constructor and Description |
|---|
BlobCrypterSecurityTokenCodec(ContainerConfig config) |
| Modifier and Type | Method and Description |
|---|---|
SecurityToken |
createToken(Map<String,String> tokenParameters)
Decrypt and verify the provided security token.
|
String |
encodeToken(SecurityToken token) |
protected BlobCrypter |
loadCrypterFromFile(File file)
Load a BlobCrypter from the specified file.
|
public static final String SECURITY_TOKEN_KEY_FILE
public static final String SIGNED_FETCH_DOMAIN
protected final Map<String,BlobCrypter> crypters
@Inject public BlobCrypterSecurityTokenCodec(ContainerConfig config)
protected BlobCrypter loadCrypterFromFile(File file) throws IOException
IOExceptionpublic SecurityToken createToken(Map<String,String> tokenParameters) throws SecurityTokenException
createToken in interface SecurityTokenCodectokenParameters - Map containing a entry 'token' in wire format (probably encrypted.)SecurityTokenException - If tokenString is not a valid tokenpublic String encodeToken(SecurityToken token) throws SecurityTokenException
encodeToken in interface SecurityTokenCodecSecurityTokenExceptionCopyright © 2007-2012. All Rights Reserved.