-
-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an authentication plugin to cyrus sasl for XOAUTH2 #108480
Comments
Second this. A simple |
In the meantime, I use the following hack to get
This hack is not ideal (has to build a separate |
edit: remove question add link |
cyrus sasl has a SASL_PATH environment variable for specifying a colon separated list of directories to search for plugins. I don't know if this is the best way, but I've put the following in an overlay, and other than having to compile the cyrus-sasl-xoauth2 plugin, nothing else needs to be build:
|
(libsForQt5.kdepim-runtime.overrideAttrs (finalAttr: previousAttrs: {
qtWrapperArgs = [ ''--prefix SASL_PATH : ${pkgs.cyrus_sasl}/lib/sasl2:${pkgs.libsForQt5.libkgapi}/lib/sasl2'' ];
})) It probably should propagate somehow from |
Here's the full overlay i use, based on the example above, including compilation of moriyoshi/cyrus-sasl-xoauth2: (self: super: {
cyrus-sasl-xoauth2 = super.pkgs.stdenv.mkDerivation rec {
pname = "cyrus-sasl-xoauth2";
version = "master";
src = super.pkgs.fetchFromGitHub {
owner = "moriyoshi";
repo = "cyrus-sasl-xoauth2";
rev = "master";
sha256 = "sha256-OlmHuME9idC0fWMzT4kY+YQ43GGch53snDq3w5v/cgk=";
};
nativeBuildInputs = [super.pkg-config super.automake super.autoconf super.libtool];
propagatedBuildInputs = [super.cyrus_sasl];
buildPhase = ''
./autogen.sh
./configure
'';
installPhase = ''
make DESTDIR="$out" install
'';
meta = with super.pkgs.lib; {
homepage = "https://github.com/moriyoshi/cyrus-sasl-xoauth2";
description = "XOAUTH2 mechanism plugin for cyrus-sasl";
};
};
# https://github.com/NixOS/nixpkgs/issues/108480#issuecomment-1115108802
isync-oauth2 = super.buildEnv {
name = "isync-oauth2";
paths = [super.isync];
pathsToLink = ["/bin"];
nativeBuildInputs = [super.makeWrapper];
postBuild = ''
wrapProgram "$out/bin/mbsync" \
--prefix SASL_PATH : "${super.cyrus_sasl.out.outPath}/lib/sasl2:${self.cyrus-sasl-xoauth2}/usr/lib/sasl2"
'';
};
}) In combination with |
Hey I've been following this issue for a while but don't really see how I'd setup my config to use xoauth2 with the updates from #199985 Are there any docs/examples on using the new setup? Or another issue to follow? |
I use this in a wrapper of It would be good idea to integrate this directly into |
Add XOAUTH2 plugin to cyrus sasl suite of auth mechanisms
adding a plugin to cyrus_sasl
Let's add for example this plugin https://github.com/moriyoshi/cyrus-sasl-xoauth2 to the list of authentication mechanisms. One example use case is to allow mbsync (isync) to authenticate against outlook office365's IMAP server, or Google's.
As https://www.cyrusimap.org/sasl/sasl/developer/plugprog.html mentions:
So there's a trick to make the plugin auto-discovered, I can see some options:
/run/current-system/sw/lib
to group all plugin libsMetadata
The text was updated successfully, but these errors were encountered: