From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Christian Ebner <c.ebner@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH v2 proxmox-backup 13/31] api types: define remote permissions and roles for push sync
Date: Wed, 07 Aug 2024 13:21:16 +0200 [thread overview]
Message-ID: <172302967643.107519.17362344441967210914@yuna.proxmox.com> (raw)
In-Reply-To: <172302753518.107519.6330916068168411771@yuna.proxmox.com>
after thinking about this some more - this is missing some more bits I think.
for a pull based sync, we have two users:
- local owner/user
- remote user via remote.cfg
we only ever query/read from the remote side, so having two privs is fine:
- one to see the remote in the first place
- one to read backups that the configured remote user sees
for the local side, we have the full set of privs/operations:
- create/delete namespaces (DATASTORE_MODIFY)
- delete snapshots or groups (DATASTORE_MODIFY or DATASTORE_PRUNE+owner)
- create snapshots or groups (DATASTORE_BACKUP+owner)
but for push based backups, we basically need to map the "local" privs from a
pull to the remote privs, since we possibly need to do the same set of
operations (while in the case of push, we only query/read the local side, so
the priv matrix there is simpler).
the owner semantics for push based backups are also rather weird/confusing:
- if owner has PRIV_DATASTORE_READ on the source, all groups will be synced
- if owner only has PRIV_DATASTORE_BACKUP only owned groups will be synced
- the backups on the target will always be owned by the remote.cfg user(!)
syncing back is thus only possible if the (source) owner and the remote.cfg
user are identical?
should we rename that parameter? owner makes sense for pulling (it is the user
that owns the synced groups after the sync), but not so much for pushing, where
something like "Local User" might be less misleading?
Quoting Fabian Grünbichler (2024-08-07 12:45:35)
> Quoting Christian Ebner (2024-08-01 09:43:45)
> > Adding the privileges to allow backup and prune on remote targets, to
> > be used for sync jobs in push direction.
> >
> > Also adds a dedicated role collecting the required privileges.
> >
> > Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> > ---
> > changes since version 1:
> > - no changes
> >
> > pbs-api-types/src/acl.rs | 17 +++++++++++++++++
> > 1 file changed, 17 insertions(+)
> >
> > diff --git a/pbs-api-types/src/acl.rs b/pbs-api-types/src/acl.rs
> > index ef6398629..f644029fa 100644
> > --- a/pbs-api-types/src/acl.rs
> > +++ b/pbs-api-types/src/acl.rs
> > @@ -58,6 +58,12 @@ constnamedbitmap! {
> > PRIV_REMOTE_MODIFY("Remote.Modify");
> > /// Remote.Read allows reading data from a configured `Remote`
> > PRIV_REMOTE_READ("Remote.Read");
> > + /// Remote.Backup allows Remote.Read and creating new snapshots on a configured `Remote`,
> > + /// but also requires backup ownership
> > + PRIV_REMOTE_BACKUP("Remote.Backup");
> > + /// Remote.Prune allows deleting snapshots on a configured `Remote`,
> > + /// but also requires backup ownership
> > + PRIV_REMOTE_PRUNE("Remote.Prune");
> >
> > /// Sys.Console allows access to the system's console
> > PRIV_SYS_CONSOLE("Sys.Console");
> > @@ -151,6 +157,7 @@ pub const ROLE_REMOTE_AUDIT: u64 = 0
> > pub const ROLE_REMOTE_ADMIN: u64 = 0
> > | PRIV_REMOTE_AUDIT
> > | PRIV_REMOTE_MODIFY
> > + | PRIV_REMOTE_BACKUP
> > | PRIV_REMOTE_READ;
>
> according to the description of the role, this should also get PRIV_REMOTE_PRUNE?
>
> >
> > #[rustfmt::skip]
> > @@ -160,6 +167,14 @@ pub const ROLE_REMOTE_SYNC_OPERATOR: u64 = 0
> > | PRIV_REMOTE_AUDIT
> > | PRIV_REMOTE_READ;
>
> do we want to copy+rename this to make the "PULL" explicit, and deprecate the old name?
>
> >
> > +#[rustfmt::skip]
> > +#[allow(clippy::identity_op)]
> > +/// Remote.SyncPushOperator can do read, backup and prune on the remote.
> > +pub const ROLE_REMOTE_SYNC_PUSH_OPERATOR: u64 = 0
> > + | PRIV_REMOTE_AUDIT
> > + | PRIV_REMOTE_BACKUP
> > + | PRIV_REMOTE_READ;
>
> shouldn't just BACKUP be enough here? that implies having access to owned backups..
>
> > +
> > #[rustfmt::skip]
> > #[allow(clippy::identity_op)]
> > /// Tape.Audit can audit the tape backup configuration and media content
> > @@ -225,6 +240,8 @@ pub enum Role {
> > RemoteAdmin = ROLE_REMOTE_ADMIN,
> > /// Syncronisation Opertator
> > RemoteSyncOperator = ROLE_REMOTE_SYNC_OPERATOR,
> > + /// Syncronisation Opertator (push direction)
>
> typo: Opertator
>
> pre-existing typo: Synchronisation
>
> > + RemoteSyncPushOperator = ROLE_REMOTE_SYNC_PUSH_OPERATOR,
> > /// Tape Auditor
> > TapeAudit = ROLE_TAPE_AUDIT,
> > /// Tape Administrator
> > --
> > 2.39.2
> >
> >
> >
> > _______________________________________________
> > pbs-devel mailing list
> > pbs-devel@lists.proxmox.com
> > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
> >
> >
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2024-08-07 11:21 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 7:43 [pbs-devel] [PATCH v2 proxmox-backup 00/31] fix #3044: push datastore to remote target Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 01/31] api: datastore: add missing whitespace in description Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 02/31] server: sync: move sync related stats to common module Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 03/31] server: sync: move reader trait to common sync module Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 04/31] server: sync: move source " Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 05/31] client: backup writer: bundle upload stats counters Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 06/31] client: backup writer: factor out merged chunk stream upload Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 07/31] client: backup writer: add chunk count and duration stats Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 08/31] client: backup writer: allow push uploading index and chunks Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 09/31] api: backup: add no-timestamp-check flag to backup endpoint Christian Ebner
2024-08-07 10:33 ` Fabian Grünbichler
2024-08-07 10:48 ` Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 10/31] server: sync: move skip info/reason to common sync module Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 11/31] server: sync: make skip reason message more genenric Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 12/31] server: sync: factor out namespace depth check into sync module Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 13/31] api types: define remote permissions and roles for push sync Christian Ebner
2024-08-07 10:45 ` Fabian Grünbichler
2024-08-07 11:21 ` Fabian Grünbichler [this message]
2024-09-05 11:17 ` Christian Ebner
2024-09-05 12:12 ` Fabian Grünbichler
2024-09-05 12:26 ` Christian Ebner
2024-09-05 12:42 ` Fabian Grünbichler
2024-09-05 13:27 ` Christian Ebner
2024-09-05 14:06 ` Fabian Grünbichler
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 14/31] fix #3044: server: implement push support for sync operations Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 15/31] config: jobs: add `sync-push` config type for push sync jobs Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 16/31] api: push: implement endpoint for sync in push direction Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 17/31] api: sync: move sync job invocation to common module Christian Ebner
2024-08-07 10:51 ` Fabian Grünbichler
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 18/31] api: sync jobs: expose optional `sync-direction` parameter Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 19/31] bin: manager: add datastore push cli command Christian Ebner
2024-08-07 10:55 ` Fabian Grünbichler
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 20/31] ui: group filter: allow to set namespace for local datastore Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 21/31] ui: sync edit: source group filters based on sync direction Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 22/31] ui: add view with separate grids for pull and push sync jobs Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 23/31] ui: sync job: adapt edit window to be used for pull and push Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 24/31] ui: sync: pass sync-direction to allow removing push jobs Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 25/31] ui: sync view: do not use data model proxy for store Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 26/31] ui: sync view: set sync direction when invoking run task via api Christian Ebner
2024-08-01 7:43 ` [pbs-devel] [PATCH v2 proxmox-backup 27/31] datastore: move `BackupGroupDeleteStats` to api types Christian Ebner
2024-08-07 11:00 ` Fabian Grünbichler
2024-08-01 7:44 ` [pbs-devel] [PATCH v2 proxmox-backup 28/31] api types: implement api type for `BackupGroupDeleteStats` Christian Ebner
2024-08-01 7:44 ` [pbs-devel] [PATCH v2 proxmox-backup 29/31] datastore: increment deleted group counter when removing group Christian Ebner
2024-08-01 7:44 ` [pbs-devel] [PATCH v2 proxmox-backup 30/31] api: datastore/namespace: return backup groups delete stats on remove Christian Ebner
2024-08-01 7:44 ` [pbs-devel] [PATCH v2 proxmox-backup 31/31] server: sync job: use delete stats provided by the api Christian Ebner
2024-09-12 14:38 ` [pbs-devel] [PATCH v2 proxmox-backup 00/31] fix #3044: push datastore to remote target Christian Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=172302967643.107519.17362344441967210914@yuna.proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=c.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox