Struct kanidmd_lib::server::QueryServerWriteTransaction
source · [−]pub struct QueryServerWriteTransaction<'a> { /* private fields */ }
Implementations
sourceimpl<'a> QueryServerWriteTransaction<'a>
impl<'a> QueryServerWriteTransaction<'a>
sourcepub fn batch_modify(
&mut self,
me: &BatchModifyEvent
) -> Result<(), OperationError>
pub fn batch_modify(
&mut self,
me: &BatchModifyEvent
) -> Result<(), OperationError>
This function behaves different to modify. Modify applies the same modification operation en-mass to 1 -> N entries. This takes a set of modifications that define a precise entry to apply a change to and only modifies that.
modify is for all entries matching this condition, do this change.
batch_modify is for entry X apply mod A, for entry Y apply mod B etc. It allows you to do per-entry mods.
The drawback is you need to know ahead of time what uuids you are affecting. This has parallels to scim, so it’s not a significant issue.
Otherwise, we follow the same pattern here as modify, and inside the transform the same modlists are used.
pub fn internal_batch_modify(
&mut self,
mods_iter: impl Iterator<Item = (Uuid, ModifyList<ModifyInvalid>)>
) -> Result<(), OperationError>
sourceimpl<'a> QueryServerWriteTransaction<'a>
impl<'a> QueryServerWriteTransaction<'a>
pub fn create(&mut self, ce: &CreateEvent) -> Result<(), OperationError>
pub fn internal_create(
&mut self,
entries: Vec<Entry<EntryInit, EntryNew>>
) -> Result<(), OperationError>
sourceimpl<'a> QueryServerWriteTransaction<'a>
impl<'a> QueryServerWriteTransaction<'a>
pub fn delete(&mut self, de: &DeleteEvent) -> Result<(), OperationError>
pub fn internal_delete(
&mut self,
filter: &Filter<FilterInvalid>
) -> Result<(), OperationError>
pub fn internal_delete_uuid(
&mut self,
target_uuid: Uuid
) -> Result<(), OperationError>
sourceimpl<'a> QueryServerWriteTransaction<'a>
impl<'a> QueryServerWriteTransaction<'a>
pub fn internal_migrate_or_create_str(
&mut self,
e_str: &str
) -> Result<(), OperationError>
pub fn internal_migrate_or_create(
&mut self,
e: Entry<EntryInit, EntryNew>
) -> Result<(), OperationError>
sourcepub fn migrate_2_to_3(&mut self) -> Result<(), OperationError>
pub fn migrate_2_to_3(&mut self) -> Result<(), OperationError>
Migrate 2 to 3 changes the name, domain_name types from iutf8 to iname.
sourcepub fn migrate_3_to_4(&mut self) -> Result<(), OperationError>
pub fn migrate_3_to_4(&mut self) -> Result<(), OperationError>
Migrate 3 to 4 - this triggers a regen of the domains security token as we previously did not have it in the entry.
sourcepub fn migrate_4_to_5(&mut self) -> Result<(), OperationError>
pub fn migrate_4_to_5(&mut self) -> Result<(), OperationError>
Migrate 4 to 5 - this triggers a regen of all oauth2 RS es256 der keys as we previously did not generate them on entry creation.
sourcepub fn migrate_5_to_6(&mut self) -> Result<(), OperationError>
pub fn migrate_5_to_6(&mut self) -> Result<(), OperationError>
Migrate 5 to 6 - This updates the domain info item to reset the token keys based on the new encryption types.
sourcepub fn migrate_6_to_7(&mut self) -> Result<(), OperationError>
pub fn migrate_6_to_7(&mut self) -> Result<(), OperationError>
Migrate 6 to 7
Modify accounts that are not persons, to be service accounts so that the extension rules remain valid.
sourcepub fn migrate_7_to_8(&mut self) -> Result<(), OperationError>
pub fn migrate_7_to_8(&mut self) -> Result<(), OperationError>
Migrate 7 to 8
Touch all service accounts to trigger a regen of their es256 jws keys for api tokens
sourcepub fn migrate_8_to_9(&mut self) -> Result<(), OperationError>
pub fn migrate_8_to_9(&mut self) -> Result<(), OperationError>
Migrate 8 to 9
This migration updates properties of oauth2 relying server properties. First, it changes the former basic value to a secret utf8string.
The second change improves the current scope system to remove the implicit scope type.
pub fn initialise_schema_core(&mut self) -> Result<(), OperationError>
pub fn initialise_schema_idm(&mut self) -> Result<(), OperationError>
pub fn initialise_idm(&mut self) -> Result<(), OperationError>
sourceimpl<'a> QueryServerWriteTransaction<'a>
impl<'a> QueryServerWriteTransaction<'a>
pub fn modify(&mut self, me: &ModifyEvent) -> Result<(), OperationError>
sourceimpl<'a> QueryServerWriteTransaction<'a>
impl<'a> QueryServerWriteTransaction<'a>
pub fn internal_modify(
&mut self,
filter: &Filter<FilterInvalid>,
modlist: &ModifyList<ModifyInvalid>
) -> Result<(), OperationError>
pub fn internal_modify_uuid(
&mut self,
target_uuid: Uuid,
modlist: &ModifyList<ModifyInvalid>
) -> Result<(), OperationError>
pub fn impersonate_modify_valid(
&mut self,
f_valid: Filter<FilterValid>,
f_intent_valid: Filter<FilterValid>,
m_valid: ModifyList<ModifyValid>,
event: &Identity
) -> Result<(), OperationError>
pub fn impersonate_modify(
&mut self,
filter: &Filter<FilterInvalid>,
filter_intent: &Filter<FilterInvalid>,
modlist: &ModifyList<ModifyInvalid>,
event: &Identity
) -> Result<(), OperationError>
pub fn impersonate_modify_gen_event(
&mut self,
filter: &Filter<FilterInvalid>,
filter_intent: &Filter<FilterInvalid>,
modlist: &ModifyList<ModifyInvalid>,
event: &Identity
) -> Result<ModifyEvent, OperationError>
sourceimpl<'a> QueryServerWriteTransaction<'a>
impl<'a> QueryServerWriteTransaction<'a>
pub fn purge_tombstones(&mut self) -> Result<(), OperationError>
pub fn purge_recycled(&mut self) -> Result<(), OperationError>
pub fn revive_recycled(
&mut self,
re: &ReviveRecycledEvent
) -> Result<(), OperationError>
sourceimpl<'a> QueryServerWriteTransaction<'a>
impl<'a> QueryServerWriteTransaction<'a>
sourcepub fn set_domain_display_name(
&mut self,
new_domain_name: &str
) -> Result<(), OperationError>
pub fn set_domain_display_name(
&mut self,
new_domain_name: &str
) -> Result<(), OperationError>
Initiate a domain display name change process. This isn’t particularly scary because it’s just a wibbly human-facing thing, not used for secure activities (yet)
sourcepub fn domain_rename(
&mut self,
new_domain_name: &str
) -> Result<(), OperationError>
pub fn domain_rename(
&mut self,
new_domain_name: &str
) -> Result<(), OperationError>
Initiate a domain rename process. This is generally an internal function but it’s exposed to the cli for admins to be able to initiate the process.
pub fn reindex(&mut self) -> Result<(), OperationError>
pub fn get_changed_uuids(&self) -> &HashSet<Uuid>
pub fn get_changed_ouath2(&self) -> bool
pub fn get_changed_domain(&self) -> bool
pub fn commit(self) -> Result<(), OperationError>
Trait Implementations
sourceimpl<'a> QueryServerTransaction<'a> for QueryServerWriteTransaction<'a>
impl<'a> QueryServerTransaction<'a> for QueryServerWriteTransaction<'a>
sourcefn get_domain_name(&self) -> &str
fn get_domain_name(&self) -> &str
Gets the in-memory domain_name element
type AccessControlsTransactionType = AccessControlsWriteTransaction<'a>
type BackendTransactionType = BackendWriteTransaction<'a>
type SchemaTransactionType = SchemaWriteTransaction<'a>
fn get_be_txn(&mut self) -> &mut BackendWriteTransaction<'a>
fn get_schema<'b>(&self) -> &'b SchemaWriteTransaction<'a>
fn get_accesscontrols(&self) -> &AccessControlsWriteTransaction<'a>
fn get_resolve_filter_cache(
&mut self
) -> &mut ARCacheReadTxn<'a, (IdentityId, Filter<FilterValid>), Filter<FilterValidResolved>, ()>
fn get_resolve_filter_cache_and_be_txn(
&mut self
) -> (&mut BackendWriteTransaction<'a>, &mut ARCacheReadTxn<'a, (IdentityId, Filter<FilterValid>), Filter<FilterValidResolved>, ()>)
fn get_domain_uuid(&self) -> Uuid
fn get_domain_display_name(&self) -> &str
sourcefn search_ext(
&mut self,
se: &SearchEvent
) -> Result<Vec<Entry<EntryReduced, EntryCommitted>>, OperationError>
fn search_ext(
&mut self,
se: &SearchEvent
) -> Result<Vec<Entry<EntryReduced, EntryCommitted>>, OperationError>
SearchEvent
for the internal user, this query will fail. It is invalid for
the access
module to attempt to reduce avas for internal searches, and you
should use fn search
instead. Read more