I'm currently looking for some software that user can login on the webserver, but for the scripts, it doesn't look too different from basic auth.

One example of that kind is webauth, however that requires that all user accounts are in kerberos. I however want to continue to keep accounts in ldap, because that works well for most issues.

So, my next step is either to set up kerberos in a way that allows the accounts to be synced with ldap, or find another software with the same effect.