Commit Graph

40 Commits

Author SHA1 Message Date
65c34958ec update Makefile 2022-03-06 14:26:11 +03:00
e51b9127e0 disable apt support 2022-03-06 14:22:01 +03:00
6e5fab9a6a fix cargo requires 2022-03-06 14:20:19 +03:00
Wolfgang Bumiller
8d4f76e3b0 bump perlmod to 0.12
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-28 12:11:07 +01:00
Thomas Lamprecht
2bfa47e167 pve-rs: bump version to 0.5.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-03 08:48:12 +01:00
Thomas Lamprecht
4122d1781c pve-rs: d/control: update proxmox-openid build-dependency
That version switched from curl to ureq so we'll loose quite a few
transitive dependencies.

Also, auth0 compat with their non-standard timestamp format should be
fixed now too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-03 08:11:47 +01:00
Wolfgang Bumiller
4e819e1dd0 pve-rs: drop unused openssl dep
we don't directly use it

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 09:57:35 +01:00
Wolfgang Bumiller
3cf399605b bump perlmod to 0.11
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-01-25 09:40:14 +01:00
Thomas Lamprecht
8a1df2f38b pve-rs: bump version to 0.5.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-13 14:36:23 +01:00
Thomas Lamprecht
81cb2194ff pve-rs: record proxmox-time dependency
fixes build with new calendar event perlmod binding

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-13 14:36:06 +01:00
Dominik Csapak
e75f545a2f pve-rs: add PVE::RS::CalendarEvent
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-01-13 13:58:31 +01:00
Thomas Lamprecht
2f474e63f5 d/control: fix vcs urls
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-11 14:20:04 +01:00
Wolfgang Bumiller
aa12b05775 bump perlmod to 0.10
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-12-14 13:58:34 +01:00
Wolfgang Bumiller
73a88784f1 pve: bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-28 17:11:57 +01:00
Wolfgang Bumiller
89c6d59e60 pve: update to proxmox-tfa 2.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-28 17:11:57 +01:00
Wolfgang Bumiller
e8a5bf2866 pve: bump perlmod to 0.9
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-28 17:11:57 +01:00
Wolfgang Bumiller
009306bf7d bump pve-rs to 0.4.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-22 13:33:20 +01:00
Wolfgang Bumiller
c5ca41322e depend on proxmox-tfa >= 1.3.2 for appid/origin fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-22 13:28:01 +01:00
Thomas Lamprecht
e6319f3cd3 bump pve-rs to 0.4.3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-19 14:35:11 +01:00
Thomas Lamprecht
e6848843ab pve-rs: d/control: break libpve-access-control (<< 7.1-3)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-19 14:32:58 +01:00
Fabian Grünbichler
42e927cc55 bump pve-rs to 0.4.2
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-11-19 14:15:56 +01:00
Fabian Grünbichler
4b4d8fb47b tfa: handle incompatible challenge data
by returning default data, in case the challenge data is not parseable.
this allows a new challenge to be started for the userid in question
without manual cleanup.

currently this can be triggered if an ongoing challenge created with
webauthn-rs 0.2.5 is stored in /run and attempted to be read
post-upgrade.

Reported-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-11-19 14:13:27 +01:00
Fabian Grünbichler
344469a057 bump pve-rs to 0.4.1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-11-19 11:36:18 +01:00
Fabian Grünbichler
f0d52c6094 bump base64 to 0.13
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-11-19 11:25:37 +01:00
Dietmar Maurer
544f85bb89 pve-rs: depend on proxmox-openid 0.9, bump version to 0.4.0 2021-11-18 10:13:29 +01:00
Wolfgang Bumiller
42dbadec03 bump pve-rs to 0.3.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-17 12:49:59 +01:00
Wolfgang Bumiller
d9f938ef49 pve-rs: bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-17 12:49:31 +01:00
Wolfgang Bumiller
205c76068d tfa: generate 'incomaptible' entries
for users with incompatible tfa entries, generate an
'incompatible' entry so they cannot log in via the old api

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-17 12:33:04 +01:00
Wolfgang Bumiller
84417400ed move proxmox_tfa_api module to proxmox-tfa as api feature
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-17 08:43:17 +01:00
Wolfgang Bumiller
7cb0164e4a fix typo
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-12 11:00:33 +01:00
Wolfgang Bumiller
c012875339 bump pve-rs to 0.3.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-12 10:26:23 +01:00
Dominik Csapak
dfbbed5d87 pve-rs/tfa: ignore and discard incomplete u2f entries
it can happen that we have leftover entries with non-completed challenges.
since a user cannot continue here in a sensible way, ignore and discard
them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-12 10:10:38 +01:00
Dominik Csapak
515d6a81d8 pve-rs/tfa: fix off by one trimming
to is the last *valid* character, and ranges end by default with one
less, so extend the range to the actual last character

this fixes an issue that we could not parse old configs with
non-padded base64 values

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-12 10:10:20 +01:00
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
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
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