OpenConext / Mujina

A mock IDP and SP using the OpenSAML library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Attributes set from the web interface are not arrays

pcambra opened this issue · comments

commented

I think when you add an attribute from the web ui and not the API, they're stored as simple strings which makes AuthnResponder fail with an error 500.

If I set them manually or from the API as arrays, the auth process works fine.

Error trace:

WARN n.s.m.saml.xml.AssertionGenerator - could not parse json file for IDP attributes org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token at [Source: java.io.StringReader@232ed90b; line: 1, column: 2] at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:163) ~[jackson-mapper-asl-1.9.5.jar:1.9.5] at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:219) ~[jackson-mapper-asl-1.9.5.jar:1.9.5] at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:212) ~[jackson-mapper-asl-1.9.5.jar:1.9.5] at org.codehaus.jackson.map.deser.std.StringCollectionDeserializer.handleNonArray(StringCollectionDeserializer.java:210) ~[jackson-mapper-asl-1.9.5.jar:1.9.5] at org.codehaus.jackson.map.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:156) ~[jackson-mapper-asl-1.9.5.jar:1.9.5] at org.codehaus.jackson.map.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:146) ~[jackson-mapper-asl-1.9.5.jar:1.9.5] at org.codehaus.jackson.map.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:18) ~[jackson-mapper-asl-1.9.5.jar:1.9.5] at org.codehaus.jackson.map.deser.std.MapDeserializer._readAndBind(MapDeserializer.java:319) ~[jackson-mapper-asl-1.9.5.jar:1.9.5] at org.codehaus.jackson.map.deser.std.MapDeserializer.deserialize(MapDeserializer.java:249) ~[jackson-mapper-asl-1.9.5.jar:1.9.5] at org.codehaus.jackson.map.deser.std.MapDeserializer.deserialize(MapDeserializer.java:33) ~[jackson-mapper-asl-1.9.5.jar:1.9.5] at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732) ~[jackson-mapper-asl-1.9.5.jar:1.9.5] at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1870) ~[jackson-mapper-asl-1.9.5.jar:1.9.5] at nl.surfnet.mujina.saml.xml.AssertionGenerator.getAttributesFromCookie(AssertionGenerator.java:140) [classes/:na] at nl.surfnet.mujina.saml.xml.AssertionGenerator.generateAssertion(AssertionGenerator.java:114) [classes/:na] at nl.surfnet.mujina.saml.xml.AuthnResponseGenerator.generateAuthnResponse(AuthnResponseGenerator.java:63) [classes/:na] at nl.surfnet.mujina.saml.SSOSuccessAuthnResponder.handleRequest(SSOSuccessAuthnResponder.java:133) [classes/:na]

You were right. Fixed in 4fd00ba

commented

Thanks, I've updated the Docker mujina image for Alpine I maintain :) https://github.com/pcambra/docker-mujina-alpine