pub struct Gate { /* private fields */ }Implementations§
Source§impl Gate
impl Gate
pub fn new( store: Arc<AuthStore>, tailnet: Option<Tailnet>, access: Option<(Arc<AccessValidator>, AccessAllowList, Vec<String>)>, ) -> Gate
Sourcepub fn with_agents(
self,
tailnet_listens: Vec<String>,
access: Option<(Arc<AccessValidator>, Vec<String>)>,
) -> Gate
pub fn with_agents( self, tailnet_listens: Vec<String>, access: Option<(Arc<AccessValidator>, Vec<String>)>, ) -> Gate
Let orgs’ tailnet and Access agent identities in
(crate::auth::agent_identities): the tailnet --listen
addresses, and Access’s validator with the Host names to allow.
Sourcepub fn agent_ways(&self) -> AgentWays
pub fn agent_ways(&self) -> AgentWays
Which agent identities can reach this server at all.
Sourcepub fn agent(&self, req: &Request, id: Option<&Identity>) -> Option<Principal>
pub fn agent(&self, req: &Request, id: Option<&Identity>) -> Option<Principal>
The agent identity behind req, if an org maps it: a verified
Access identity (id, else the request’s own assertion) on a
loopback listener Access guards, or a tailnet peer, as tailscaled
says. A bearer token decides on its own, so it is not asked here.
Superadmin sources are judged first, by Gate::resolve.
pub fn tailnet(&self) -> Option<&Tailnet>
pub fn access_list(&self) -> Option<&AccessAllowList>
Auto Trait Implementations§
impl !Freeze for Gate
impl !RefUnwindSafe for Gate
impl !UnwindSafe for Gate
impl Send for Gate
impl Sync for Gate
impl Unpin for Gate
impl UnsafeUnpin for Gate
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