Uploaded image for project: 'Identity Provider'
  1. Identity Provider
  2. IDP-1004

StoredId data connector queryTimeout attribute doesn't support XML Duration

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.3.0
    • Component/s: Attribute Resolver
    • Labels:
      None
    • Operating System:
      Linux
    • Java Version:
      Other OpenJDK 8
    • Servlet Container:
      Apache Tomcat 8

      Description

      There appears to be a regression with the queryTimeout attribute of the deprecated StoredId data connector, in that it doesn't support XML Duration values. Our legacy configuration for this connector begins as follows:

      <resolver:DataConnector xsi:type="StoredId" xmlns="urn:mace:shibboleth:2.0:resolver:dc" id="StoredId" generatedAttributeID="StoredIdAttrValue" sourceAttributeID="uid" salt="secret" queryTimeout="PT10S">
      

      however this produces the following error in idp-process.log:

      2016-07-01T17:14:55.147+01:00 - WARN [net.shibboleth.ext.spring.context.FilesystemGenericApplicationContext:545] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'StoredId': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'long' for property 'queryTimeout'; nested exception is java.lang.NumberFormatException: For input string: "PT10S"
      2016-07-01T17:14:55.192+01:00 - ERROR [net.shibboleth.utilities.java.support.service.AbstractReloadableService:181] - Service 'shibboleth.AttributeResolverService': Initial load failed
      net.shibboleth.utilities.java.support.service.ServiceException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'StoredId': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'long' for property 'queryTimeout'; nested exception is java.lang.NumberFormatException: For input string: "PT10S"
              at net.shibboleth.ext.spring.service.ReloadableSpringService.doReload(ReloadableSpringService.java:334)
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'StoredId': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'long' for property 'queryTimeout'; nested exception is java.lang.NumberFormatException: For input string: "PT10S"
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
      Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'long' for property 'queryTimeout'; nested exception is java.lang.NumberFormatException: For input string: "PT10S"
              at org.springframework.beans.AbstractNestablePropertyAccessor.convertIfNecessary(AbstractNestablePropertyAccessor.java:596)
      Caused by: java.lang.NumberFormatException: For input string: "PT10S"
              at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      

      Removing the queryTimeout attribute, or replacing the value 'PT10S' with '10000', works as expected.

        Attachments

          Activity

            People

            Assignee:
            rdw@iay.org.uk Rod Widdowson
            Reporter:
            r8emo13nbmlaa5ootkj/x6wfkbw=@https://shib.york.ac.uk/shibboleth r8emo13nbmlaa5ootkj/x6wfkbw=@https://shib.york.ac.uk/shibboleth
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour
                1d 1h