Line data Source code
1 : /* 2 : * Distributed under the OpenDDS License. 3 : * See: http://www.OpenDDS.org/license.html 4 : */ 5 : 6 : #ifndef OPENDDS_DCPS_SECURITY_ACCESSCONTROL_GOVERNANCE_H 7 : #define OPENDDS_DCPS_SECURITY_ACCESSCONTROL_GOVERNANCE_H 8 : 9 : #include "DomainIdSet.h" 10 : 11 : #include <dds/DCPS/security/SSL/SignedDocument.h> 12 : #include <dds/DCPS/RcObject.h> 13 : 14 : #include <dds/DdsSecurityCoreC.h> 15 : 16 : #include <string> 17 : #include <vector> 18 : 19 : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 20 : 21 : namespace OpenDDS { 22 : namespace Security { 23 : 24 : class Governance : public DCPS::RcObject { 25 : public: 26 : typedef DCPS::RcHandle<Governance> shared_ptr; 27 : 28 : struct TopicAccessRule { 29 : TopicAccessRule(); 30 : std::string topic_expression; 31 : DDS::Security::TopicSecurityAttributes topic_attrs; 32 : std::string metadata_protection_kind; 33 : std::string data_protection_kind; 34 : }; 35 : 36 : typedef std::vector<TopicAccessRule> TopicAccessRules; 37 : 38 : struct DomainRule { 39 : DomainIdSet domains; 40 : DDS::Security::ParticipantSecurityAttributes domain_attrs; 41 : TopicAccessRules topic_rules; 42 : }; 43 : 44 : typedef std::vector<DomainRule> GovernanceAccessRules; 45 : 46 : Governance(); 47 : 48 : int load(const SSL::SignedDocument& doc); 49 : 50 36 : GovernanceAccessRules& access_rules() 51 : { 52 36 : return access_rules_; 53 : } 54 : 55 : private: 56 : GovernanceAccessRules access_rules_; 57 : }; 58 : 59 : } 60 : } 61 : 62 : OPENDDS_END_VERSIONED_NAMESPACE_DECL 63 : 64 : #endif