SAML Response Generator ======================= This is a small utility program that makes it easy to generate SAML responses for testing. Creating Private and Public Keys for Testing -------------------------------------------- You will need to generate a private and public key to use for generating saml assertions. The following steps are used for creating the keys: ``` #create the keypair openssl req -new -x509 -days 3652 -nodes -out saml.crt -keyout saml.pem #convert the private key to pkcs8 format openssl pkcs8 -topk8 -inform PEM -outform DER -in saml.pem -out saml.pkcs8 -nocrypt ``` Command line tool ----------------- You will need to create the jar file in order to use the command line tool. cd to saml-tutorial then run 'mvn package' to create a jar file called 'saml-generator-1.0.jar'. This jar file will be used to create saml assertions. Usage ----- java -jar saml-generator-1.0.jar [-domain ] [-issuer ] [-privateKey ] [-publicKey ] [-roles ] [-email ] [-samlAssertionExpirationDays ] [-subject ] ``` -issuer The URI of the issuer for the saml assertion. -subject The username of the federated user. -domain The domain ID for the federated user. -roles A comma separated list of role names for the federated user. -email The email address of the federated user. -publicKey THe path to the location of the public key to decrypt assertions -privateKey The path to the location of the private key to use to sign assertions -samlAssertionExpirationDays How long before the assertion is no longer valid ``` Example ------- java -jar saml-generator-1.0.jar -domain 7719 -issuer 'http://some.compnay.com' -privateKey saml.pkcs8 -publicKey saml.crt -roles 'role1' -samlAssertionExpirationDays 5 -subject samlUser1 Output: ``` http://test.rackspace.com fufQ5g8YHPZVT4tX6Xx4LfYO588= LlYniaVX8EXAZDvKP396IDpDm31mJf3T8HKh4NroTSPWqEjmcN2Wj32QBjSCpzXtE7bhVoRIQQRDRWzAbMjR0gjuy6NK0z1vBQDi4iwuRM6Y+sgsDAqB9wT4h4yi6J7cjnUdNi83VRVYF3F7zVjCq//mDQVkyp+rkhC0Lkxe2kM= http://some.compnay.com samlUser urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport role1 14309 ```