41 Commits

Author SHA1 Message Date
Dominik Csapak
38050aee61 api: subscription: add return schema for 'GET' api
This was missing, but it mostly well defined since we're using the rust
bindings here. I copied most descriptions over from the PBS api, except
the ones only existing here (like sockets and level)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-10-24 16:43:03 +02:00
Thomas Lamprecht
750def79c4 api: subscription update: use new module for getting available ceph releases
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-10-04 16:23:35 +02:00
Thomas Lamprecht
abbf6dedb9 api: subscription update: report error if removing ceph-auth file fails
Print a warning if the file could not deleted (if it was actually
existed)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-10-04 16:23:35 +02:00
Thomas Lamprecht
3520ed6af1 api subscription: sort and group use statements
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-09-26 12:11:52 +02:00
Fabian Grünbichler
506134df52 subscription: remove ceph APT auth if invalid
like we do for the main APT auth file(s) in proxmox-subscription.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-10-25 18:45:48 +02:00
Thomas Lamprecht
b7588bcdef api: subscription update: actually ignore surrounding whitespace
We already trim correctly in the API endpoint's code, but that happens
after the parameter verification from the REST server, and as
patterns are anchored between ^$pattern$ there by default, it fails if
someone sends some whitespace before/after the actual key.

Simply allow arbitrary whitespace, but only at the API endpoint
itself, do not adapt the subscription pattern to avoid that an actual
whitespace sneaks in and let some lower level code throw up on it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-05 13:43:30 +02:00
Christian Ebner
347f88fecd website: update external links to www.proxmox.com
During the redesign of www.proxmox.com the menu structure and therefore
some url changed. Update the external link in order to avoid an
unneccessary redirect

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-08-23 10:09:25 +02:00
Thomas Lamprecht
93542d7748 pveceph: support new enterprise repository
With Proxmox VE 8, we'll have support for a enterprise ceph repo,
accessed through Proxmox VE subscriptions, to provide more broadly
tested ceph updates for production setups.

Replace the test-repository parameter with an actual enum of
selectable repo types for:

- test (same as previously selected through setting test-repository)
- no-subscription (the previous default, then named "main")
- enterprise (new and the default now, recommended for production)

Note that writing the auth-part is a bit hacky and might/should be
improved.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-05 19:04:12 +02:00
Thomas Lamprecht
fc3e061bd0 api: subscription: factor out check for cache being valid
multi-line post-if's are against our style guide.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-05 19:04:12 +02:00
Thomas Lamprecht
76a165a1f2 api: subscription: style cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-05 19:04:12 +02:00
Fabian Grünbichler
25eaf729d7 subscription: handle missing subscription info
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 14:50:32 +02:00
Fabian Grünbichler
d4df1b145c pvesubscription: add 'set-offline-key' command
and disallow updating signed offline keys via regular check/update code
path.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-06 11:02:59 +02:00
Fabian Grünbichler
d017de1f91 subscription: switch to Proxmox::RS::Subscription
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-06 11:02:59 +02:00
Thomas Lamprecht
bc12fba5fc ui: fix system report window indentation + cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-27 14:11:16 +02:00
Thomas Lamprecht
e82ed1675b subscription delete: followup fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-27 13:39:13 +02:00
Moayad Almalat
85222f8237 api, ui: allow to remove subscription
Signed-off-by: Moayad Almalat <m.almalat@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-27 13:28:27 +02:00
Fabian Grünbichler
3ac3653e63 use PVE::DataCenterConfig
to make sure that the corresponding cfs_read_file works() works.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 12:25:35 +01:00
Fabian Grünbichler
d8645329d6 api: subscription: use rpcenv for permission check
commit 2d2ed7ab5305eb4b5875e7d0888011edc4ad32f7 had a valid cause but
unnecessarily used the static PVE::AccessControl::check_permissions.
As the RPCEnvironment based check method has a "$noerr" parameter and
we already have a rpcenv instance readily available, we can use that
one just fine.

this is the last caller of PVE::AccessControl::check_permissions(),
which is the last caller of PVE::AccessControl::permission(). both can
thus be dropped altogether.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-17 16:53:57 +02:00
Thomas Lamprecht
93580fec68 use new url
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 17:57:27 +02:00
Thomas Lamprecht
5dff9157df api: subscription: return https backed link
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-01 15:00:27 +02:00
Thomas Lamprecht
7d762f4cc0 cleanup: api/subscription: keep variable declarations closer to use
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-31 10:54:50 +01:00
Dominik Csapak
7d6fba8fff api/subscription: fix permission check
when using 'check_permissions' directly, we have to actually use the
nodename in the path, else we check the wrong permission and one
needed to have propagating 'Sys.Audit' permissions on '/nodes' for
this to work.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-01-31 10:52:38 +01:00
Thomas Lamprecht
9fdfebf743 allow 8-way NUMA systems
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-11 10:21:55 +01:00
Dietmar Maurer
2d2ed7ab53 fix wrong permissions for subscription info
workaround to keep the subscription popup on login even without 'Sys.Audit'
permissions but remove the subscription details in the GUI for unauthorized
users.
2018-10-30 11:37:00 +01:00
Thomas Lamprecht
69bbb88541 api: nodes/subscription: implement reasonable access rights
Allow users which have Sys.Audit on a specific node to get the
subscription status and those with Sys.Modify to set and check
(update) it.

This mirrors the required permissions from other node specific
actions, e.g., APT (package management).

We always showed the Subscription Panel and all its elements in the
WebUI, so no need for change there.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-12-12 07:52:18 +01:00
Dietmar Maurer
43fc27a4ec PVE/API2/Subscription.pm - use new PVE::Subcription class 2017-10-03 12:54:29 +02:00
Dietmar Maurer
f494187fb6 do not use Net::SSL
seems IO::Socket::SSL can now connect to proxy
2016-02-26 11:29:00 +01:00
Dietmar Maurer
94cc956030 trim subscription key to avoid unexpected errors.
People normally use cut&paste, and that often adds unexpected white space
characters. So we simply remove them for convenience.
2014-06-13 06:32:07 +02:00
Dietmar Maurer
718427dacb subscription updates: set UserAgent header on proxy connect request 2013-10-29 10:20:38 +01:00
Dietmar Maurer
446b96693a corretly use proxy CONNECT
There is a bug in LWP:UserAgent - it does not use CONNECT for https
proxy calls. So such calls fails with SQUID.
2013-09-09 11:33:25 +02:00
Dietmar Maurer
2ba6d82257 fix changelog url for pve repository
To make it compatible with 'apt-get changelog'
2013-08-01 11:35:48 +02:00
Dietmar Maurer
7b02d9ecf3 write auth.conf 2013-07-25 10:29:52 +02:00
Dietmar Maurer
e721a8293f fix permissions on subscription api 2012-04-12 11:16:04 +02:00
Dietmar Maurer
00a93a4bef cleanup subscription code 2012-04-05 08:04:06 +02:00
Dietmar Maurer
bbb3512854 only save required information 2012-03-30 11:45:55 +02:00
Dietmar Maurer
5f7b79501f use /etc/subscription to store subscription key 2012-03-29 11:30:11 +02:00
Dietmar Maurer
7a95afb978 use validdirectory instead of validdomains 2012-03-29 09:33:52 +02:00
Dietmar Maurer
16b69b6c3e add subscription status to datacenter summary 2012-03-26 10:39:10 +02:00
Dietmar Maurer
8ae3531231 fix error message
Only test MD5 if status is active
2012-03-26 08:24:15 +02:00
Dietmar Maurer
8f9217dc97 use PVE::ProcFSTools::read_cpuinfo to get numbert of sockets 2012-03-26 08:00:57 +02:00
Dietmar Maurer
21ace8d328 add subscription management API 2012-03-23 06:31:34 +01:00