Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10603

Realm parameter cause Exception

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.18.1
    • Fix Version/s: 2.18.2, 2.19.0
    • Component/s: camel-ahc
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Unknown

      Description

      Using a ahc URI including the realm parameter leads into an unknown parameter exception:

      "ahc:http://www.yahoo.com?clientConfig.realm.principal=testPrincipal&clientConfig.realm.password=testPassword&clientConfig.realm.scheme=BASIC"

      Causes Exception:
      org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: ahc://http://www.google.com?clientConfig.realm.principal=testPrincipal due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[

      {realm.principal=testPrincipal}

      ]

      Suggestion for org.apache.camel.component.ahc.AhcComponent:

      Line #44:
      private static final String CLIENT_REALM_CONFIG_PREFIX = "clientConfig.realm.";

      Line #94ff:
      Map<String, Object> realmParams = IntrospectionSupport.extractProperties(parameters, CLIENT_REALM_CONFIG_PREFIX);
      realmBuilder = new Realm.Builder(realmParams.get("principal").toString(), realmParams.get("password").toString());
      realmParams.remove("principal");
      realmParams.remove("password");
      setProperties(realmBuilder, realmParams);
      validateParameters(uri, realmParams, null);

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              tom_guenter Thomas G√ľnter
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: