pub struct SubjectMapping {
pub claim_subjects: Vec<(String, String)>,
pub require_registered_principal: bool,
}Expand description
How a Principal’s claims become subjects.
Fields§
§claim_subjects: Vec<(String, String)>Claim key → object type. A claim’s value may list several ids separated by commas or spaces; each becomes its own subject.
require_registered_principal: boolRequire a principal to be registered in the authz database before its
bare user:<id> subject is used.
Off by default, so a policy can name user:alice without registering
her first. Turn it on when several providers can mint identities and an
unregistered alice from one of them must not inherit tuples written
for another’s. Provider-qualified subjects (user:<provider>/<id>) are
always derived and are never ambiguous.
Trait Implementations§
Source§impl Clone for SubjectMapping
impl Clone for SubjectMapping
Source§fn clone(&self) -> SubjectMapping
fn clone(&self) -> SubjectMapping
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubjectMapping
impl Debug for SubjectMapping
Auto Trait Implementations§
impl Freeze for SubjectMapping
impl RefUnwindSafe for SubjectMapping
impl Send for SubjectMapping
impl Sync for SubjectMapping
impl Unpin for SubjectMapping
impl UnsafeUnpin for SubjectMapping
impl UnwindSafe for SubjectMapping
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request