public class DefaultVOMSTrustStore extends Object implements VOMSTrustStore
DefaultUpdatingVOMSTrustStore.| Modifier and Type | Field and Description |
|---|---|
static String |
CERTIFICATE_FILENAME_SUFFIX
The filename suffix used to match certificates in the VOMS local trust
directories
|
static String |
DEFAULT_VOMS_DIR
The default directory where local VOMS trust information is rooted:
"/etc/grid-security/vomsdir"
|
protected Object |
listenerLock
A lock to guard the setting of the status listener
|
static String |
LSC_FILENAME_SUFFIX
The filename suffix used to match LSC files in the VOMS local trust
directories
|
protected Lock |
read
A reference to the read lock
|
protected ReadWriteLock |
rwLock
The read/write lock that implements thread safety for this store
|
protected Lock |
write
A reference to the write lock
|
| Constructor and Description |
|---|
DefaultVOMSTrustStore()
Default constructor.
|
DefaultVOMSTrustStore(List<String> localTrustDirs) |
DefaultVOMSTrustStore(List<String> localTrustDirs,
VOMSTrustStoreStatusListener listener) |
DefaultVOMSTrustStore(VOMSTrustStoreStatusListener listener) |
| Modifier and Type | Method and Description |
|---|---|
protected static List<String> |
buildDefaultTrustedDirs()
Builds a list of trusted directories containing only
DEFAULT_VOMS_DIR. |
X509Certificate |
getAACertificateBySubject(X500Principal aaCertSubject)
Returns the VOMS Attribute Authority certificate held in this
VOMSTrustStore whose subject matches the subject passed as
argument. |
Map<String,Set<LSCInfo>> |
getAllLSCInfo()
Returns all the LSC information held in this
VOMSTrustStore. |
List<X509Certificate> |
getLocalAACertificates()
Returns the list of VOMS Attribute Authority certificates held in this
VOMSTrustStore. |
List<String> |
getLocalTrustedDirectories()
Returns the locally trusted directories where VOMS trust information (being
VOMS server certificates or LSC files) are searched for.
|
LSCInfo |
getLSC(String voName,
String hostname)
Returns the LSC information held in this
VOMSTrustStore for the vo
and hostname passed as arguments. |
void |
loadTrustInformation()
Loads trust information from the sources configured for this trust store.
|
void |
setStatusListener(VOMSTrustStoreStatusListener statusListener)
Sets a
VOMSTrustStoreStatusListener that is notified of events
related to this VOMS trust store |
public static final String DEFAULT_VOMS_DIR
public static final String CERTIFICATE_FILENAME_SUFFIX
public static final String LSC_FILENAME_SUFFIX
protected final ReadWriteLock rwLock
protected final Lock read
protected final Lock write
protected final Object listenerLock
public DefaultVOMSTrustStore(List<String> localTrustDirs, VOMSTrustStoreStatusListener listener)
localTrustDirs - a non-null list of local trust directoriesIllegalArgumentException - when the list passed as argument is nullpublic DefaultVOMSTrustStore(VOMSTrustStoreStatusListener listener)
public DefaultVOMSTrustStore()
protected static List<String> buildDefaultTrustedDirs()
DEFAULT_VOMS_DIR.public List<String> getLocalTrustedDirectories()
VOMSTrustStoregetLocalTrustedDirectories in interface VOMSTrustStoreList of local pathspublic List<X509Certificate> getLocalAACertificates()
VOMSTrustStoreVOMSTrustStore.getLocalAACertificates in interface VOMSTrustStoreVOMSTrustStore, an empty list if no certificate was
found.public LSCInfo getLSC(String voName, String hostname)
VOMSTrustStoreVOMSTrustStore for the vo
and hostname passed as arguments.getLSC in interface VOMSTrustStorevoName - the name of the VO for which the LSC applieshostname - the name of the host for which the LSC appliesLSCInfo object, or null if no LSC matching the arguments
was foundpublic void loadTrustInformation()
VOMSTrustStoreloadTrustInformation in interface VOMSTrustStorepublic X509Certificate getAACertificateBySubject(X500Principal aaCertSubject)
VOMSTrustStoreVOMSTrustStore whose subject matches the subject passed as
argument.getAACertificateBySubject in interface VOMSTrustStoreaaCertSubject - a certificate subjectX509Certificate that matches the subject passed
as argument or null if no matching certificate is found in this
storepublic Map<String,Set<LSCInfo>> getAllLSCInfo()
VOMSTrustStoreVOMSTrustStore. The
returned Map is keyed by VO name.getAllLSCInfo in interface VOMSTrustStoreLSCInfo objectspublic void setStatusListener(VOMSTrustStoreStatusListener statusListener)
VOMSTrustStoreVOMSTrustStoreStatusListener that is notified of events
related to this VOMS trust storesetStatusListener in interface VOMSTrustStorestatusListener - the status listener that will be notifiedCopyright © 2014. All rights reserved.