211 Commits

Author SHA1 Message Date
Wolfgang Bumiller
790d11edf1 buildsys: drop -C prefer-dynamic (and rebuild 0.3.0)
also add perl depends

the std library is actually big and not linking dynamically
doesn't add much
besides, the package names for libstd would cause issues
with minor compiler bumps...

the 0.3.0 package is actually built from this commit now,
since the installability checks caught this...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-10 12:32:42 +01:00
Wolfgang Bumiller
fc38788fde buildsys: add upload target
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-10 11:58:03 +01:00
Wolfgang Bumiller
f77e2f1a7d bump/release pve-rs as 0.3.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-10 11:52:34 +01:00
Wolfgang Bumiller
41ccaa5048 pve: TfaConfig: add_totp_entry, add_yubico_entry
fast path to add those two from the old user.cfg

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-10 09:53:18 +01:00
Wolfgang Bumiller
3e5228dd73 pve: add_totp anda dd_yubico cannot error, drop Result type
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-10 09:53:12 +01:00
Wolfgang Bumiller
951bc726a2 Add some dev tips to a README
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-09 12:02:53 +01:00
Wolfgang Bumiller
ec79616bd4 build fix: pmg-rs is not here yet
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-09 12:02:53 +01:00
Wolfgang Bumiller
2cc9163892 pve: add tfa api
This consists of two parts:

1) A proxmox_tfa_api module which temporarily lives here but
   will become its own crate.

   Most of this is a copy from ' src/config/tfa.rs with some
   compatibility changes:
   * The #[api] macro is guarded by a feature flag, since we
     cannot use it for PVE.
   * The Userid type is replaced by &str since we don't have
     Userid in PVE either.
   * The file locking/reading is removed, this will stay in
     the corresponding product code, and the main entry
     point is now the TfaConfig object.
   * Access to the runtime active challenges in /run is
     provided via a trait implementation since PVE and PBS
     will use different paths for this.
   Essentially anything pbs-specific was removed and the
   code split into a few submodules (one per tfa type
   basically).

2) The tfa module in pve-rs, which contains:
   * The parser for the OLD /etc/pve/priv/tfa.cfg
   * The parser for the NEW /etc/pve/priv/tfa.cfg
   * These create a blessed PVE::RS::TFA instance which:
     - Wraps access to the TfaConfig rust object.
     - Has methods all the TFA API call implementations
       These are copied from PBS' src/api2/access/tfa.rs,
       and pbs specific code removed.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-09 12:02:53 +01:00
Wolfgang Bumiller
9bc3ab23cb move apt to /perl-apt, use PERLMOD_PRODUCT env var
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-09 08:59:43 +01:00
Wolfgang Bumiller
1ae868ad78 import pve-rs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-09 08:56:38 +01:00
Wolfgang Bumiller
50754a46aa import basic skeleton
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-09 08:54:06 +01:00