Commit Graph

91 Commits

Author SHA1 Message Date
Fabian Grünbichler
64959d9ae0 move common metadata to workspace
and switch all crates to 2021 edition as well as a unified "authors" value.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:25 +01:00
Fabian Grünbichler
5ec765f842 update d/control files
debcargo 2.6 changed some minor details

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-06 11:21:43 +01:00
Thomas Lamprecht
52a8eb6ace d/control: tree wide update after switch to weak/namespaced dependencies
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-08-26 12:07:36 +02:00
Fabian Grünbichler
289d297c7d build: use weak and namespaced features
to reduce the creep of optional dependencies being exposed as features.

this requires cargo 0.63 (and debcargo built against at least that
version), but greatly reduces the number of binary packages and provides
generated, while still allowing sensible selection of optional
dependencies via the explicit feature meant for pulling them in.

diff stat for running `make  deb` after this change:
 proxmox-http/debian/control         | 226 ++++--------------------------------
 proxmox-router/debian/control       |  74 +-----------
 proxmox-schema/debian/control       |  53 ++-------
 proxmox-subscription/debian/control |  17 +--
 proxmox-sys/debian/control          |  51 +++-----
 proxmox-tfa/debian/control          | 110 ++----------------
 6 files changed, 72 insertions(+), 459 deletions(-)

the 'dep:' prefix marks something on the RHS inside the features section
as dependency, it's only allowed if the string after it is an optional
dependency an no explicit feature of the same name exists. if all
pointers to the optional dependency in the features section are marked
as such, the optional dependency itself will not be exposed as a feature
(either on the cargo or debian/control level).

the '?' suffix marks dependencies as "weak", which only enables the
optional dependency + its feature(s) if the optional dependency itself
is also enabled. it has no effect on d/control since such a relationship
is not encodable in Debian package relations, but it does affect cargo
dependency resolution and allows skipping the build of unneeded optional
dependencies in some cases.

with no packages/crates depending on the no longer exposed automatically
generated features/packages, so these are safe to remove even though
it's technically a breaking change.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-08-26 10:35:00 +02:00
Wolfgang Bumiller
36625fb92c tfa: bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 12:24:01 +02:00
Wolfgang Bumiller
d0b4f0bf2f tfa: docs fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 12:23:50 +02:00
Wolfgang Bumiller
df0d30a106 bump proxmox-tfa to 2.1.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:38:04 +02:00
Wolfgang Bumiller
a7f808d43b tfa: bump edition to 2021
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:35:58 +02:00
Wolfgang Bumiller
d396c3ea31 tfa: clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:35:57 +02:00
Wolfgang Bumiller
ea34292850 tfa: expose 'allow_subdomains' property
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:25:52 +02:00
Thomas Lamprecht
9c0e9dca59 tree wide update of genereated control
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-05 10:22:50 +02:00
Thomas Lamprecht
6f8173f67a tfa: rustfmt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 12:34:41 +02:00
Wolfgang Bumiller
f04eb949d1 tfa: serde tools: improve variance and dropck
`FoldSeqVisitor` doesn't actually own a `T` and therefore
cannot drop a `T`, we only use it via the `Fn(&mut Out, T)`,
so use `fn(T)` in the `PhantomData` to keep `T`
contravariant.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-22 12:31:54 +01:00
Wolfgang Bumiller
86f3c90763 proxmox-tfa: fully deserialize TfaChallenge
otherwise clients cannot use this...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 08:56:34 +01:00
Wolfgang Bumiller
e5a43afe10 proxmox-tfa: make TfaChallenge members public
rust based *clients* may want/need access to it

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 08:56:34 +01:00
Fabian Grünbichler
ca563a8cfd misc clippy fixes
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-02-08 14:28:44 +01:00
Thomas Lamprecht
c70d98c90c tfa: fix hyperlink in doc comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:06:02 +01:00
Fabian Grünbichler
3ee175c798 tfa: ignore uncompilable doctest
the doctest code uses non-public `fold`, up for re-evaluation if this
gets moved to proxmox-serde and made public..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-12-30 11:51:08 +01:00
Wolfgang Bumiller
dddfa1164b tfa: formatting
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-12-07 11:51:22 +01:00
Wolfgang Bumiller
6679005b4f bump proxmox-tfa to 2.0.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-28 17:00:29 +01:00
Wolfgang Bumiller
d85ebbb464 tfa: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-28 17:00:29 +01:00
Wolfgang Bumiller
637188d4ba tfa: make configured webauthn origin optional
and add a webauthn origin override parameter to all methods
accessing it

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-28 17:00:29 +01:00
Wolfgang Bumiller
508c1e7c85 tfa: let OriginUrl deref to its inner Url, add FromStr impl
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-28 17:00:29 +01:00
Wolfgang Bumiller
df3e1c53d5 tfa: add WebauthnConfig::digest method
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-28 17:00:29 +01:00
Wolfgang Bumiller
21b56f0c79 tfa: fix typo in docs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-28 17:00:29 +01:00
Wolfgang Bumiller
4b1cb9f9b3 bump proxmox-tfa to 1.3.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-22 13:30:51 +01:00
Wolfgang Bumiller
54e97d35c1 fix u2f context instantiation
don't use the appid for the origin if an origin was
specified

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-22 13:25:49 +01:00
Wolfgang Bumiller
c08d4a173d tfa: remove unnecessary bound attribute
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-19 12:45:23 +01:00
Fabian Grünbichler
f3872d0a69 bump proxmox-tfa to 1.3.1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-11-19 12:05:48 +01:00
Fabian Grünbichler
91932da15c tfa: bump webauthn-rs to 0.3
switch WebauthnConfig to use Url for the origin field, via a wrapper
type to make Updater and ApiType happy.

the two new Credential fields `verified` and `registration_policy` are
always set to `false` and `Discouraged`, to get the same behaviour as
before.

Suggested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Tested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-11-19 12:05:48 +01:00
Fabian Grünbichler
148950fd17 tfa: properly wrap webauthn credentials
this (external) struct gets new fields in webauthn-rs 0.3, so let's
properly wrap / convert it instead of just aliasing, else deserializing
will fail.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-11-19 12:05:48 +01:00
Fabian Grünbichler
dc14d03171 all crates: bump base64 dep to 0.13
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-11-19 11:46:21 +01:00
Wolfgang Bumiller
bbdfd8ede9 bump proxmox-tfa to 1.3.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-17 09:30:27 +01:00
Wolfgang Bumiller
313d0a6b88 proxmox-tfa: import tfa api from proxmox-perl-rs as api feature
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-17 08:39:56 +01:00
Wolfgang Bumiller
e0df53e793 bump proxmox-tfa to 1.2.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-09 13:27:59 +01:00
Wolfgang Bumiller
0156b3fe03 proxmox-tfa: add version field to u2f::AuthChallenge
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-09 13:27:59 +01:00
Wolfgang Bumiller
83934e59e6 proxmox-tfa: make u2f::AuthChallenge Clone + Debug
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-09 13:27:59 +01:00
Wolfgang Bumiller
bc38ff7878 bump proxmox-tfa to 1.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-29 15:07:09 +02:00
Wolfgang Bumiller
1554465d45 proxmox-tfa: add Totp::digits
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-29 14:31:39 +02:00
Wolfgang Bumiller
8398620669 tfa: u2f: bytes_as_base64{,url} weren't meant to be public
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-18 14:31:04 +02:00
Wolfgang Bumiller
77dc52c047 add proxmox-tfa crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-08 15:22:17 +02:00