-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to create a SSO service? #28
Comments
Hey @kinwoon, I'm assuming that you've watched my PyCon talk.
If you're following a particular protocol (like OAuth), you have to follow its guidelines. In this repository, as discussed in the talk, a custom implementation has been done, which doesn't fully comply with any standard protocol, but did the job for us. If you have to develop a Stand-Alone-Service corresponding to the SSO given in this repository, you've got to keep the public key of SSO with the Stand-Alone-Service, and you've got to set up the
For SSO given in this repository, I've provided the Stand-Alone-Service implementation as well.
Developing-an-SSO-Service-using-Django/StandAloneService/src/users/views.py Lines 18 to 22 in a0b33fc
Developing-an-SSO-Service-using-Django/StandAloneService/src/users/permissions.py Lines 10 to 28 in a0b33fc
|
Hi @Vibhu-Agarwal, The talk is great. I tried to follow the protocol as you described. Both private and public keys pair is generated on the SSO side and public key is retrieved on the Standalone server (Client server). Basically, I tried to run the .json file that you have provide in the SSO branch. I could not run the "List and Create Services" and "Create Connection" that keep returns 400 Bad Request response status. Currently, I am not sure what is wrong with my Standalone Service. I have tried user creation in Standalone Service via Postman. It seem possible. However, service creation in SSO seem not possible as the problem might been in the callback-url. In the observation, the code always falls into: I appreciate your advice. Thank you in advance. |
The lines you're pointing to, are used here: Developing-an-SSO-Service-using-Django/Single-Sign-On/src/services/models.py Lines 24 to 27 in a0b33fc
... which, in turn, is being used here while saving Service (model) instancesDeveloping-an-SSO-Service-using-Django/Single-Sign-On/src/services/models.py Lines 40 to 43 in a0b33fc
It seems odd that user creation on the stand-alone-service is working but the same thing through SSO is not. Try to print out the arguments passed in line 24 above to see how the callback URL is being called. Also if you can, please show me the logs of both SSO and StandAloneService. PS. If you're running the SSO and StandAloneService on localhost, check if you've put the correct address of StandAloneService in the callback URL, which in this case, would differ from SSO by the port number. |
The text was updated successfully, but these errors were encountered: