Posts

Showing posts with the label SSO

To import SSL certificate and key into PowerSchool's database

In order to use the PowerSchool's API(s) or to enable Single Sign-on with 3rd-party app using SAML2, we need to enable HTTPS. To enable HTTPS on this application server, import a certificate and private key into the database. If you have already imported a certificate on this or any other application node, skip this procedure. If you do not yet have a certificate you will have the option to import and enable HTTPS at a later time If you choose to import, all certificates should be standard X509 certificates in standard Privacy Enhanced Mail (PEM) format. Viewed in a text editor, PEM format certificates start with "------BEGIN CERTIFICATE-----" and end with "-----END CERTIFICATE-----". The private key file should also be in PEM format . The private key password is the password you set when you generated the private key/certificate request pair. If your certificate authority provides an intermediate certificate or certificates, include them here. My private ...

Using SimpleSAMLphp to authenticate users in Google Apps with Active Directory

To let my users login to Google Apps using Active Directory accounts, I can use SimpleSAMLphp as an IdP which gets identities from my Active Directory servers. Things are pretty easy with simplesamlphp, of-course: 1.  SimpleSAMLphp configurations: simplesamlphp/config/authsources.php : simplesamlphp/config/config.php : simplesamlphp/www/logout_relay.php : (because Google does not allow log out URLs that have question mark and parameters) 2. Google App settings: >> Go to https://admin.google.com and login as my Google App administrator account. >> Security -> Advanced Settings -> Setup Single Sign-on (SSO) : + Check "Enable Single Sign-on" + Sign-in page URL * https://mydomain.com/simplesaml/saml2/idp/SSOService.php + Sign-out page URL * https://mydomain.com/simplesaml/logout_relay.php + Change password URL * https://mydomain.com/ >> Click " Save changes " 3. NGINX server block for simplesamlphp: ...

Debugging djangosaml2

I'm using the djangosaml2 app to add the Single Sign On functionality using  SAML2 to my Django projects. I followed the official manual at  https://bitbucket.org/lgs/djangosaml2/overview  to make my project work with a SimpleSAMLphp instance as an IdP but I got this error: cannot serialize IdpUnspecified('No IdP to send to given the premises',) (type IdpUnspecified) I have no idea why this error showed up?! I have a very little knowledge about SAML2 and the PySAML2 module. The only thing I can think about is to enable logging for the djangosaml2 app. So, I added these following lines in the settings.py of my project: import logging logging.basicConfig() I reloaded the website and a logging message appeared in the console: ERROR:djangosaml2:Unable to know which IdP to use Yessss, that is the problem!

Introduction to SAML

Image
Recently, I have a chance to work on a SSO system using SAML standard. Here are some good resources to get started with SAML: The SAML use case,  SAML Web Browser SSO :  this is the workflow of authenticating a user via a SSO system using SAML data format. Here is a visual explanation of SAML by Ping Identity: This is another video about SAML by Paul Moore, Centrify CTO and co-founder: And to differentiate between OpenID and SAML (from StackOverflow): They are two different protocols of authentication and they differ at the technical level. From a distance, differences start when users initiate the authentication. With OpenID, a user login is usually an HTTP address of the resource which is responsible for the authentication. On the other hand, SAML is based on an explicit trust between your site and the identity provider so it's rather uncommon to accept credentials from an unknown site. OpenID identities are easy to get around th...