Class ConfiguredDosetaKeyRepository
- java.lang.Object
-
- org.jboss.resteasy.security.doseta.ConfiguredDosetaKeyRepository
-
- All Implemented Interfaces:
KeyRepository
public class ConfiguredDosetaKeyRepository extends Object implements KeyRepository
For use when you want repository created via a context object, i.e., when defined within a WAR file.For WAR files, it will look in context parameters and servlet/filter init params for doseta variables.
Private keys are stored in a java keystore. Public keys may be stored in either a java keystore or discovered via DNS.
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description protected DosetaKeyRepository
keyRepository
static String
RESTEASY_DOSETA_CACHE_TIMEOUT
Public keys are cached.static String
RESTEASY_DOSETA_DEFAULT_PRIVATE_DOMAIN
Context parameter.static String
RESTEASY_DOSETA_DNS_URI
Context parameter.static String
RESTEASY_DOSETA_PRINCIPAL_FOR_PRIVATE
true|false.static String
RESTEASY_DOSETA_USE_DNS
Context parameter.static String
RESTEASY_KEY_STORE_CLASSPATH
Context parameter.static String
RESTEASY_KEY_STORE_FILE_NAME
Context parameter.static String
RESTEASY_KEY_STORE_PASSWORD
Context parameter.
-
Constructor Summary
Constructors Constructor Description ConfiguredDosetaKeyRepository(ResteasyConfiguration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrivateKey
findPrivateKey(DKIMSignature header)
PublicKey
findPublicKey(DKIMSignature header)
String
getDefaultPrivateDomain()
What should be the default domain to use when creating signature headerString
getDefaultPrivateSelector()
What should be the default selector to use when creating signature header
-
-
-
Field Detail
-
RESTEASY_KEY_STORE_FILE_NAME
public static String RESTEASY_KEY_STORE_FILE_NAME
Context parameter.Hardcoded file path to your keystore
-
RESTEASY_KEY_STORE_CLASSPATH
public static String RESTEASY_KEY_STORE_CLASSPATH
Context parameter.Find the java keystore by searching the classpath. This points to a file on the classpath
-
RESTEASY_KEY_STORE_PASSWORD
public static String RESTEASY_KEY_STORE_PASSWORD
Context parameter.Password of the java keystore.
-
RESTEASY_DOSETA_USE_DNS
public static String RESTEASY_DOSETA_USE_DNS
Context parameter.true|false. Whether or not to use DNS to discover public keys. By default looks in keystore
-
RESTEASY_DOSETA_DNS_URI
public static String RESTEASY_DOSETA_DNS_URI
Context parameter.If you need to retrieve from a specific DNS server specify the url
dns://hostname:port
-
RESTEASY_DOSETA_DEFAULT_PRIVATE_DOMAIN
public static String RESTEASY_DOSETA_DEFAULT_PRIVATE_DOMAIN
Context parameter.When signing, if no domain is specified, use this domain.
-
RESTEASY_DOSETA_CACHE_TIMEOUT
public static String RESTEASY_DOSETA_CACHE_TIMEOUT
Public keys are cached. Specify a timeout for these keys.
-
RESTEASY_DOSETA_PRINCIPAL_FOR_PRIVATE
public static String RESTEASY_DOSETA_PRINCIPAL_FOR_PRIVATE
true|false. When signing, if no selector is specified, use the user principal as the selector value.
-
keyRepository
protected DosetaKeyRepository keyRepository
-
-
Constructor Detail
-
ConfiguredDosetaKeyRepository
public ConfiguredDosetaKeyRepository(@Context ResteasyConfiguration config)
-
-
Method Detail
-
findPrivateKey
public PrivateKey findPrivateKey(DKIMSignature header)
- Specified by:
findPrivateKey
in interfaceKeyRepository
-
findPublicKey
public PublicKey findPublicKey(DKIMSignature header)
- Specified by:
findPublicKey
in interfaceKeyRepository
-
getDefaultPrivateSelector
public String getDefaultPrivateSelector()
Description copied from interface:KeyRepository
What should be the default selector to use when creating signature header- Specified by:
getDefaultPrivateSelector
in interfaceKeyRepository
- Returns:
- null if none
-
getDefaultPrivateDomain
public String getDefaultPrivateDomain()
Description copied from interface:KeyRepository
What should be the default domain to use when creating signature header- Specified by:
getDefaultPrivateDomain
in interfaceKeyRepository
- Returns:
- null if none
-
-