I'm trying to run a query to perform a user search in OpenIAM using a SCIM connector. Testing on a Linux virtual machine, attacking a URL and using OpenDJ I can filter users through their id and using the curl command and making a GET request if it returns me data in JSON per console but when I run through the application it gives me an Error :java.lang.IllegalArgumentException: Illegal character in query
In CentOs console I use this statement to return the JSON with the users:
curl --request GET --user admin:xxxxxxx "http://10.10.11.74:8081/api/users?_queryFilter=_id+pr&_prettyPrint=true"
The output:
{
"result" : [ {
"_id" : "Hector Un.Grifoll Un",
"_rev" : "00000000ffe5a0e4",
"_schema" : "frapi:opendj:rest2ldap:user:1.0",
"_meta" : {
"created" : "2019-03-15T10:49:53Z",
"lastModified" : "2019-06-11T14:44:46Z"
},
"userName" : "asasf@aaeg.ee",
"displayName" : [ "Hector Un Grifoll Un" ],
"name" : {
"givenName" : "Hector Un",
"familyName" : "Grifoll Un"
},
"contactInformation" : {
"emailAddress" : "asasf@aaeg.ee"
}
}
But when I run the app and put the Search URL in a field to automate it, the output log shows me the illegal character exception.
This is the field where I add the query filter.
The log shows me the Illegal Character error trace.
2019-06-25 18:11:31.727 INFO 12162 --- [_TaskExecutor20] o.o.i.m.l.ConnectorResponseListener : Caught ADD response from connector in backend: Response{status=FAILURE, errorCode=null, errorText='Other Error:java.lang.IllegalArgumentException: Illegal character in query at index 37: 10.10.11.74/api/users?_queryFilter=id"Scott.Nelson"', responseValue=null, errorTokenList=null, stacktraceText=null}
I think there's something Java doesn't like, I guess there might be some kinship or key, but I've tried it anyway.