|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.xtreemos.system.eventmachine.stage.AbstractStage
eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage
eu.xtreemos.system.eventmachine.stage.Abstract2wayStage
eu.xtreemos.xosd.security.rca.client.RCAClient
public class RCAClient
The service implementing the Resource Certification Authority client.
This service runs on each node that is capable of providing services or
resources to Virtual Organisations (VO). The service is the node's
counterpart of the RCA server, providing a convenient way to store
and access the local machine certificates, gather information on the
resource (e.g. from the local
ResourceMonitor
service), and
it also generates new public/private key pair, the former of which it then
sends to the RCAServer
for signing.
Nested Class Summary | |
---|---|
class |
RCAClient.RCAClientStorage
|
Field Summary | |
---|---|
protected RCAClientProcessor |
clientProcessor
|
protected CRCAClientConfig |
config
|
protected int |
keyLength
|
(package private) static org.apache.log4j.Logger |
logger
|
protected ResourceDescriptorRecord |
myDescriptor
The resource descriptor of the client's node. |
Fields inherited from class eu.xtreemos.system.eventmachine.stage.Abstract2wayStage |
---|
context, counter, curContext, sink |
Fields inherited from class eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage |
---|
queue |
Fields inherited from class eu.xtreemos.system.eventmachine.stage.AbstractStage |
---|
handlerChain, handlerGroup, handlerThreads, name, running, serviceListeners |
Constructor Summary | |
---|---|
RCAClient()
|
Method Summary | |
---|---|
java.lang.Integer |
applyForRegistration()
Obtain or reuse own resource details, and send them to RCA derver for resource registration application. |
java.lang.Boolean |
createDummyCertificate(ResourceID dummyResId,
java.lang.String outputPath)
|
protected java.lang.String |
getAttributeCertVOPath()
|
protected java.lang.String |
getAttributes(java.security.cert.X509Certificate attribCert)
Describe the attributes in the attribute in a human-readable form. |
protected java.lang.String |
getAttributes(org.bouncycastle.x509.X509V2AttributeCertificate attribCert)
Describe the attributes in the attribute in a human-readable form. |
java.lang.String |
getHandledEventType()
|
RCASignedResponse |
getMachineAttributeCertificate(java.lang.String vo)
Retrieve the machine's attribute certificate. |
java.lang.String |
getMachineCertificateDetails()
Opens the certificate currently stored locally and signed by RCA, and returns a string containing the details on the certificate. |
java.security.cert.X509Certificate |
getMachineIdentityCertificate()
Retrieve the node's machine identity certificate. |
void |
handleEvent(java.lang.Object event)
|
void |
init()
|
java.lang.Integer |
initData()
A maintenance call for initialising the RCA client. |
protected java.lang.String |
listServices(java.lang.String servicesDelimited)
|
java.lang.Boolean |
processAttributeVOCertificate(RCASignedResponse certResponse)
|
java.lang.Integer |
processInitalisationForApplication(java.lang.Integer value)
Continue the execution from the applyForRegistration() call. |
java.lang.Boolean |
processInitialisationForAttribCert(java.lang.Integer val)
|
java.lang.Boolean |
processInitialisationForRqNewCert(java.lang.Integer retval)
Continue the execution from the requestNewCertificate() . |
java.lang.Integer |
processMyDescriptor(java.util.ArrayList<ResourceDescriptorRecord> descrs)
|
java.lang.Integer |
processMyDescriptorFailure(java.lang.Exception ex)
|
java.lang.Integer |
processMyServices(java.util.ArrayList<java.lang.String> stages)
|
java.lang.Integer |
processMyServicesFailure(java.lang.Exception ex)
|
java.lang.Boolean |
processRequestCertificate(RCASignedResponse response)
The callback that resumes the execution from requestNewCertificate() after the RCAServer's requestCertificate returns a value. |
java.lang.Boolean |
processRequestDummyCertificate(RCASignedResponse response)
|
java.lang.Integer |
pushVOAttributeCertificate(RCASignedResponse certResponse)
Lets the RCA Server service push one or more machine's VO attribute certificates that can be installed and used on the local node. |
protected org.bouncycastle.x509.X509V2AttributeCertificate |
readAttributeCert()
|
protected java.security.cert.X509Certificate |
readAttributeCertExt()
|
protected java.security.cert.X509Certificate |
readIdentityCert()
|
protected java.security.cert.X509Certificate |
readVOAttributeCertExt(java.lang.String vo)
|
java.lang.Integer |
removeVOAttributeCertificate(java.lang.String vo)
Lets the RCA Server remove an attribute VO certificate, notifying the client about removal from the VO. |
java.lang.Boolean |
requestAttributeCertificate(java.lang.String vo)
Requests the resource's attribute certificate providing credentials for the given VO from the RCA server. |
java.lang.Boolean |
requestNewCertificate()
The method generates a new public and private key pair, then sends the public key for certification to the RCA server and obtains the signed attribute certificate. |
Methods inherited from class eu.xtreemos.system.eventmachine.stage.Abstract2wayStage |
---|
getContext, removeContext, SendException, SendException, SendException, SendReply, SendReply, SendReply, setSink |
Methods inherited from class eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage |
---|
dequeue, getSource |
Methods inherited from class eu.xtreemos.system.eventmachine.stage.AbstractStage |
---|
addHandler, addHandler, addServiceListener, getName, getShortName, getThreadCount, notifyServiceInitialised, notifyServiceStarted, notifyServiceStopped, processEvent, removeHandler, removeServiceListener, setThreadCount, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static org.apache.log4j.Logger logger
protected int keyLength
protected CRCAClientConfig config
protected ResourceDescriptorRecord myDescriptor
protected RCAClientProcessor clientProcessor
Constructor Detail |
---|
public RCAClient()
Method Detail |
---|
protected java.lang.String getAttributes(java.security.cert.X509Certificate attribCert)
attribCert
- The certificate with the attributes in its extensions.
protected java.lang.String getAttributes(org.bouncycastle.x509.X509V2AttributeCertificate attribCert)
attribCert
- The attribute certificate do describe.
protected java.lang.String listServices(java.lang.String servicesDelimited)
public java.lang.String getMachineCertificateDetails() throws java.lang.Exception
java.lang.Exception
- Thrown when the certificate reading produces an error,
or the certificate files are in an invalid format.public java.security.cert.X509Certificate getMachineIdentityCertificate() throws java.lang.Exception
java.lang.Exception
public RCASignedResponse getMachineAttributeCertificate(java.lang.String vo) throws java.lang.Exception
vo
- The ID of the VO the call is to retrieve the attribute
certificate of. Use null or an empty string to obtain the non-VO
certificate.
java.lang.Exception
public java.lang.Boolean requestNewCertificate() throws java.lang.Exception
java.lang.Exception
public java.lang.Boolean processInitialisationForRqNewCert(java.lang.Integer retval) throws java.lang.Exception
requestNewCertificate()
.
retval
-
java.lang.Exception
public java.lang.Boolean processRequestCertificate(RCASignedResponse response) throws java.lang.Exception
response
- The result of the service call.
java.lang.Exception
public java.lang.Boolean createDummyCertificate(ResourceID dummyResId, java.lang.String outputPath) throws java.lang.Exception
java.lang.Exception
public java.lang.Boolean processRequestDummyCertificate(RCASignedResponse response) throws java.lang.Exception
java.lang.Exception
public java.lang.Boolean requestAttributeCertificate(java.lang.String vo) throws java.lang.Exception
vo
- The VO to request the machine's attribute certificate for.
java.lang.Exception
public java.lang.Boolean processInitialisationForAttribCert(java.lang.Integer val) throws java.lang.Exception
java.lang.Exception
public java.lang.Boolean processAttributeVOCertificate(RCASignedResponse certResponse) throws java.io.FileNotFoundException, java.io.IOException, BadAttributeCertificateException
java.io.FileNotFoundException
java.io.IOException
BadAttributeCertificateException
public java.lang.String getHandledEventType()
getHandledEventType
in class eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage
public void handleEvent(java.lang.Object event) throws java.lang.Exception
handleEvent
in interface eu.xtreemos.system.eventmachine.queue.IEventHandler
handleEvent
in class eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage
java.lang.Exception
public java.lang.Integer applyForRegistration() throws java.lang.Exception
java.lang.Exception
public java.lang.Integer processInitalisationForApplication(java.lang.Integer value)
applyForRegistration()
call.
Here we assume the initialisation has been done, and proceed with
the application for registration.
value
-
public java.lang.Integer initData()
public java.lang.Integer processMyDescriptor(java.util.ArrayList<ResourceDescriptorRecord> descrs)
public java.lang.Integer processMyDescriptorFailure(java.lang.Exception ex)
public java.lang.Integer processMyServices(java.util.ArrayList<java.lang.String> stages)
public java.lang.Integer processMyServicesFailure(java.lang.Exception ex)
public java.lang.Integer pushVOAttributeCertificate(RCASignedResponse certResponse) throws java.lang.Exception
certResponse
- The object containing the pushed certificate(s).
java.lang.Exception
public java.lang.Integer removeVOAttributeCertificate(java.lang.String vo) throws java.lang.Exception
vo
- The name of a VO that the resource has been removed from.
java.lang.Exception
protected java.security.cert.X509Certificate readIdentityCert() throws java.io.IOException
java.io.IOException
protected java.security.cert.X509Certificate readAttributeCertExt() throws java.io.IOException
java.io.IOException
protected org.bouncycastle.x509.X509V2AttributeCertificate readAttributeCert() throws java.io.IOException
java.io.IOException
protected java.security.cert.X509Certificate readVOAttributeCertExt(java.lang.String vo) throws java.io.IOException
java.io.IOException
protected java.lang.String getAttributeCertVOPath()
public void init()
init
in interface eu.xtreemos.system.eventmachine.stage.IStage
init
in class eu.xtreemos.system.eventmachine.stage.AbstractStage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |