External authentication module for ejabberd on Windows


David Comer

How to get ejabberd to run external authentication scripts on Windows?

So far I have modified the file

C:\ Program Files \ ejabberd-15.06 \ lib \ ejabberd-15.06 \ priv \ cfg \ ejabberd.yml

Comment out the existing auth_method directive and add the following:

auth_method: external
extauth_program: "D:\\DROPBOX\\Dropbox (Personal)\\EJABBERD\\auth\\ejabberd-auth.exe"

However, when I try to connect to the server, I don't see anything in the logs indicating an attempt to run the script. I even tried changing it to a non-existing file to see if some sort of error would be logged, but nothing.

All I get are logs of type "Connections Accepted".

In case it matters - I do get some "unknown options" errors at startup, including "ejabberd_config: validate_opts: 752 Unknown option 'auth_method' may be ignored" - however, this seems to be a known, Appearance-only bug (see: https://github.com/processone/ejabberd/issues/630 )

Mickaël Remond

I don't use Windows, however, you should try Erlang open_portcommands:

 open_port({spawn, "YOURCOMMAND"}, [{packet, 2}]).

Note that the open_portErlang documentation says:

For external programs, the PATH is searched (or the equivalent is used to find the program, depending on the operating system). This is done by invoking the shell on some platforms. The first space-separated token of the command will be treated as the name of the executable (or driver). This (among other things) makes this option unsuitable for running programs with spaces in the file or directory name.

I see there are spaces in your path. That alone makes it practically impossible to invoke your command.

That said, the external_auth command has never been tested on Windows. You may need to patch the ejabberd command to make this authentication work through an external process. I'd be surprised if it worked as is.

Related


External authentication module for ejabberd on Windows

David Comer How to get ejabberd to run external authentication scripts on Windows? So far I have modified the file C:\ Program Files \ ejabberd-15.06 \ lib \ ejabberd-15.06 \ priv \ cfg \ ejabberd.yml Comment out the existing auth_method directive and add the

External authentication module for ejabberd on Windows

David Comer How to get ejabberd to run external authentication scripts on Windows? So far I have modified the file C:\ Program Files \ ejabberd-15.06 \ lib \ ejabberd-15.06 \ priv \ cfg \ ejabberd.yml Comment out the existing auth_method directive and add the

ejabberd external authentication php sqlserver

Kasaf I have an ejabberd 15.03 server in a centOS virtual machine and I need to implement an external authentication method with php against SQL Server. The official documentation shows a php/mysql example php/mysql external authentication Is there a way to ch

ejabberd external authentication php sqlserver

Kasaf I have an ejabberd 15.03 server in a centOS virtual machine and I need to implement an external authentication method with php against SQL Server. The official documentation shows a php/mysql example php/mysql external authentication Is there a way to ch

External authentication in ejabberd using Java

Venkas I am working on a task to implement external authentication in ejabberd using Java. I've searched the internet for examples and found examples in PHP, Perl, Python, but nothing in Java. I know the configuration that needs to be done in the 'ejabberd.cfg

ejabberd external authentication php sqlserver

Kasaf I have an ejabberd 15.03 server in a centOS virtual machine and I need to implement an external authentication method with php against SQL Server. The official documentation shows a php/mysql example php/mysql external authentication Is there a way to ch

ejabberd external authentication php sqlserver

Kasaf I have an ejabberd 15.03 server in a centOS virtual machine and I need to implement an external authentication method with php against SQL Server. The official documentation shows a php/mysql example php/mysql external authentication Is there a way to ch

IIS Rewrite Module Windows Authentication

etcvvvvvvvvvvvv I have two asp.net web applications. One of the applications is the main mvc web application and the second is a web application that acts as a reverse proxy and contains only one file - web.config. The reverse proxy does not have any authentic

JWT authentication in ejabberd

AD95 I have followed this documentation ejabberd authentication to configure the ejabberd service to use jwt tokens to authenticate users . In the ejabberd.yml file, I have configured the authentication mechanism as follows `auth_method: [jwt, sql] jwt_key: /

ejabberd module compilation error

Sun_Sparxz I am new to ejabberd and trying to add a new module for offline_message_posturl on windows server. I can't find any blog posts specifically for Windows other than the following. I am using ejabberd version 15.07. I've been following this blog post :

ejabberd module compilation error

Sun_Sparxz I am new to ejabberd and trying to add a new module for offline_message_posturl on windows server. I can't find any blog posts specifically for Windows other than the following. I am using ejabberd version 15.07. I've been following this blog post :

ejabberd module compilation error

Sun_Sparxz I am new to ejabberd and trying to add a new module for offline_message_posturl on windows server. I can't find any blog posts specifically for Windows other than the following. I am using ejabberd version 15.07. I've been following this blog post :

ejabberd module compilation error

Sun_Sparxz I am new to ejabberd and trying to add a new module for offline_message_posturl on windows server. I can't find any blog posts specifically for Windows other than the following. I am using ejabberd version 15.07. I've been following this blog post :

ejabberd module compilation error

Sun_Sparxz I am new to ejabberd and trying to add a new module for offline_message_posturl on windows server. I can't find any blog posts specifically for Windows other than the following. I am using ejabberd version 15.07. I've been following this blog post :

ejabberd module compilation error

Sun_Sparxz I am new to ejabberd and trying to add a new module for offline_message_posturl on windows server. I can't find any blog posts specifically for Windows other than the following. I am using ejabberd version 15.07. I've been following this blog post :

ejabberd module compilation error

Sun_Sparxz I am new to ejabberd and trying to add a new module for offline_message_posturl on windows server. I can't find any blog posts specifically for Windows other than the following. I am using ejabberd version 15.07. I've been following this blog post :

ejabberd module compilation error

Sun_Sparxz I am new to ejabberd and trying to add a new module for offline_message_posturl on windows server. I can't find any blog posts specifically for Windows other than the following. I am using ejabberd version 15.07. I've been following this blog post :

Pre-authentication steps in ejabberd

Shubham 1164 I'm working on a whatsapp-like project and using ejabberd as a backend server for Android/IOS clients. I want to do something like step 1 for whatsapp. The client sends the mobile number to the server. 2. The server sends an OTP to the client and

How to get module value in ejabberd

username How can I get the value of a module in ejabberd, I mean the current module my control is in, and secondly is it any pointer to extract it as a string or binary? Geeks Module_value=? MODULE. The value will be given as a string. You can convert it to bi

Custom module in Ejabberd not getting called

Pape original I've been trying to adapt the open Ejabberd module (mod_offline_http_post) (for previous versions) to the current version (20.04) for several days now. For example, some parts are now important, like both mod_options and mod_depends need to be ex

Custom module in Ejabberd not getting called

Pape original I've been trying to adapt the open Ejabberd module (mod_offline_http_post) (for previous versions) to the current version (20.04) for several days now. For example, some parts are now important, like both mod_options and mod_depends need to be ex

Custom module in Ejabberd not getting called

Pape original I've been trying to adapt the open Ejabberd module (mod_offline_http_post) (for previous versions) to the current version (20.04) for several days now. For example, some parts are now important, like both mod_options and mod_depends need to be ex

Custom module in Ejabberd not getting called

Pape original I've been trying to adapt the open Ejabberd module (mod_offline_http_post) (for previous versions) to the current version (20.04) for several days now. For example, some parts are now important, like both mod_options and mod_depends need to be ex

How to get module value in ejabberd

username How can I get the value of a module in ejabberd, I mean the current module my control is in, and secondly is it any pointer to extract it as a string or binary? Geeks Module_value=? MODULE. The value will be given as a string. You can convert it to bi

Custom module in Ejabberd not getting called

Pape original I've been trying to adapt the open Ejabberd module (mod_offline_http_post) (for previous versions) to the current version (20.04) for several days now. For example, some parts are now important, like both mod_options and mod_depends need to be ex