{
	"@class" : "org.apereo.cas.support.saml.services.SamlRegisteredService",
	"serviceId" : "http://test.com/sp/11111111",
	"name" : "Software Download",
	"description" : "Download Software.",
	"id" : 56,
	"evaluationOrder" : 56,
	"signAssertions": true,
	"signResponses": false,
	"encryptAssertions": false,
	"encryptAttributes": false,
	"requiredNameIdFormat" : "urn:oasis:names:tc:SAML:2.0:nameid-format:unspecified",
	"usernameAttributeProvider" : {
		"@class" : "org.apereo.cas.services.PrincipalAttributeRegisteredServiceUsernameProvider",
		"usernameAttribute" : "sAMAccountName"
	},
	"attributeReleasePolicy" : {


		"@class" : "org.apereo.cas.services.ChainingAttributeReleasePolicy",
		"mergingPolicy" : "REPLACE",
		"policies" : [ "java.util.ArrayList",
			[
				{
					"@class" : "org.apereo.cas.services.ReturnMappedAttributeReleasePolicy",
					"allowedAttributes" : { 
						"@class" : "java.util.TreeMap",
		  				"eduPersonPrimaryAffiliation" : {
						  	"@class" : "org.apereo.cas.support.saml.web.idp.profile.builders.attr.SamlIdPAttributeDefinition",
						  	"key" : "eduPersonPrimaryAffiliation",
						  	"name" : "urn:oid:1.3.6.1.4.1.5923.1.1.1.5",
						  	"friendlyName" : "eduPersonPrimaryAffiliation",
						  	"urn" : "urn:oid:1.3.6.1.4.1.5923.1.1.1.5",
						  	"script" : "groovy { def roles = ['member']; for(item in attributes['memberOf']){ if ( (item.matches('^CN=Adjuncts(.*)') || item.matches('^CN=Faculty(.*)')) && !roles.contains('faculty')) {roles.add('faculty')} else if (item.matches('^CN=(.*)Employees,(.*)') && !roles.contains('staff')) {roles.add('staff')} else if (item.matches('^CN=(.*)Students,(.*)') && !roles.contains('students')) {roles.add('students')} }; return roles;} "
		  				}
					}
				},
				{
					"@class" : "org.apereo.cas.services.ReturnAllowedAttributeReleasePolicy",
                 			"allowedAttributes" : [ "java.util.ArrayList", [ "givenName", "userPrincipalName", "displayName","sn","cn","employeeID" ] ]
				}
			]
		]
        },
	"attributeValueTypes" : {
		"@class" : "java.util.HashMap",
		"eduPersonPrimaryAffiliation" : "XSString"
	},
	"metadataLocation" : "[removed]",
	"metadataExpirationDuration" : PT60M
}
