Ho un server Apache in cui è richiesta l'autenticazione, ma ci sono alcune chiamate che devono essere consentite per tutti.Autorizzazioni Apache basate su querystring
on off queste chiamate si basa su una stringa di query, ad esempio:
/foo/api.php?Token=123 & task = DoStuff & Risultato = json
ho insegnato che con un LocationMatch che avrebbe funzionato così ho risolto questa configurazione:
<LocationMatch ^/foo/api.php\?.*(Task=DoStuff).*>
Order Allow,Deny
Allow from All
</LocationMatch>
Ma questo non mi lascia passare il autenticazione (nel senso che ottengo un 401). Se ho appena filtrato ^/foo/api.php
ho passato l'autenticazione, ma questo non è abbastanza severo.
Qualcuno ha qualche idea su come configurarlo per verificare il parametro Task nella querystring?
Per l'autenticazione che stiamo utilizzando Kerberos, questo è costretto su tutto il sito Questa è la nostra conf per frenare
LoadModule auth_kerb_module modules/mod_auth_kerb.so
<Directory /var/www/html>
Options FollowSymLinks
AllowOverride All
AuthType Kerberos
Require valid-user
AuthName "Kerberos Login"
KrbMethodNegotiate on
KrbMethodK5Passwd on
KrbAuthRealms FOO.LOCAL
KrbServiceName HTTP/[email protected]
Krb5KeyTab /etc/httpd/conf/http.keytab
Satisfy Any
Order deny,allow
Deny from all
Allow from 192.168.72.90
Allow from 192.168.72.91
Allow from 192.168.72.94
Allow from 192.168.72.95
Allow from 127.0.0.1
</Directory>
guarderò in questo, avrei dovuto aggiungere che stiamo utilizzando auth_kerb per l'autenticazione, il problema ora che sto avendo è che sta facendo auth_kerb prima e poi mod_rewrite – Frederiek
@Frederiek è la direttiva 'AuthType Kerberos' nel tuo file di configurazione di apache all'interno o all'esterno della sezione' LocationMatch'? Puoi eventualmente fornire ulteriori dettagli sulla configurazione che stai utilizzando? Forse [questa risposta] (http://serverfault.com/questions/404149/how-can-i-disable-kerberos-authentication-for-only-the-root-of-my-site) potrebbe anche essere utile. –
Vedi modifica nella domanda originale. ho incluso il file conf – Frederiek