00001
00002
00003 #ifndef __ARC_CLIENTX509DELEGATION_H__
00004 #define __ARC_CLIENTX509DELEGATION_H__
00005
00006 #include <string>
00007 #include <list>
00008
00009 #include <inttypes.h>
00010
00011 #include <arc/ArcConfig.h>
00012 #include <arc/URL.h>
00013 #include <arc/message/MCC_Status.h>
00014 #include <arc/message/PayloadRaw.h>
00015 #include <arc/message/PayloadSOAP.h>
00016 #include <arc/client/ClientInterface.h>
00017 #include <arc/credential/Credential.h>
00018
00019 namespace Arc {
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 enum DelegationType {
00042 DELEG_ARC, DELEG_GRIDSITE, DELEG_GT4, DELEG_MYPROXY, DELEG_UNKNOWN
00043 };
00044
00045 class ClientX509Delegation {
00046 public:
00048 ClientX509Delegation() : soap_client_(NULL), signer_(NULL) {}
00049 ClientX509Delegation(const BaseConfig& cfg, const URL& url);
00050 virtual ~ClientX509Delegation();
00070 bool createDelegation(DelegationType deleg, std::string& delegation_id);
00071 bool destroyDelegation(DelegationType ) {
00072 return false;
00073 }
00098 bool acquireDelegation(DelegationType deleg, std::string& delegation_cred, std::string& delegation_id,
00099 const std::string cred_identity = "", const std::string cred_delegator_ip = "",
00100 const std::string username = "", const std::string password = "");
00101
00102 private:
00103 ClientSOAP *soap_client_;
00104 std::string cert_file_;
00105 std::string privkey_file_;
00106 std::string proxy_file_;
00107 std::string trusted_ca_dir_;
00108 std::string trusted_ca_file_;
00109 Credential *signer_;
00110 static Logger logger;
00111 };
00112
00113 }
00114
00115 #endif // __ARC_CLIENTX509DELEGATION_H__