Skip to main content

MockAccessControlPlugin

Struct MockAccessControlPlugin 

Source
pub struct MockAccessControlPlugin { /* private fields */ }
Expand description

Mock access control: allows everything. Tests only.

Implementations§

Source§

impl MockAccessControlPlugin

Source

pub fn new() -> Self

Constructor.

Trait Implementations§

Source§

impl AccessControlPlugin for MockAccessControlPlugin

Source§

fn validate_local_permissions( &mut self, _local: IdentityHandle, _participant_guid: [u8; 16], _props: &PropertyList, ) -> SecurityResult<PermissionsHandle>

Validates local permissions (Governance.xml + Permissions.xml Read more
Source§

fn validate_remote_permissions( &mut self, _local: IdentityHandle, _remote: IdentityHandle, _remote_permissions_token: &[u8], _remote_credential: &[u8], ) -> SecurityResult<PermissionsHandle>

Validates remote permissions from the SEDP handshake. Read more
Source§

fn check_create_datawriter( &self, _p: PermissionsHandle, _topic: &str, ) -> SecurityResult<AccessDecision>

May this participant create a DataWriter on this topic? Read more
Source§

fn check_create_datareader( &self, _p: PermissionsHandle, _topic: &str, ) -> SecurityResult<AccessDecision>

May this participant create a DataReader on this topic? Read more
Source§

fn check_remote_datawriter_match( &self, _l: PermissionsHandle, _r: PermissionsHandle, _topic: &str, ) -> SecurityResult<AccessDecision>

May the local reader match the remote’s publication? Read more
Source§

fn check_remote_datareader_match( &self, _l: PermissionsHandle, _r: PermissionsHandle, _topic: &str, ) -> SecurityResult<AccessDecision>

Mirror image: may a remote reader match our writer?
Source§

fn plugin_class_id(&self) -> &str

Plugin class id (e.g. “DDS:Access:Permissions:1.2”) for SPDP announcing.
Source§

fn check_create_participant( &self, _local_perms: PermissionsHandle, _domain_id: u32, ) -> SecurityResult<AccessDecision>

Spec §9.4.2.5: check_create_participant. Default: permit (no plugin-specific filtering). Read more
Source§

fn check_remote_participant( &self, _local_perms: PermissionsHandle, _remote_perms: PermissionsHandle, _domain_id: u32, ) -> SecurityResult<AccessDecision>

Spec §9.4.2.6: check_remote_participant — may the remote participant join our domain? Default: permit. Read more
Source§

fn check_create_topic( &self, _local_perms: PermissionsHandle, _topic_name: &str, ) -> SecurityResult<AccessDecision>

Spec §9.4.2.10: check_create_topic — may the local subject create a topic with that name? Default: permit. Read more
Source§

fn get_permissions_token( &self, _local_perms: PermissionsHandle, ) -> SecurityResult<Vec<u8>>

Spec §9.4.2.13: get_permissions_token — opaque permissions token for SPDP announcing (PID_PERMISSIONS_TOKEN 0x1002). Default: empty. Read more
Source§

fn get_permissions_credential_token( &self, _local_perms: PermissionsHandle, ) -> SecurityResult<Vec<u8>>

Spec §9.4.2.14: get_permissions_credential_token — opaque credential passed on in the authentication plugin via set_permissions_credential_and_token. Default: empty. Read more
Source§

impl Debug for MockAccessControlPlugin

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MockAccessControlPlugin

Source§

fn default() -> MockAccessControlPlugin

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.