76 #ifdef epicsExportSharedSymbols
77 # define securityEpicsExportSharedSymbols
78 # undef epicsExportSharedSymbols
83 #include <epicsMutex.h>
85 #include <pv/status.h>
86 #include <pv/pvData.h>
87 #include <pv/sharedPtr.h>
89 #ifdef securityEpicsExportSharedSymbols
90 # define epicsExportSharedSymbols
91 # undef securityEpicsExportSharedSymbols
94 #include <pv/pvaDefs.h>
95 #include <pv/pvaConstants.h>
96 #include <pv/serializationHelper.h>
97 #include <pv/logger.h>
122 static size_t num_instances;
131 pvData::PVStructure::const_shared_pointer
aux;
161 {
return epics::pvData::PVStructure::const_shared_pointer(); }
166 virtual void messageReceived(epics::pvData::PVStructure::const_shared_pointer
const & data) {}
184 virtual void sendSecurityPluginMessage(epics::pvData::PVStructure::const_shared_pointer
const & data) = 0;
193 virtual void authenticationCompleted(
const epics::pvData::Status& status,
194 const std::tr1::shared_ptr<PeerInfo>& peer) = 0;
220 virtual std::tr1::shared_ptr<AuthenticationSession> createSession(
221 const std::tr1::shared_ptr<PeerInfo>& peer,
222 std::tr1::shared_ptr<AuthenticationPluginControl>
const & control,
223 epics::pvData::PVStructure::shared_pointer
const & data) = 0;
237 mutable epicsMutex mutex;
250 void snapshot(
list_t& plugmap)
const;
258 void add(
int prio,
const std::string& name,
const AuthenticationPlugin::shared_pointer& plugin);
260 bool remove(
const AuthenticationPlugin::shared_pointer& plugin);
263 AuthenticationPlugin::shared_pointer lookup(
const std::string& name)
const;
276 virtual void authorize(
const std::tr1::shared_ptr<PeerInfo>& peer) =0;
279 class epicsShareClass AuthorizationRegistry
281 EPICS_NOT_COPYABLE(AuthorizationRegistry)
285 static AuthorizationRegistry &plugins();
287 AuthorizationRegistry();
288 ~AuthorizationRegistry();
294 mutable epicsMutex mutex;
299 void run(const std::tr1::shared_ptr<
PeerInfo>& peer);
std::string transport
transport protocol used eg. "pva". Must not be empty.
virtual epics::pvData::PVStructure::const_shared_pointer initializationData()
For client plugins only, call to find the payload returned with CONNECTION_VALIDATION.
I modify PeerInfo after authentication is complete.
_ForwardIterator remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp &__value)
roles_t roles
Set of strings which may be used to modify access control decisions.
Information provded by a client to a server-type ChannelProvider.
virtual bool isValidFor(const PeerInfo &peer) const
Allow this plugin to be advertised to a particular peer.
pvData::PVStructure::const_shared_pointer aux
NULL or extra authority specific information.
bool identified
Short-hand for authority!="anonymous".
std::string authority
authentication mechanism used. eg. "anonymous" or "gssapi". Must not be empty.
A particular authentication exchange.
Actor through which authentication exchanges are initiated.
void osdGetRoles(const std::string &account, PeerInfo::roles_t &roles)
Query OS specific DB for role/group names assocated with a user account.
std::string realm
scope of authority. eg. "mylab.gov"
std::string account
aka. user name
virtual void authenticationComplete(const epics::pvData::Status &status)
For client plugins only.
unsigned transportVersion
If applicable, the protocol minor version number.
virtual void messageReceived(epics::pvData::PVStructure::const_shared_pointer const &data)
Called when an AUTHZ message is recieved from the peer.
std::string peer
network address of remote peer. eg. "192.168.1.1:5075".
bool local
Short-hand for transport=="local".
Callbacks for use by AuthenticationSession.