Package org.italiangrid.voms.ac.impl
Class VOMSAttributesImpl
- java.lang.Object
-
- org.italiangrid.voms.ac.impl.VOMSAttributesImpl
-
- All Implemented Interfaces:
VOMSAttribute
public class VOMSAttributesImpl extends java.lang.Object implements VOMSAttribute
The default implementation for voms attributes
-
-
Field Summary
Fields Modifier and Type Field Description private java.security.cert.X509Certificate[]aaCertsprivate java.util.List<java.lang.String>acTargetsstatic intDEFAULT_CLOCK_SKEW_IN_MINUTESprivate java.util.List<java.lang.String>FQANsprivate java.util.List<VOMSGenericAttribute>genericAttributesprivate javax.security.auth.x500.X500Principalholderprivate java.math.BigIntegerholderSerialNumberprivate java.lang.Stringhostprivate javax.security.auth.x500.X500Principalissuerprivate java.util.DatenotAfterprivate java.util.DatenotBeforeprivate intportprivate byte[]signatureprivate java.lang.StringVOprivate org.bouncycastle.cert.X509AttributeCertificateHolderVOMSAC
-
Constructor Summary
Constructors Constructor Description VOMSAttributesImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.security.cert.X509Certificate[]getAACertificates()This method returns the certificate chain of the VOMS Attribute Authority (AA) that signed thisVOMSAttribute.java.util.List<java.lang.String>getFQANs()This method returns the list of signed Fully Qualified Attribute Names (FQANs) in thisVOMSAttribute.java.util.List<VOMSGenericAttribute>getGenericAttributes()This method returns the list of VOMS Generic attributes in thisVOMSAttribute.javax.security.auth.x500.X500PrincipalgetHolder()This method returns the subject (as anX500Principal) of the holder of these VOMS attributesjava.math.BigIntegergetHolderSerialNumber()This method returns the holder certificate serial numberjava.lang.StringgetHost()This method returns the host where the VOMS Attribute Authority (AA) that signed these attribute livesjavax.security.auth.x500.X500PrincipalgetIssuer()This method returns the subject of the VOMS Attribute Authority that signed these attributes.java.util.DategetNotAfter()This method returns the attributes' validity end timejava.util.DategetNotBefore()This method returns the attributes' validity start timeintgetPort()This method returns the port on which the VOMS Attribute Authority (AA) that signed these attributes listens for requests.java.lang.StringgetPrimaryFQAN()This method returns the primary FQAN (the first in the list returned byVOMSAttribute.getFQANs()) in thisVOMSAttribute.byte[]getSignature()This method returns the signature on the VOMS attribute certificate as a byte array.java.util.List<java.lang.String>getTargets()This method returns the list of targets defined for thisVOMSAttribute.java.lang.StringgetVO()This method returns the name of the VO this VOMS attributes are aboutorg.bouncycastle.cert.X509AttributeCertificateHoldergetVOMSAC()This method returns the underlying VOMS Attribute certificate object.booleanisValid()This method checks whether the attributes are valid in the current instant of time.voidsetAACertificates(java.security.cert.X509Certificate[] aaCerts)voidsetFQANs(java.util.List<java.lang.String> fQANs)voidsetGenericAttributes(java.util.List<VOMSGenericAttribute> genericAttributes)voidsetHolder(javax.security.auth.x500.X500Principal holder)voidsetHolderSerialNumber(java.math.BigInteger holderSerialNumber)voidsetHost(java.lang.String host)voidsetIssuer(javax.security.auth.x500.X500Principal issuer)voidsetNotAfter(java.util.Date notAfter)voidsetNotBefore(java.util.Date notBefore)voidsetPort(int port)voidsetSignature(byte[] signature)voidsetTargets(java.util.List<java.lang.String> targets)voidsetVO(java.lang.String vO)voidsetVOMSAC(org.bouncycastle.cert.X509AttributeCertificateHolder ac)java.lang.StringtoString()booleanvalidAt(java.util.Date date)This method checks whether the attributes are valid in a given time passed as argument.
-
-
-
Field Detail
-
DEFAULT_CLOCK_SKEW_IN_MINUTES
public static final int DEFAULT_CLOCK_SKEW_IN_MINUTES
- See Also:
- Constant Field Values
-
VO
private java.lang.String VO
-
host
private java.lang.String host
-
port
private int port
-
FQANs
private java.util.List<java.lang.String> FQANs
-
issuer
private javax.security.auth.x500.X500Principal issuer
-
holder
private javax.security.auth.x500.X500Principal holder
-
holderSerialNumber
private java.math.BigInteger holderSerialNumber
-
notAfter
private java.util.Date notAfter
-
notBefore
private java.util.Date notBefore
-
signature
private byte[] signature
-
genericAttributes
private java.util.List<VOMSGenericAttribute> genericAttributes
-
acTargets
private java.util.List<java.lang.String> acTargets
-
aaCerts
private java.security.cert.X509Certificate[] aaCerts
-
VOMSAC
private org.bouncycastle.cert.X509AttributeCertificateHolder VOMSAC
-
-
Method Detail
-
getIssuer
public javax.security.auth.x500.X500Principal getIssuer()
Description copied from interface:VOMSAttributeThis method returns the subject of the VOMS Attribute Authority that signed these attributes.- Specified by:
getIssuerin interfaceVOMSAttribute- Returns:
- The subject of the VOMS AA that signed these attributes
-
getPrimaryFQAN
public java.lang.String getPrimaryFQAN()
Description copied from interface:VOMSAttributeThis method returns the primary FQAN (the first in the list returned byVOMSAttribute.getFQANs()) in thisVOMSAttribute.- Specified by:
getPrimaryFQANin interfaceVOMSAttribute- Returns:
- The primary VOMS fully qualified attribute name
-
getVO
public java.lang.String getVO()
Description copied from interface:VOMSAttributeThis method returns the name of the VO this VOMS attributes are about- Specified by:
getVOin interfaceVOMSAttribute- Returns:
- The name of the VO this VOMS attributes are about
-
setIssuer
public void setIssuer(javax.security.auth.x500.X500Principal issuer)
-
setVO
public void setVO(java.lang.String vO)
-
getFQANs
public java.util.List<java.lang.String> getFQANs()
Description copied from interface:VOMSAttributeThis method returns the list of signed Fully Qualified Attribute Names (FQANs) in thisVOMSAttribute.- Specified by:
getFQANsin interfaceVOMSAttribute- Returns:
- The
Listof VOMS fully qualified attribute names
-
setFQANs
public void setFQANs(java.util.List<java.lang.String> fQANs)
-
getHost
public java.lang.String getHost()
Description copied from interface:VOMSAttributeThis method returns the host where the VOMS Attribute Authority (AA) that signed these attribute lives- Specified by:
getHostin interfaceVOMSAttribute- Returns:
- The name of the host where the VOMS AA that signed these attributes lives
-
getPort
public int getPort()
Description copied from interface:VOMSAttributeThis method returns the port on which the VOMS Attribute Authority (AA) that signed these attributes listens for requests.- Specified by:
getPortin interfaceVOMSAttribute- Returns:
- The port on which the VOMS AA that signed these attributes listens for requests
-
getHolder
public javax.security.auth.x500.X500Principal getHolder()
Description copied from interface:VOMSAttributeThis method returns the subject (as anX500Principal) of the holder of these VOMS attributes- Specified by:
getHolderin interfaceVOMSAttribute- Returns:
- The subject of the holder of these VOMS attributes
-
getNotBefore
public java.util.Date getNotBefore()
Description copied from interface:VOMSAttributeThis method returns the attributes' validity start time- Specified by:
getNotBeforein interfaceVOMSAttribute- Returns:
- The attributes' validity start time
-
getNotAfter
public java.util.Date getNotAfter()
Description copied from interface:VOMSAttributeThis method returns the attributes' validity end time- Specified by:
getNotAfterin interfaceVOMSAttribute- Returns:
- The attributes' validity end time
-
getSignature
public byte[] getSignature()
Description copied from interface:VOMSAttributeThis method returns the signature on the VOMS attribute certificate as a byte array.- Specified by:
getSignaturein interfaceVOMSAttribute- Returns:
- The signature of this VOMS attributes
-
setHost
public void setHost(java.lang.String host)
-
setPort
public void setPort(int port)
-
setHolder
public void setHolder(javax.security.auth.x500.X500Principal holder)
-
setNotAfter
public void setNotAfter(java.util.Date notAfter)
-
setNotBefore
public void setNotBefore(java.util.Date notBefore)
-
setSignature
public void setSignature(byte[] signature)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getGenericAttributes
public java.util.List<VOMSGenericAttribute> getGenericAttributes()
Description copied from interface:VOMSAttributeThis method returns the list of VOMS Generic attributes in thisVOMSAttribute.- Specified by:
getGenericAttributesin interfaceVOMSAttribute- Returns:
- The VOMS generic attributes
-
setGenericAttributes
public void setGenericAttributes(java.util.List<VOMSGenericAttribute> genericAttributes)
-
getTargets
public java.util.List<java.lang.String> getTargets()
Description copied from interface:VOMSAttributeThis method returns the list of targets defined for thisVOMSAttribute.- Specified by:
getTargetsin interfaceVOMSAttribute- Returns:
- The targets for this VOMS attributes
-
setTargets
public void setTargets(java.util.List<java.lang.String> targets)
-
getAACertificates
public java.security.cert.X509Certificate[] getAACertificates()
Description copied from interface:VOMSAttributeThis method returns the certificate chain of the VOMS Attribute Authority (AA) that signed thisVOMSAttribute.- Specified by:
getAACertificatesin interfaceVOMSAttribute- Returns:
- The VOMS AA certificate chain
-
setAACertificates
public void setAACertificates(java.security.cert.X509Certificate[] aaCerts)
-
isValid
public boolean isValid()
Description copied from interface:VOMSAttributeThis method checks whether the attributes are valid in the current instant of time. No validation is performed on the attributes.- Specified by:
isValidin interfaceVOMSAttribute- Returns:
trueif valid,falseotherwise
-
validAt
public boolean validAt(java.util.Date date)
Description copied from interface:VOMSAttributeThis method checks whether the attributes are valid in a given time passed as argument. No validation is performed on the attributes.- Specified by:
validAtin interfaceVOMSAttribute- Parameters:
date- the time used for the validity check- Returns:
trueif valid,falseotherwise
-
getVOMSAC
public org.bouncycastle.cert.X509AttributeCertificateHolder getVOMSAC()
Description copied from interface:VOMSAttributeThis method returns the underlying VOMS Attribute certificate object.- Specified by:
getVOMSACin interfaceVOMSAttribute- Returns:
- the underlying bouncycastle object for the VOMS attribute certificate.
-
setVOMSAC
public void setVOMSAC(org.bouncycastle.cert.X509AttributeCertificateHolder ac)
-
getHolderSerialNumber
public java.math.BigInteger getHolderSerialNumber()
Description copied from interface:VOMSAttributeThis method returns the holder certificate serial number- Specified by:
getHolderSerialNumberin interfaceVOMSAttribute- Returns:
- The serial number of the holder certificate
-
setHolderSerialNumber
public void setHolderSerialNumber(java.math.BigInteger holderSerialNumber)
-
-