diff options
| author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-11-24 08:14:16 +0100 | 
|---|---|---|
| committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-11-24 08:14:16 +0100 | 
| commit | b39bc0239d1e4a4d4a8b0fe708ee24c7709b9454 (patch) | |
| tree | 518249a09f71a8d9c499de1c7daaabebcb236590 | |
| parent | 856502356028dc85e19e1b47e0cc569095404c6e (diff) | |
| download | moa-id-spss-b39bc0239d1e4a4d4a8b0fe708ee24c7709b9454.tar.gz moa-id-spss-b39bc0239d1e4a4d4a8b0fe708ee24c7709b9454.tar.bz2 moa-id-spss-b39bc0239d1e4a4d4a8b0fe708ee24c7709b9454.zip | |
add MSOrganisation attribute for ISA 1.18
9 files changed, 51 insertions, 17 deletions
| diff --git a/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_VIDP.xml b/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_VIDP.xml index ee4c636ce..b45b69054 100644 --- a/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_VIDP.xml +++ b/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_VIDP.xml @@ -119,5 +119,6 @@          <!-- ISA 1.18 attributes-->          <entry key="ECApplicationRole">http://www.stork.gov.eu/1.1/ECApplicationRole</entry> +        <entry key="MSOrganization">http://www.stork.gov.eu/1.1/MSOrganization</entry>  </properties> diff --git a/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_incoming.xml b/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_incoming.xml index 83e69ac23..3370978b3 100644 --- a/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_incoming.xml +++ b/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_incoming.xml @@ -90,5 +90,9 @@  	<entry key="mandateContent">http://www.stork.gov.eu/1.0/mandateContent</entry>  	<entry key="representative">http://www.stork.gov.eu/1.0/representative</entry>  	<entry key="represented">http://www.stork.gov.eu/1.0/represented</entry> -	 +   +  <!-- ISA 1.18 attributes--> +  <entry key="ECApplicationRole">http://www.stork.gov.eu/1.1/ECApplicationRole</entry> +  <entry key="MSOrganization">http://www.stork.gov.eu/1.1/MSOrganization</entry> +  	  </properties> diff --git a/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_incoming_attr.xml b/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_incoming_attr.xml index 83e69ac23..33437c110 100644 --- a/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_incoming_attr.xml +++ b/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_incoming_attr.xml @@ -90,5 +90,9 @@  	<entry key="mandateContent">http://www.stork.gov.eu/1.0/mandateContent</entry>  	<entry key="representative">http://www.stork.gov.eu/1.0/representative</entry>  	<entry key="represented">http://www.stork.gov.eu/1.0/represented</entry> -	 +         +  <!-- ISA 1.18 attributes--> +  <entry key="ECApplicationRole">http://www.stork.gov.eu/1.1/ECApplicationRole</entry> +  <entry key="MSOrganization">http://www.stork.gov.eu/1.1/MSOrganization</entry> +  	  </properties> diff --git a/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_outgoing.xml b/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_outgoing.xml index b095b9e7e..2b0c05b88 100644 --- a/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_outgoing.xml +++ b/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_outgoing.xml @@ -91,4 +91,8 @@  	<entry key="representative">http://www.stork.gov.eu/1.0/representative</entry>  	<entry key="represented">http://www.stork.gov.eu/1.0/represented</entry> +  <!-- ISA 1.18 attributes--> +  <entry key="ECApplicationRole">http://www.stork.gov.eu/1.1/ECApplicationRole</entry> +  <entry key="MSOrganization">http://www.stork.gov.eu/1.1/MSOrganization</entry> +    </properties>
\ No newline at end of file diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java index bae5bb1f6..731925c1b 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java @@ -767,6 +767,12 @@ public class AuthenticationDataBuilder implements MOAIDAuthConstants {  			}			  		} +		//set PVP OU attribute +		if (extractor.containsAttribute(PVPConstants.OU_NAME)) { +			authData.setPvpAttribute_OU(extractor.getSingleAttributeValue(PVPConstants.OU_NAME)); +			Logger.debug("Found PVP 'OU' attribute in response -> " + authData.getPvpAttribute_OU()); +			 +		}  		//set STORK attributes  		if (extractor.containsAttribute(PVPConstants.EID_STORK_TOKEN_NAME)) {				 diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/AuthenticationData.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/AuthenticationData.java index 65c413ef9..05b008515 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/AuthenticationData.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/AuthenticationData.java @@ -133,7 +133,9 @@ public class AuthenticationData  implements IAuthData, Serializable {  	  private String authBlock = null;   	  private List<String> encbPKList = null; +	  //ISA 1.18 attributes  	  private List<AuthenticationRole> roles = null; +	  private String pvpAttribute_OU = null;  	  private boolean useMandate = false;  	  private MISMandate mandate = null; @@ -707,6 +709,7 @@ public class AuthenticationData  implements IAuthData, Serializable {  		return roles;  	} +	//ISA 1.18 attributes  	/**  	 * @param roles the roles to set  	 */ @@ -716,26 +719,31 @@ public class AuthenticationData  implements IAuthData, Serializable {  		this.roles.add(role);  	} +	 +	/** +	 * @return the pvpAttribute_OU +	 */ +	public String getPvpAttribute_OU() { +		return pvpAttribute_OU; +	} + +	/** +	 * @param pvpAttribute_OU the pvpAttribute_OU to set +	 */ +	public void setPvpAttribute_OU(String pvpAttribute_OU) { +		this.pvpAttribute_OU = pvpAttribute_OU; +	}  	/* (non-Javadoc)  	 * @see at.gv.egovernment.moa.id.data.IAuthData#isBusinessService()  	 */  	@Override  	public boolean isBusinessService() { -		// TODO Auto-generated method stub  		return this.businessService;  	}  	public void setIsBusinessService(boolean flag) {  		this.businessService = flag; -	} - -	 -	 - -	 - -	 -	 +	}	  } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/IAuthData.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/IAuthData.java index ebbf62ce7..ccc90a031 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/IAuthData.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/IAuthData.java @@ -69,7 +69,9 @@ public interface IAuthData {  	 IdentityLink getIdentityLink();  	 byte[] getSignerCertificate();  	 String getAuthBlock(); -	  + +	 //ISA 1.18 attributes +	 String getPvpAttribute_OU();  	 List<AuthenticationRole> getAuthenticationRoles();  	 boolean isPublicAuthority(); @@ -90,5 +92,6 @@ public interface IAuthData {  	 String getCcc();  	 STORKAuthnRequest getStorkAuthnRequest();  	 String getStorkAuthnResponse(); -	 IPersonalAttributeList getStorkAttributes();	 	  +	 IPersonalAttributeList getStorkAttributes(); +	 	   } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java index 755102bf3..499265319 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java @@ -59,13 +59,17 @@ public class MOAAttributeProvider {      static {          Map<String, String> tempSimpleMap = new HashMap<String, String>();          tempSimpleMap.put("givenName", "getGivenName"); -        tempSimpleMap.put("surname", "getFamilyName"); +        tempSimpleMap.put("surname", "getFamilyName");         +        tempSimpleMap.put("MSOrganization", "getPvpAttribute_OU");          storkAttributeSimpleMapping = Collections.unmodifiableMap(tempSimpleMap); +                          Map<String, String> tempFunctionMap = new HashMap<String, String>();          tempFunctionMap.put("eIdentifier", "geteIdentifier");          tempFunctionMap.put("ECApplicationRole","getECApplicationRole");          tempFunctionMap.put("dateOfBirth", "getFormatedDateOfBirth"); +        tempFunctionMap.put("MSOrganization", "getMSOrganization");          storkAttributeFunctionMapping = Collections.unmodifiableMap(tempFunctionMap); +              }      public MOAAttributeProvider(IAuthData authData, MOASTORKRequest moastorkRequest) { @@ -129,7 +133,7 @@ public class MOAAttributeProvider {      	}    	      	return storkRoles;      } - +          private String getFormatedDateOfBirth() {  		if (authData.getDateOfBirth() != null) {  			DateFormat fmt = new SimpleDateFormat("yyyyMMdd"); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKPVPUtilits.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKPVPUtilits.java index d923eccde..123d32af4 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKPVPUtilits.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKPVPUtilits.java @@ -32,7 +32,7 @@ import java.util.List;  public class STORKPVPUtilits {  	public static final List<String> attributesRequirePVPAuthentication =  -			Arrays.asList("ECApplicationRole"); +			Arrays.asList("ECApplicationRole", "MSOrganization"); | 
