nginx basic auth backed on server - nginx

I know nginx provide a way to login using basic authentication (with a password file). I wanted to know if there is a way to delegate the authentication to a dedicated server.
Here is the process I want to pursue :
- The user try to access to the nginx server without auth.
- Nginx ask for username and password.
- Nginx request the dedicated server with the provided credentials.
- If ok, nginx create a new basic auth for the user, and let the user pass in.
Thank you

Related

FTP Server integration with LDAP

I'm trying to authenticate vsftpd from LDAP(openldap) logins which hosted remotely another server.
i.e.: We have a LDAP server and new users are created on them. I'd like to know if it is possible to use the same ldap users credential to authenticate and log in into the FTP server as I am unable to do that.
TIA
I have a scenario slightly different, but probably can work in you case.
In my case, we have a Windows Domain and we use SSSD to authenticate in the domain. There is no need any change in vsftpd.
My guess is if you set up the sssd authenticating to your LDAP server, it will work.
There is a tutorial here for Ubuntu: https://ubuntu.com/server/docs/service-sssd-ldap

IIS - Require SSL Client Cert for specific MVC Controller

I found this answer on how to use Web.Config to make IIS require SSL client certs for a specific MVC controller but I can't figure out how to make it work if the user visits any other controller first.
The purpose of this requirement is that the client certificate is only used for login to access secured portions of the application. Users who are not logging in should not be prompted for a certificate.
Example: SSL cert required for Auth controller
If the user goes directly to domain.com/Auth they are prompted for a certificate as intended. However, if the user goes to domain.com/Home then clicks Sign On (sending them to the Auth controller) they receive a response of HTTP 403.7 indicating the site requires a client certificate.
Turned out to be a browser caching issue.

Using SPNEGO and LTPA in WebSphere

General question. Server admin setup SPNEGO. The LTPA bullet is marked under Global Security in admin console. My understanding is that SPNEGO captures username from an initial sign-on (ie network). Later, if user goes to an app's URL, few of the many things happening is SPNEGO is going through user's ldap groups (admin console-securtity roles) trying to find group that is tied to app's role names. If match is found, user authorized and can go directly into app without having to use login form to enter credentials. But have problem trying to implement this. Checking HttpServletRequest - getUserPrincipal().getName() and getRemoteUser() at front end of app are coming up null. If SPNEGO is in fact setup correctly, should a null ever be found?
You are confusing a few things. SPNEGO is a mechanism to pass user authenticated in the Kerberos realm to the given service without need to pass user password. It has nothing to do with authorization - this part is done by WebSphere security service based on the id retrieved from the request (in short).
Null username usually is effect of not enabling Application Security in the server or not protecting application with Java EE security (security constraints defined in the web.xml).
For some basic information about SPNEGO in WebSphere, check the following page Single sign-on for HTTP requests using SPNEGO web authentication

automatic user login by reverse proxy

Given is an application behind a Nginx configured as reverse proxy. The application requires user login via a web form and HTTP POST. Is there a possibility to provide the credentials of a generic technical user to Nginx and let it automatically do a login, so that users don't have to login explicitly anymore?
It might be tough without some kind of module :) but If it is an internal application you might tell nginx to to add certain headers to every request and authenticate by them. But if it is a production app I wouldn't go this path :)

Windows authentication with ActiveDirectoryMembershipProvider

I have an issue with my website authentication.
I'm building an website that needs to use the same single sign on as an intranet site.
My idea was to use windows authentication on the website to get the user credentials and then use LDAP to authenticate them against our client's Domain controller.
The website in question is hosted on a server outside the client's domain.
I've tried using the ActiveDirectoryMembershipProvider but i cannot get it to work with integrated authentication.
My issue is that my i cannot get windows authentication to use LDAP as a membership provider. At the moment, windows authentication gets the user credentials, tries to authenticate them against users on the computer and fails as the web server is not on the domain. I want to get the credentials and send them using LDAP to a domain controller that will authenticate them.
Is there a way i can do integrated authentication using and LDAP connection for authentication?
Updated
If your website is Hosted on the Server outside the Client's Domain then you can not get the User Authenticated.
Because when you send the Credential to the Hosted Server there is a Location object in the Domain Server, and it will try to find that specified User first locally where you have hosted your website and then to the Doamin Server that have been specified in location(though we can also set the priority)
If it doesn't found any user locally then
After that it will Send request to the Domain Server with those Credentials.
In your case First it will not found that Domain Server name in the location object to which you want it to communicate with.
For ex:
PrincipalContext pr = new PrincipalContext(ContextType.Domain, "corp.local", "dc=corp,dc=local", username, password);
Here Corp.Local is the Domain name which is in my Location object and Username and Password of that user which have administrative rights for Edit/Update/Delete any user in Domain server.
So the whole process goes again and when the specified Domain Server is found in the Location object then it will make communication with that Domain and generate a TOKEN
The Only Solution for your case is that you need to replicate all your user from Client Server to your Domain Server or else you need to make TRUST between two domain servers.
Hope this is what you are looking for.!!

Resources