Fix a bug with opentofu credentials
and add zfs support to openstack and add it to monitoring
This commit is contained in:
parent
973eb085c4
commit
1bf63cc735
6 changed files with 204 additions and 7 deletions
|
@ -109,6 +109,19 @@ impl Endpoint for MxKaareskovgaardNet {
|
|||
const BITWARDEN_KEYS: &'static [BitwardenKey] = &[BitwardenKey::Field("ZROOT_ENCRYPTION_KEY")];
|
||||
}
|
||||
|
||||
pub struct MonitoringKaareskovgaardNet;
|
||||
|
||||
impl Endpoint for MonitoringKaareskovgaardNet {
|
||||
const NAME: &'static str = "monitoring.kaareskovgaard.net";
|
||||
|
||||
const BITWARDEN_KEY: &'static str = "monitoring.kaareskovgaard.net";
|
||||
|
||||
const ENV_KEYS: &'static [&'static str] =
|
||||
&["MONITORING_KAARESKOVGAARD_NET_ZROOT_ENCRYPTION_KEY"];
|
||||
|
||||
const BITWARDEN_KEYS: &'static [BitwardenKey] = &[BitwardenKey::Field("ZROOT_ENCRYPTION_KEY")];
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Eq, PartialOrd, Ord, clap::ValueEnum)]
|
||||
pub enum CliEndpoint {
|
||||
#[serde(rename = "openstack")]
|
||||
|
@ -155,7 +168,7 @@ impl CliEndpoint {
|
|||
Self::Cloudflare => Cloudflare.read_from_openbao(map),
|
||||
Self::Hcloud => Hcloud.read_from_openbao(map),
|
||||
Self::Openstack => Openstack.read_from_openbao(map),
|
||||
Self::Unifi => Openstack.read_from_openbao(map),
|
||||
Self::Unifi => Unifi.read_from_openbao(map),
|
||||
// We don't transfer the root token to openbao itself, but relies on the user being authenticated
|
||||
// through oauth.
|
||||
Self::Vault => Ok(()),
|
||||
|
@ -173,6 +186,7 @@ pub fn transfer_from_bitwarden_to_vault(session: &mut BitwardenSession) -> anyho
|
|||
transfer_endpoint(Aws, session, &mut all_entries)?;
|
||||
transfer_endpoint(Cloudflare, session, &mut all_entries)?;
|
||||
transfer_endpoint(MxKaareskovgaardNet, session, &mut all_entries)?;
|
||||
transfer_endpoint(MonitoringKaareskovgaardNet, session, &mut all_entries)?;
|
||||
|
||||
for entry in all_entries {
|
||||
let mut delete_entry_proc = common::proc::Command::new("bao");
|
||||
|
|
|
@ -19,10 +19,6 @@ impl<T: Endpoint> EnvEntry<T> {
|
|||
fn new_from_values(values: Vec<(&'static str, String)>) -> Self {
|
||||
Self(values, PhantomData)
|
||||
}
|
||||
|
||||
pub fn read_from_bao() -> anyhow::Result<Self> {
|
||||
read_bao_data::<T>()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> From<EnvEntry<T>> for Vec<(&'static str, String)> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue