@RefreshScope @Component(value="resourceCrlRevocationChecker") public class ResourceCRLRevocationChecker extends AbstractCRLRevocationChecker
X509CredentialsAuthenticationHandler.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_REFRESH_INTERVAL
Default refresh interval is 1 hour.
|
checkAll, logger| Constructor and Description |
|---|
ResourceCRLRevocationChecker(CRLFetcher fetcher,
org.springframework.core.io.Resource[] crls)
Instantiates a new Resource cRL revocation checker.
|
ResourceCRLRevocationChecker(org.springframework.core.io.Resource crl)
Creates a new instance using the specified resource for CRL data.
|
ResourceCRLRevocationChecker(org.springframework.core.io.Resource[] crls)
Creates a new instance using the specified resources for CRL data.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addCRL(java.lang.Object issuer,
java.security.cert.X509CRL crl)
Records the addition of a new CRL entry.
|
protected java.util.Collection<java.security.cert.X509CRL> |
getCRLs(java.security.cert.X509Certificate cert)
Gets the collection of CRLs for the given certificate.
|
protected CRLFetcher |
getFetcher() |
protected java.util.Set<org.springframework.core.io.Resource> |
getResources() |
void |
init()
Initializes the process that periodically fetches CRL data.
|
void |
setExpiredCRLPolicy(RevocationPolicy policy)
Sets the policy to apply when CRL data is expired.
|
void |
setRefreshInterval(int seconds)
Sets the interval at which CRL data should be reloaded from CRL resources.
|
void |
setUnavailableCRLPolicy(RevocationPolicy policy)
Sets the policy to apply when CRL data is unavailable.
|
void |
shutdown()
Shutdown scheduler.
|
check, getCRL, getExpiredCRLPolicy, getUnavailableCRLPolicy, setCheckAllpublic static final int DEFAULT_REFRESH_INTERVAL
public ResourceCRLRevocationChecker(org.springframework.core.io.Resource crl)
crl - Resource containing CRL data. MUST NOT be null.public ResourceCRLRevocationChecker(org.springframework.core.io.Resource[] crls)
crls - Resources containing CRL data. MUST NOT be null and MUST have
at least one non-null element.public ResourceCRLRevocationChecker(CRLFetcher fetcher, org.springframework.core.io.Resource[] crls)
fetcher - the fetchercrls - the crls@Autowired
public void setRefreshInterval(@Min(value=1L) @Value(value="${cas.x509.authn.crl.refresh.interval:3600}")
int seconds)
seconds - Refresh interval in seconds; MUST be positive integer.@PostConstruct public void init()
init in class AbstractCRLRevocationCheckerprotected CRLFetcher getFetcher()
protected java.util.Set<org.springframework.core.io.Resource> getResources()
protected boolean addCRL(java.lang.Object issuer,
java.security.cert.X509CRL crl)
AbstractCRLRevocationCheckeraddCRL in class AbstractCRLRevocationCheckerissuer - the id of the entry to keep track ofcrl - new CRL entryprotected java.util.Collection<java.security.cert.X509CRL> getCRLs(java.security.cert.X509Certificate cert)
AbstractCRLRevocationCheckergetCRLs in class AbstractCRLRevocationCheckercert - Certificate for which the CRL of the issuing CA should be retrieved.@PreDestroy public void shutdown()
@Autowired(required=false)
public void setUnavailableCRLPolicy(@Qualifier(value="x509ResourceUnavailableRevocationPolicy")
RevocationPolicy policy)
AbstractCRLRevocationCheckersetUnavailableCRLPolicy in class AbstractCRLRevocationCheckerpolicy - Revocation policy.@Autowired(required=false)
public void setExpiredCRLPolicy(@Qualifier(value="x509ResourceExpiredRevocationPolicy")
RevocationPolicy policy)
AbstractCRLRevocationCheckersetExpiredCRLPolicy in class AbstractCRLRevocationCheckerpolicy - Revocation policy.