You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ar...@apache.org on 2026/02/17 11:46:15 UTC

(tooling-trusted-releases) branch arm updated (76a4b9e1 -> 7406bb29)

This is an automated email from the ASF dual-hosted git repository.

arm pushed a change to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


 discard 76a4b9e1 Validate LDAP account of the initiating user when a task is started. Closes #663.
     new 7406bb29 Validate LDAP account of the initiating user when a task is started. Closes #663.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (76a4b9e1)
            \
             N -- N -- N   refs/heads/arm (7406bb29)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 atr/worker.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org


(tooling-trusted-releases) 01/01: Validate LDAP account of the initiating user when a task is started. Closes #663.

Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

arm pushed a commit to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git

commit 7406bb299f189ddc434924d302b711c0248fcd7f
Author: Alastair McFarlane <ar...@apache.org>
AuthorDate: Tue Feb 17 11:30:36 2026 +0000

    Validate LDAP account of the initiating user when a task is started. Closes #663.
---
 atr/worker.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/atr/worker.py b/atr/worker.py
index 190945b3..cb8efb72 100644
--- a/atr/worker.py
+++ b/atr/worker.py
@@ -35,6 +35,7 @@ from typing import Any, Final
 import sqlmodel
 
 import atr.db as db
+import atr.ldap as ldap
 import atr.log as log
 import atr.models.results as results
 import atr.models.sql as sql
@@ -219,6 +220,10 @@ async def _task_next_claim() -> tuple[int, str, list[str] | dict[str, Any], str]
 
 async def _task_process(task_id: int, task_type: str, task_args: list[str] | dict[str, Any], asf_uid: str) -> None:
     """Process a claimed task."""
+    import atr.config as config
+
+    conf = config.get()
+
     log.info(f"Processing task {task_id} ({task_type}) with raw args {task_args}")
     try:
         task_type_member = sql.TaskType(task_type)
@@ -229,6 +234,11 @@ async def _task_process(task_id: int, task_type: str, task_args: list[str] | dic
 
     task_results: results.Results | None
     try:
+        if asf_uid != "system" and not (conf.ALLOW_TESTS and asf_uid == "test"):
+            user_account = await ldap.account_lookup(asf_uid)
+            if user_account is None or ldap.is_banned(user_account):
+                raise RuntimeError(f"Account '{asf_uid}' is banned or does not exist")
+
         handler = tasks.resolve(task_type_member)
         sig = inspect.signature(handler)
         params = list(sig.parameters.values())


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org