We are currently using an NGINX server as a reverse proxy for a variety of services and applications. It is handling and proxying traffic to a web application we have created, an API Proxy server, as well as a separate programmatic API. Below is a sample diagram showing the resources behind the proxy.
foobar.com |-foobar.com/api |-foobar.com/webapp |-foobar.com/proxy
We have a corporate AD system with Single-Sign On capabilities. I am trying to integrate this with the NGINX reverse proxy to authenticate users when the access one or more of these services behind NGINX.
I have seen posts like https://www.nginx.com/blog/nginx-plus-authenticate-users/ describe how to have NGINX use AD Authentication of users by having users fill out a login form, but this will not work for our use case. This is because some of these users will be interacting with the API service and the proxy service via HTTP CRUD operations and/or curl commands. In addtion, these API and proxy users may belong to other applications and not human beings. In that sense, they are fully programmatic interactions.
How can I configure NGINX to support both Human and Programmatic AD Authentication?