Posts

Showing posts with the label sp

Running the pysaml2 example

Image
Because of a lack of documentations, running the pysaml2 example code is a little bit tricky: 0. Clone the pysaml2 project repo to get the example code: trinh@trinh-pc:~$ git clone https://github.com/rohe/pysaml2.git 1. You need to install pysaml2 and all of it dependencies, especially the xmlsec1 lib: trinh@trinh-pc:~$ sudo apt-get install xmlsec1 (myvenv)trinh@trinh-pc:~$ pip install pysaml2 For more information, read this blog post: http://iambusychangingtheworld.blogspot.com/2014/04/install-pysaml2-with-pip.html 2. Install cherrypy: (myvenv)trinh@trinh-pc:~$ pip install cherrypy 3. Go the example code directory, and start the webserver: (myvenv)trinh@trinh-pc:~$ cd /pysaml2/example/ (myvenv)trinh@trinh-pc:/pysaml2/example$ ./all.sh start 4. Now, access the service provider in the web browser with this url: http://localhost:8087/ You will be directed to authenticating process and get the information of the user account: 5. To sto...

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: ...