You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2017-07-27 17:28:59

bric38
Member
Registered: 2017-07-27
Posts: 2

Utilisation de l'API Rest avec un AUTOLOGON NTLM déporté sur un AD

Bonjour,

Voici mon problème : je souhaite utiliser l'API Rest GLPI (version 9.1) sur un serveur Web Apache 2.4, avec la configuration NTLMAuth activée (dans le fichier /etc/apache2/sites-available/glpi.conf). Cela ne fonctionne pas.

L'erreur se situe au niveau Apache (logique):
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Unauthorized</title>
</head><body>
<h1>Unauthorized</h1>
<p>This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
<hr>
<address>Apache/2.4.10 (Debian) Server at *********** Port 80</address>
</body></html>


Si je repasse en authentification basique (AuthType Basic), l'API est fonctionnelle.

Que dois-je faire au niveau Apache pour conserver l'authentification NTLM sur GLPI, mais indiquer que pour les accès à l'API Rest, l'authentification Basic doit être utilisée ?

Merci pour votre aide !

Offline

#2 2017-09-14 12:04:27

bric38
Member
Registered: 2017-07-27
Posts: 2

Re: Utilisation de l'API Rest avec un AUTOLOGON NTLM déporté sur un AD

Bon, j'ai pas mal cherché et finalement j'ai trouvé une solution qui fonctionne, je la poste en anglais.

The overall idea could be the following:
-    Allow NTLM authentication
-    Deny NTLM authentication for requests coming from the IP address of the server performing the access to the API

This comes back to the Apache configuration.
Example below was applied :

LoadModule auth_ntlm_module modules/mod_authn_ntlm.so

<Location />
    Satisfy All
    NTLMAuth On
    NTLMAuthoritative on

    Order deny,allow
    Allow from all
    Deny from <originator IP address>

</Location>

Offline

Board footer

Powered by FluxBB