SAML Tools

This project contains a few small but useful tools to validate and process SAML metadata or other SAML-related data.
The source code and of these tools is available in the Subversion repository "as-is", without any support.

To check out all the tools described below use:

svn co https://subversion.switch.ch/svn/general/aai/samltools/

mpath - Metadata XPath Processor

Execute an xpath query on a SAML metadata file and return the entityID of the matched EntityDescriptors, the XML of the matched EntityDescriptor of the matched XPath node's value.
Requires PHP5.

Usage: 
php mpath.php -h
php mpath.php -i <input> -q <xpathquery> [-x] [-n] [-d]

Example usage: 
mpath -i metadata.edugain.xml -q '//md:IDPSSODescriptor'

Examine source code or download mpath individually.

mvalidate - Metadata Validation

Checks if a given SAML metadata file is well-formed and valid according to the schemas in the schema directory in the same directory as this script.
Requires xmllint which is included in the libxml2 library.

Usage: 
mvalidate -h
mvalidate <metadatafile>

Example usage: 
mvalidate metadata.edugain.xml

Examine source code or check out the script and the required SAML XML schema files with:

svn co svn co https://subversion.switch.ch/svn/general/aai/samltools/xml-validation

SAMFAS - SAml Metadata Filter And Splitter

Filters and splits SAML metadata files in various ways.
Requires PHP5.

Usage: 
php SAMFAS.php -h
php SAMFAS.php -i <input> -c <config> -o <output> 
               [-r <roledescriptor>] [-p <protocol>] [-d]

Example usage: 
php SAMFAS.php metadata.edugain.xml config.txt metadata/idps/ IDPSSODescriptor

Examine source code or download SAMFAS individually.