From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eF1BNJBzxGIdhgEAbAwnHQ (envelope-from ) for ; Tue, 05 Jul 2022 19:23:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id IAxQM5BzxGIKUgAAG6o9tA (envelope-from ) for ; Tue, 05 Jul 2022 19:23:28 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 61D7F13C86 for ; Tue, 5 Jul 2022 19:23:28 +0200 (CEST) Received: from localhost ([::1]:44106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8mGl-0005nG-0Z for larch@yhetil.org; Tue, 05 Jul 2022 13:23:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8mGN-0005la-37 for guix-patches@gnu.org; Tue, 05 Jul 2022 13:23:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57659) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8mGM-0000kj-QN for guix-patches@gnu.org; Tue, 05 Jul 2022 13:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8mGM-0007KD-LN for guix-patches@gnu.org; Tue, 05 Jul 2022 13:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56404] [PATCH 0/2] gnu: Add python-msal and oauth2ms. Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 Jul 2022 17:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56404 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56404@debbugs.gnu.org X-Debbugs-Original-To: Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.165704177228126 (code B ref -1); Tue, 05 Jul 2022 17:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Jul 2022 17:22:52 +0000 Received: from localhost ([127.0.0.1]:51556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8mGC-0007JZ-BE for submit@debbugs.gnu.org; Tue, 05 Jul 2022 13:22:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:41578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8mGA-0007JP-2T for submit@debbugs.gnu.org; Tue, 05 Jul 2022 13:22:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8mG9-0005aO-TC for guix-patches@gnu.org; Tue, 05 Jul 2022 13:22:49 -0400 Received: from mail-4316.protonmail.ch ([185.70.43.16]:21665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8mG7-0000ig-HG for guix-patches@gnu.org; Tue, 05 Jul 2022 13:22:49 -0400 Date: Tue, 05 Jul 2022 17:22:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1657041756; x=1657300956; bh=ZLLwyMt3ZV5kZpD87GRDAfIGvN5TEWrlXYlKgYNhWlw=; h=Date:To:From:Reply-To:Subject:Message-ID:Feedback-ID:From:To:Cc: Date:Subject:Reply-To:Feedback-ID:Message-ID; b=IBk4VYaVTUxlo5oLPAbOBUz1kLyTxuk4HN9p9qJMZlaM8ykwB2c7XS2F8Ap4BohiZ 6mufGQUoqxeeb3TRHhcS2dYsiChct3DEzRJJ/LF7g5GUsyikZT3Rj5aDs+KukHn7dO ef/6YkhDRarlkJ98QU8SEfvmH6bat6mgw5uP32LjNW8EMwiSM3U9xe8ZG42e4iJZpL DW5ORJHhI+1BSwDMQaJs1Mb3IK2ErnPWHlsjpS/4Lgs9wByllSlgHI8MRqbDCI6DuF C04uRAcpdQOLmyq+jnjW/+HcxmNsSRWUhCXIMuPxhVLw9BjOTxrqg46UhD0ZJGllrw 8B5CqMCSUTQ8A== Message-ID: Feedback-ID: 7805494:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.16; envelope-from=john.kehayias@protonmail.com; helo=mail-4316.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches From: John Kehayias via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1657041808; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ZLLwyMt3ZV5kZpD87GRDAfIGvN5TEWrlXYlKgYNhWlw=; b=lp/xe+xU5dg1rSmFy3Xj4zopEHTL+eAM+wBAz8TQ1VV9gAr8AkirSmFHRhm9ZazM2ethnV e7dKKyOllQtOJQQWVWGoBGxNjRrPsR44+4AILw1zPJG0tg6umKHZ9dtzpD5ZM+w/7djJKR iVUzaDFil3EQekdOIG50tvhVmIpwMJjs37JbV3eRS0WKUyFCwESkYHZ//8Qu1G6TkWPvlA ORq1LB4GcJKTZ2pUIz1tjSjC8w/sn6kUEWszY8fKoxorQ9HwdDad9xEIl128+pY2FPd0c4 WOPEEdTVMBdm7lBMa3FeZmlfcEbLHPoUuK/CIIg4jZLUw7h1VkFNVL+Yh/M1YQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657041808; a=rsa-sha256; cv=none; b=giO2DodeZBWXD88YrYS8okXM56xxBadWhH+OGdYjbxFDt78sMIL2AFb+Qt7YdPcm/D1FfJ +P78bw15dWKuJCfbIuw1oOfHc4IAY02fFeSYdstjmNt66Ee8HHqq3xO7Mli3UK7n4Xoxj5 IJ/+7f1SWJD90e2RsxREHooL1EnkzwbRTz0NCgfEtajUBbJuf9W6ovkq4/5uvMHMuArSQI 5A8ISyj64h0385E1stDakUSa1TX+n8cYIB54o2GpCe4rdbLyrL7Y1V6KEDpoG/EZZELXPM MG/phYszgY6y7Oxr4bIyetgVp5Xwdz0XREa849fQ0ASleqL0xb0aEvtlP4U0ig== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=IBk4VYaV; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.65 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=IBk4VYaV; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 61D7F13C86 X-Spam-Score: -3.65 X-Migadu-Scanner: scn1.migadu.com X-TUID: mrtCnLdV8bAS Hello Guix, Here are two straight forward patches to add python-msal and oauth2ms. Shor= t commentary: 1. python-msal: a package for Microsoft authentication tokens. Tests were d= isabled because most/all needed network access, and could only disable some= of these tests with an environment variable. I did use the GitHub source s= ince it includes tests, in case this can be better worked around in the fut= ure, or if using the source directly. 2. oauth2ms: a python script to use msal in order to have usable tokens, li= ke needing oauth2 tokens for getting/sending mail with multi-factor authent= ication required email services. I copied the readme and steps.org which ha= ve documentation for setting this up to the appropriate doc folder. There i= s no release or version tag and the script needed to be wrapped. As a final note, I've used this to send mail through my university email se= rver that uses Microsoft Office 365 with multi-factor authentication (so yo= u can't use your password or an app password). oauth2ms provides instructio= ns for doing this in emacs, which I used for mu4e. And if you can't create = the needed keys in Azure (as I couldn't) you can use Thunderbird's https://= hg.mozilla.org/comm-central/file/tip/mailnews/base/src/OAuth2Providers.jsm#= l127 along with your providers "tenet id" which I could find by logging on = to Azure even without permissions to create an app. Hope someone else finds this useful! John