Commit Graph

75 Commits

Author SHA1 Message Date
Thomas Lamprecht
94d38f0aba bump version to 3.3.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-26 09:35:58 +01:00
Fabian Grünbichler
6c8c78d01a fix validation of self-signed cert chains
The interface here is a bit weird - if the verify callback returns 1
for a certificate higher up in the chain, this will propagate to the
next invocation of the callback for the next certificate, even if
openssl on its own would not trust the certificate.

By re-ordering the checks and keeping track of the fact that we
returned 1 despite openssl failing its own validation, the validation
logic should now cover all combinations of certificate count and
self-signed/system trust status.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-03-26 09:34:33 +01:00
Thomas Lamprecht
dfee5e09ac bump version to 3.3.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-09 07:54:46 +02:00
Max Carrara
b8721b4a8e lwp: set SameSite attr of auth cookie to 'strict'
This prohibits the cookie from being sent along in cross-site
sub-requests or when the user navigates to a different site.

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
2023-06-06 17:15:56 +02:00
Thomas Lamprecht
8a0c6cd03e buildsys: derive upload dist automatically
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 16:23:18 +02:00
Thomas Lamprecht
e426c37dc8 bump version to 3.3.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 16:22:44 +02:00
Thomas Lamprecht
5de355e546 buildsys: add sbuild convenience target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 16:22:36 +02:00
Thomas Lamprecht
4b2de6c1e7 buildsys: cleanup deb/dsc targets
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 16:22:19 +02:00
Thomas Lamprecht
1b02346293 separate packaging and source build system
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 16:21:48 +02:00
Thomas Lamprecht
f7d3e2f59e buildsys: encode prerequisites of install target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 15:52:46 +02:00
Thomas Lamprecht
f5310c0761 buildsys: cleanup and expand clean target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 15:52:17 +02:00
Thomas Lamprecht
7147fbfef7 use dpkg's packaging variable makefile fragment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 15:51:41 +02:00
Thomas Lamprecht
6920b2fe63 d/control: define compat level via build-depends and raise to 13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 15:42:18 +02:00
Thomas Lamprecht
2401ab289a exception: white space cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 15:41:37 +02:00
Thomas Lamprecht
2937fdf983 remove Exception update targets, just comment how
it's very odd to have buildsystem targets that go over the git repos
root directory boundary, as one *must not* depend on unrelated
things.

Rather just comment that and how this was derived from pve-common's
exception module.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 15:36:46 +02:00
Thomas Lamprecht
727d396e56 makefile: convert to use simple parenthesis
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-18 16:01:14 +02:00
Thomas Lamprecht
4a834b4edd tfa: clarify error on unsupported types a bit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-12-02 19:23:15 +01:00
Wolfgang Bumiller
3bfa976eaa support new tfa api
Note that in PVE we should instantiate the API client with
`pve_new_format` in order to have this client also switch to
the new mechanism, otherwise the old api will be used which
does not support multiple factors or recovery keys.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-12-02 19:20:01 +01:00
Thomas Lamprecht
cb2805fbbf bump version to 3.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-28 16:45:28 +02:00
Thomas Lamprecht
d85b5d3b21 buildsys: change upload dist to bullseye
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-28 16:44:53 +02:00
Thomas Lamprecht
20b9e0ffb3 d/control: update dh-compat to 12 and bump standards version
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-28 16:44:32 +02:00
Thomas Lamprecht
5e084a5455 d/compate: update to 10
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-14 20:44:03 +01:00
Thomas Lamprecht
e3d672cc9b bump version to 3.1-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-04 12:25:53 +01:00
Thomas Lamprecht
44c53c4be7 improve protocol selection heuristic
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-04 12:18:45 +01:00
Thomas Lamprecht
f426fbc3cc bump version to 3.1-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-03 16:09:08 +01:00
Thomas Lamprecht
c998cdb682 default to verifying cert hostname if no fingerprint is passed
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-03 16:07:50 +01:00
Thomas Lamprecht
a1298cc2a5 cert verification: trust openssl result if hostnames are verified
If we verified that the hostname matches the cert we can also trust
the openssl verification result.

We get the openssl result as first parameter[0].

[0]: https://metacpan.org/pod/IO::Socket::SSL#SSL_verify_callback

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-03 16:06:33 +01:00
Thomas Lamprecht
e02e35fde3 format/code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-03 16:00:33 +01:00
Thomas Lamprecht
50f793b9d1 client exception: try to avoid HTTP code duplication in error string
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-03 15:55:53 +01:00
Thomas Lamprecht
9518a97873 examples: add CLI like example for easier re-use with non-local host
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-03 15:55:11 +01:00
Thomas Lamprecht
18857a21bc bump version to 3.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-30 15:30:23 +01:00
Thomas Lamprecht
38fbee3cdd use two-argument bless
else we'd break "inheriting" (or whatever perl does is called) to
child modules

> Never use the one-argument form of bless.
-- Perl Best Practices, Pg. 365

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-30 15:27:22 +01:00
Thomas Lamprecht
935bbf68ba do not save user-agent ssl_opts in $self
one can always get it from the useragent, changing it here would not
do anything anyway, so this also avoids some possible confusion.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-30 15:27:22 +01:00
Thomas Lamprecht
588a2ba611 rework FP verify callback to avoid creating refcount cycle
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-30 15:27:22 +01:00
Thomas Lamprecht
44f9aae436 sort use statements, drop Data::Dumper
print to_json($ref, {pretty=>1,utf8=>1,canonical=>1})."\n";

is nicer anyway ;-)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-30 15:26:01 +01:00
Thomas Lamprecht
a3db1e77fd bump version to 3.0-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-07 07:54:35 +01:00
Fabian Grünbichler
7b6f8f1d17 implement api token support
and add an example for it.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-02-05 11:17:18 +01:00
Oguz Bektas
f195667216 fix #2227: enable totp codes to be passed in cli
this patch enables to pass totp codes during cluster join if tfa has
been enabled for root@pam (or any other user actually, but having it enabled on
root causes problems during cluster join).

u2f support is not yet implemented.

Co-developed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Co-developed-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-09-04 16:06:53 +02:00
Thomas Lamprecht
6d06eacaaf bump version to 3.0-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 19:29:54 +02:00
Thomas Lamprecht
8bc98506cb login TFA exception: also print username and use raise
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-27 22:04:33 +02:00
Oguz Bektas
985f120305 check for tfa during cluster join, abort if yes
momentarily, we check for tfa in the cluster join and abort if it's
enabled, since the tfa ticket is not being handled correctly atm, which
caused a '401 No ticket' error[0][1].

todo is to ask with a prompt on gui and cli to enable totp and possible
u2f in the future

[0]: https://forum.proxmox.com/threads/failed-to-add-cluster-node-401-no-ticket.54882/
[1]: https://bugzilla.proxmox.com/show_bug.cgi?id=2227

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-06-27 22:00:40 +02:00
Thomas Lamprecht
50963f829a buildsys: change upload dist to buster
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-21 18:34:43 +02:00
Thomas Lamprecht
70b5c2059a d/control: update standards version
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-21 18:33:12 +02:00
Thomas Lamprecht
9d5b94a1f6 bump version to 3.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-21 17:28:30 +02:00
Thomas Lamprecht
f951c7a980 d/control: add defined ${perl:Depends} to dependency list
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-21 16:47:49 +02:00
Thomas Lamprecht
d257cf1552 set debian source format to 1.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-21 16:46:45 +02:00
Thomas Lamprecht
782bc6b444 debian/rules should be executable
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-21 16:46:27 +02:00
Dietmar Maurer
3d444d933d Merge missing changelog entry 2019-04-24 11:14:19 +02:00
Rhonda D'Vine
b6ce5c2783 Get version information from changelog
The duplication of the version information both in the Makefile and in
debian/changelog is a potential error point, and an unneeded one.

Signed-off-by: Rhonda D'Vine <rhonda@proxmox.com>
2019-01-03 08:49:52 +01:00
Rhonda D'Vine
2689bc847d Add SOURCE file
This package was missing the SOURCE information from the binary package.

Signed-off-by: Rhonda D'Vine <rhonda@proxmox.com>
2019-01-03 08:49:52 +01:00