Description
Info plugin testing.
Setup
- The IDP and at least one SP is required
How to test
Installation
Pick one of the SP's to use for testing. It doesn't matter which one. I will refer to it as sp.example.com.
Create a CGI program that will echo the environment, /var/www/cgi-bin/printenv.pl with the contents:
#!/usr/bin/perl binmode(STDOUT); binmode(STDIN); print "Content-Type: text/plain\r\n"; print "\r\n"; foreach $key (sort (keys (%ENV))) { print "$key=$ENV{$key}\n"; }
Ensure that perl is installed:
# yum install perl
Make it executable
# chmod 755 /var/www/cgi-bin/printenv.pl
You can run it to test it if you'd like:
# /var/www/cgi-bin/printenv.pl
Protect /cgi-bin with SAML
Edit /etc/httpd/conf.d/ipsilon-saml.conf
Append these lines to the end of the file:
<Location /cgi-bin>
MellonEnable "auth"
</Location>
Restart Apache:
# systemctl restart httpd
Verify the basics
By default Ipsilon configures the sssd info plugin to retrieve name, address and telephone information from the information provider (IPA in our case).
This is most easily seen in the CGI as environment variables will be set.
In your browser, go to https://sp.example.com/cgi-bin/printenv.pl
If you are already authenticated or you still have a Kerberos ticket then you should see a long list of environment variables.
If not then you'll need to authenticate as the ttest user.
The variables you'll be looking for are toward the top and they should include something like:
MELLON_IDP=https://idp.example.com/idp/saml2/metadata MELLON_IDP_0=https://idp.example.com/idp/saml2/metadata MELLON_NAME_ID=ttest MELLON_NAME_ID_0=ttest MELLON__auth_type=password MELLON__auth_type_0=password MELLON__groups=ipausers MELLON__groups_0=ipausers MELLON_e_mail=ttest@example.com MELLON_e_mail_0=ttest@example.com MELLON_fullname=Tim User MELLON_fullname_0=Tim User MELLON_givenname=Tim MELLON_givenname_0=Tim MELLON_namefull=Tim User MELLON_namefull_0=Tim User MELLON_phone=410-555-1212 MELLON_phone_0=410-555-1212 MELLON_postcode=30330 MELLON_postcode_0=30330 MELLON_state=Anytown MELLON_state_0=Anytown MELLON_street=123 Main Street MELLON_street_0=123 Main Street MELLON_surname=User MELLON_surname_0=User
Expected Results
All the test steps should end with the specified results.