Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test Google SSO SAML on Localhost

The ACS url in the Google SSO SAML setup where Google is the Identity Provider has to start with https. Therefore, I've not been able to use a localhost url. Is there a way how I could test Google SSO SAML on a local server? What url (or other details) do I need to enter?

like image 518
Vincent Avatar asked Jun 13 '19 13:06

Vincent


2 Answers

So, Google SAML app (Google is the Identity Provider) forces you to enter an ACS url starting with https://*. Therefore, I was unable to enter a http://localhost url. I used the django demo from the python3-saml package to integrate SAML SSO into my app.

To get an https url pointing to my localhost server I used ngrok, which gives you an https and http link for the url to your localhost. That https url can be entered in the ACS url and Entity url in Google Admin. enter image description here The django demo uses url parameters to redirect the user to the logged in view, but that didnt work for me using ngrok. So, I decided to render the logged in view on a seperate url /sso/logged-in/ instead of /sso/?acs.

like image 131
Vincent Avatar answered Oct 23 '22 22:10

Vincent


ngrok is used to expose apps on your localhost to the internet with a single easy command.

./ngrok http 3000

When the above command is typed in the terminal a window will open in terminal which will tell the public url that you can access through the internet to connect to an app hosted on port 3000 on your localhost. For more information,kindly look into https://ngrok.com/

Kindly upvote if it helped you!!

like image 43
Uttamraj Rangapur Avatar answered Oct 23 '22 21:10

Uttamraj Rangapur