From patchwork Tue Jul 5 17:22:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 837 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BF95E27BBEA; Tue, 5 Jul 2022 18:23:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 69AE027BBE9 for ; Tue, 5 Jul 2022 18:23:20 +0100 (BST) Received: from localhost ([::1]:44106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8mGd-0005nG-KN for patchwork@mira.cbaines.net; Tue, 05 Jul 2022 13:23:19 -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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias X-getmail-retrieved-from-mailbox: Patches Hello Guix, Here are two straight forward patches to add python-msal and oauth2ms. Short commentary: 1. python-msal: a package for Microsoft authentication tokens. Tests were disabled because most/all needed network access, and could only disable some of these tests with an environment variable. I did use the GitHub source since it includes tests, in case this can be better worked around in the future, or if using the source directly. 2. oauth2ms: a python script to use msal in order to have usable tokens, like needing oauth2 tokens for getting/sending mail with multi-factor authentication required email services. I copied the readme and steps.org which have documentation for setting this up to the appropriate doc folder. There is 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 server that uses Microsoft Office 365 with multi-factor authentication (so you can't use your password or an app password). oauth2ms provides instructions 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