From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Daniel Kral <d.kral@proxmox.com>
Subject: [pve-devel] applied: [PATCH access-control] tests: api: add tests for expected output of get permissions endpoint
Date: Sun, 10 Nov 2024 20:09:50 +0100 [thread overview]
Message-ID: <4d768d1d-b2ae-4f16-a627-2540ef5d0f37@proxmox.com> (raw)
In-Reply-To: <20241106144813.189056-1-d.kral@proxmox.com>
Am 06.11.24 um 15:48 schrieb Daniel Kral:
> Adds test cases for the GET permissions API endpoint to ensure that:
>
> - users with the Sys.Audit perm can access any user's permissions
> - users with the Sys.Audit perm can access any token's permissions
> - users without the Sys.Audit perm can access their own permissions
> - users without the Sys.Audit perm can access their token's permissions
> - tokens with the Sys.Audit perm can access any user's permissions
> - tokens without the Sys.Audit perm can access their own permissions
>
> These tests also separate whether a token has the privilege-separated
> property or not.
>
> Signed-off-by: Daniel Kral <d.kral@proxmox.com>
> ---
> This is related to the following patch series and should be only applied
> after it:
>
> https://lore.proxmox.com/pve-devel/20241105083039.150454-1-f.gruenbichler@proxmox.com/
>
> Without the patch series above applied, test cases 2-4, 8, 13, 29 should
> fail, as these were not considered before.
A code review that results not only checking the changes but in a patch adding a
test harness? Impressive stuff that I gladly take, nice work!
>
> src/test/Makefile | 1 +
> src/test/api-get-permissions-test.cfg | 17 ++
> src/test/api-get-permissions-test.pl | 325 ++++++++++++++++++++++++++
> src/test/api-tests.pl | 12 +
> 4 files changed, 355 insertions(+)
> create mode 100644 src/test/api-get-permissions-test.cfg
> create mode 100644 src/test/api-get-permissions-test.pl
> create mode 100755 src/test/api-tests.pl
>
>
applied, thanks!
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2024-11-10 19:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 14:48 [pve-devel] " Daniel Kral
2024-11-10 19:09 ` Thomas Lamprecht [this message]
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=4d768d1d-b2ae-4f16-a627-2540ef5d0f37@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=d.kral@proxmox.com \
--cc=pve-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.