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/04/22 15:15:35 UTC
(tooling-trusted-releases) branch arm updated (9328015c -> 4c85556f)
This is an automated email from the ASF dual-hosted git repository.
alitheg pushed a change to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
discard 9328015c #1028 - Send email on revocation of SSH key
add 1342551a Bump actions/cache from 5.0.4 to 5.0.5
new 4c85556f #1028 - Send email on revocation of SSH key
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 (9328015c)
\
N -- N -- N refs/heads/arm (4c85556f)
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:
.github/workflows/analyze.yml | 2 +-
.github/workflows/build.yml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org
(tooling-trusted-releases) 01/01: #1028 - Send email on revocation of SSH key
Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alitheg pushed a commit to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
commit 4c85556f5012c9da6e93ec0139205ff766e4f8dc
Author: Alastair McFarlane <ar...@apache.org>
AuthorDate: Wed Apr 22 16:06:08 2026 +0100
#1028 - Send email on revocation of SSH key
---
atr/mail.py | 1 +
atr/storage/writers/ssh.py | 9 +++++++++
atr/storage/writers/tokens.py | 10 +++-------
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/atr/mail.py b/atr/mail.py
index b05684b2..07b3c90c 100644
--- a/atr/mail.py
+++ b/atr/mail.py
@@ -39,6 +39,7 @@ _APACHE_DOMAIN: Final[str] = "apache.org"
_MAIL_RELAY: Final[str] = "mail-relay.apache.org"
_SMTP_PORT: Final[int] = 587
_SMTP_TIMEOUT: Final[int] = 30
+NOREPLY_EMAIL_ADDRESS: Final[str] = f"noreply@{_APACHE_DOMAIN}"
MailFooterCategory = models_mail.MailFooterCategory
diff --git a/atr/storage/writers/ssh.py b/atr/storage/writers/ssh.py
index 7c7d3eae..620a2265 100644
--- a/atr/storage/writers/ssh.py
+++ b/atr/storage/writers/ssh.py
@@ -23,6 +23,7 @@ import time
import sqlmodel
import atr.db as db
+import atr.mail as mail
import atr.models.github as github
import atr.models.safe as safe
import atr.models.sql as sql
@@ -67,6 +68,14 @@ class FoundationCommitter(GeneralPublic):
).demand(storage.AccessError(f"Key not found: {fingerprint}"))
await self.__data.delete(ssh_key)
await self.__data.commit()
+ message = mail.Message(
+ email_sender=mail.NOREPLY_EMAIL_ADDRESS,
+ email_to=f"{self.__asf_uid}@apache.org",
+ subject="ATR - Deleted SSH key",
+ body=f"In ATR an SSH key with fingerprint '{fingerprint}' was deleted from your account. "
+ "If you did not make this change, please contact ASF Tooling.",
+ )
+ await self.__write_as.mail.send(message, mail.MailFooterCategory.AUTO)
class CommitteeParticipant(FoundationCommitter):
diff --git a/atr/storage/writers/tokens.py b/atr/storage/writers/tokens.py
index 90d31a4e..f0a93409 100644
--- a/atr/storage/writers/tokens.py
+++ b/atr/storage/writers/tokens.py
@@ -21,7 +21,6 @@ from __future__ import annotations
import asyncio
import datetime
import hashlib
-from typing import Final
import sqlmodel
@@ -34,9 +33,6 @@ import atr.models.sql as sql
import atr.storage as storage
import atr.storage.types as types
-# TODO: Check that this is known and that its emails are correctly discarded
-NOREPLY_EMAIL_ADDRESS: Final[str] = "noreply@apache.org"
-
class GeneralPublic:
def __init__(
@@ -78,7 +74,7 @@ class FoundationCommitter(GeneralPublic):
await self.__data.commit()
log.auth_event("pat_issuance", self.__asf_uid, pat_hash=pat.token_hash)
message = mail.Message(
- email_sender=NOREPLY_EMAIL_ADDRESS,
+ email_sender=mail.NOREPLY_EMAIL_ADDRESS,
email_to=f"{self.__asf_uid}@apache.org",
subject="ATR - New API Token Created",
body=f"In ATR a new API token called '{label}' was created for your account. "
@@ -106,7 +102,7 @@ class FoundationCommitter(GeneralPublic):
log.auth_event("pat_deleted", self.__asf_uid, pat_hash=pat.token_hash)
label = pat.label or "[unlabeled]"
message = mail.Message(
- email_sender=NOREPLY_EMAIL_ADDRESS,
+ email_sender=mail.NOREPLY_EMAIL_ADDRESS,
email_to=f"{self.__asf_uid}@apache.org",
subject="ATR - Deleted API Token",
body=f"In ATR an API token called '{label}' was deleted from your account. "
@@ -219,7 +215,7 @@ class FoundationAdmin(FoundationCommitter):
)
log.auth_event("pat_bulk_revoke", target_asf_uid, by=self.__asf_uid)
message = mail.Message(
- email_sender=NOREPLY_EMAIL_ADDRESS,
+ email_sender=mail.NOREPLY_EMAIL_ADDRESS,
email_to=f"{target_asf_uid}@apache.org",
subject="ATR - Security alert: API tokens revoked by administrator",
body=f"An administrator has revoked all API tokens ({count}) for your ATR account. "
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org