}
Fine
},
+ MC::ThisConnAuthBy => {
+ use MgmtThisConnAuthBy as MTCAB;
+ MR::ThisConnAuthBy(match &cs.authstate {
+ AuthState::None { .. } => MTCAB::Local,
+ AuthState::Superuser { .. } => MTCAB::Local,
+ AuthState::Ssh { key, .. } => MTCAB::Ssh { key: key.clone() },
+ })
+ }
MC::SetRestrictedSshScope { key } => {
let good_uid = Some(config().ssh_proxy_uid);
let auth = cs.authorised_uid(good_uid, Some("SetRestrictedScope"))
SshListKeys,
SshAddKey { akl: sshkeys::AuthkeysLine },
SshDeleteKey { index: usize, id: sshkeys::Id },
+ ThisConnAuthBy, // -> Fine or SshKeySpec
LoadFakeRng(Vec<String>),
}
Bundle { bundle: bundles::Id },
SshKeys(Vec<sshkeys::MgmtKeyReport>),
SshKeyAdded { index: usize, id: sshkeys::Id },
+ ThisConnAuthBy(MgmtThisConnAuthBy),
}
pub type MgmtBundleList = BTreeMap<bundles::Id, bundles::State>;
+#[derive(Debug,Clone,Serialize,Deserialize)]
+pub enum MgmtThisConnAuthBy {
+ Local,
+ Ssh { key: sshkeys::KeySpec },
+}
+
#[derive(Debug,Serialize,Deserialize)]
pub enum MgmtGameInstruction {
Noop,
Progress(_) => panic!(),
Fine | AccountsList{..} | GamesList{..} |
Libraries(_) | LibraryItems(_) | Bundles{..} | Bundle{..} => { },
- SshKeys(..) | SshKeyAdded{..} => { },
+ SshKeys(..) | SshKeyAdded{..} | ThisConnAuthBy{..} => { },
AlterGame { error: None, .. } => { },
Error { error } => {
Err(error.clone()).context(