org.glite.voms
Class VOMSAttribute
java.lang.Object
org.glite.voms.VOMSAttribute
public class VOMSAttribute
extends java.lang.Object
Representation of the authorization information (VO, server address
and list of Fully Qualified Attribute Names, or FQANs) contained in
a VOMS attribute certificate.
VOMSAttribute(AttributeCertificate ac) - Parses the contents of an attribute certificate.
NOTE: Cryptographic signatures, time stamps etc.
|
AttributeCertificate | getAC() - Direct access to the Attribute Certificate is going to
be removed.
|
ACCerts | getCertList() - Gets the certificates that signed the AC, if the ACCerts extension
is present.
|
FullAttributes | getFullAttributes() - Gets a copy of the Generic Attributes extension.
|
List | getFullyQualifiedAttributes()
|
String | getHolder() - Returns an String representation of the AC holder.
|
String | getHolderX509() - Returns an OpenSSL-style representation of the AC holder.
|
String | getHost() - Returns the hostName of the issuing VOMS server.
|
String | getHostPort() - Returns the address of the issuing VOMS server, on the form
<host>:<port>
|
String | getIssuer() - Returns an OpenSSL-style representation of the AC issuer.
|
String | getIssuerX509() - Returns an OpenSSL-style representation of the AC issuer.
|
List | getListOfFQAN()
|
Date | getNotAfter() - Returns the end date of the AC validity.
|
Date | getNotBefore() - Return the start date of the AC validity.
|
int | getPort() - Returns the port on which the issuing VOMS server is listening
|
String | getSerial() - Returns the serial number of the AC.
|
byte[] | getSignature() - Returns the signature of the AC.
|
ACTargets | getTargets() - Gets the targets of this AC.
|
String | getVO() - Returns the VO name
|
boolean | isHolder(X509Certificate cert) - Checks the given X509 certificate to see if it is the holder of the AC.
|
boolean | isIssuer(X509Certificate cert) - Checks the given X509 certificate to see if it is the issuer of the AC.
|
boolean | isValid() - Checks if the Attribute is valid.
|
String | toString() - Gets a (brief) string representation of this attribute.
|
boolean | validAt(Date date) - Checks if the AC was valid at the provided timestamp.
|
VOMSAttribute
public VOMSAttribute(AttributeCertificate ac)
Parses the contents of an attribute certificate.
NOTE: Cryptographic signatures, time stamps etc. will not be checked.
ac
- the attribute certificate to parse for VOMS attributes
getAC
public AttributeCertificate getAC()
Direct access to the Attribute Certificate is going to
be removed. Use the getXXX methods in this same classe
instead.
- The AttributeCertificate containing the VOMS information
getCertList
public ACCerts getCertList()
Gets the certificates that signed the AC, if the ACCerts extension
is present.
- the ACCerts extension, or null if it is not present.
getFullAttributes
public FullAttributes getFullAttributes()
Gets a copy of the Generic Attributes extension.
- the attributes, or null if they are not present.
getFullyQualifiedAttributes
public List getFullyQualifiedAttributes()
- List of String of the VOMS fully qualified
attributes names (FQANs):
vo[/group[/group2...]][/Role=[role]][/Capability=capability]
getHolder
public String getHolder()
Returns an String representation of the AC holder.
getHolderX509
public String getHolderX509()
Returns an OpenSSL-style representation of the AC holder.
getHost
public String getHost()
Returns the hostName of the issuing VOMS server.
getHostPort
public String getHostPort()
Returns the address of the issuing VOMS server, on the form <host>:<port>
getIssuer
public String getIssuer()
Returns an OpenSSL-style representation of the AC issuer.
getIssuerX509
public String getIssuerX509()
Returns an OpenSSL-style representation of the AC issuer.
getListOfFQAN
public List getListOfFQAN()
- List of FQAN of the VOMS fully qualified
attributes names (FQANs)
getNotAfter
public Date getNotAfter()
throws ParseException
Returns the end date of the AC validity.
getNotBefore
public Date getNotBefore()
throws ParseException
Return the start date of the AC validity.
getPort
public int getPort()
Returns the port on which the issuing VOMS server is listening
- the port, or -1 if the informations could not be found.
getSerial
public String getSerial()
Returns the serial number of the AC.
- the serial number of the AC.
getSignature
public byte[] getSignature()
Returns the signature of the AC.
- the byte representation of the AC signature.
getTargets
public ACTargets getTargets()
Gets the targets of this AC.
- the ACTargets extension if present, or null otherwise.
getVO
public String getVO()
Returns the VO name
isHolder
public boolean isHolder(X509Certificate cert)
Checks the given X509 certificate to see if it is the holder of the AC.
cert
- the X509 certificate to check.
- true if the give certificate is the holder of the AC.
isIssuer
public boolean isIssuer(X509Certificate cert)
Checks the given X509 certificate to see if it is the issuer of the AC.
cert
- the X509 certificate to check.
- true if the give certificate is the issuer of the AC.
isValid
public boolean isValid()
Checks if the Attribute is valid. Only checks start and end of
validity.
- true if is valid, false otherwise.
toString
public String toString()
Gets a (brief) string representation of this attribute.
validAt
public boolean validAt(Date date)
Checks if the AC was valid at the provided timestamp.
date
- if null
, current time is used
- true if the AC was valid at the time in question.