NodeJS + NGINX securing image files - node.js

I already configured nginx with nodejs and it's working perfectly as a reverse proxy, after that I put an authentication (username, password) in nginx to protect those photos from outside, how can i make a request to access those photos? I mean what request I need to create to authenticate input username and password? (WITH NGINX)
ps: I saw that would be nice to use jwt but I'm afraid to install openresty and lost my previous configuration of nginx.
What would be better? Configure jwt or try to authenticate with a user and pass in nginx?

Related

How to secure Angular (accessType- Public) and Nodejs app (accesType- bearer-only) with keyCloak

i am trying to integrate keyCloak in my application, i have created a Realm name "my-app" and added 2 clients
frontend (accessType -public)
backend (accessType - bearer-only)
I want to use the access token (returned from frontend client) to authenticate backend APIs.
i want to achieve same thing explained in this tutorial by making use of Roles, Client Scopes and mappers but not working for me
https://medium.com/devops-dudes/secure-front-end-react-js-and-back-end-node-js-express-rest-api-with-keycloak-daf159f0a94e
i made a mistake in configuration,
on frontend side i made url for auth server "http://127.0.0.1:8080/auth" and on Server side it was "http://localhost:8080/auth", else everything was correct

Configuring NGINX to work with SAML Signing Certificate

I've built an app using PHP (Laravel), and now we've deployed it to a client who wants to use Azure Single Sign On rather than the apps native username/password functionality.
The plan is for them to handle the SSO authentication via App Registration, and then send user details via a SAML request.
However the 'SAMLResponse' I get is encoded. They have sent me a .cer file (and an XML file for some reason), and I think I need to apply these to the server, but I don't know how.
The below is the setup their end, and I've red highlighted the files they've sent me.
I have full control over the server, which is Ubuntu 18.04 running NGINX. They also handle the SSL side of things separately, so NGINX is currently listening on port 80.

Authenticate Firebase JWT token on server running NGINX + Node.JS

I have a server hosting an NGINX front-end and a Node.JS back-end.
Scenario: The server needs to pass each request containing the JWT token to the Node.JS back-end which will validate the token using the Firebase SDK and if the token authenticates then it should pass the flow back to NGINX which should continue with the reverse proxy and route accordingly.
So far I have managed to set up the NGINX as a reverse-proxy which works effectively. I am confused as to how to pass the token to nginx for authentication and back to nginx to continue with the reverse proxy if verified.
I found a solution to my problem.
I've created a public repository on GitHub; feel free to use it or fork and improve.
Fire-Guard-Proxy

How to secure an https post

I am trying to secure an https post service through a username/password authentication (Basic authentication). But so far I am not able to figure out how I can secure my service on the server side and force the username/password combination for the clients. I get that using httpclienthandler/httpclient/networkcredentials you can access the server, but how to force it on the server side and send appropriate unauthorized access errors etc.
Any directions or links using C#?
It seem there is the AuthenticationFilter, what I was looking for..
Here is a good amount of detail here;

Windows authentication through a reverse proxy problem

Have a IIS Reverse proxy redirect on specific request on WebSite with windows authentication and impersonation to another local site with win.auth + impersonation.
Reverse proxy and the web application placed on a different machines and iis versions (proxy- IIS 7.5 , webApp IIS6) and the same domain.
Requests through the reverse proxy does not allow the user to be authenticated on the remote server. has an infinite authentication request.
This is inherent to the way windows authentication (NTLM) works: the password is never sent, authentication is done with a salted hash of the password, so the first server can authenticate the user but cannot re-use those credentials to impersonate the same user on a remote server (since without the password it cannot authenticate).
Look at this blog post to get more information about this problem (which is known as "double-hop problem").

Resources