List identity with space in _queryId

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

List identity with space in _queryId

Alex Zeng

Hi,


Does anyone know how to escape spaces inside _queryId parameter of list identity function in OpenAM 13.0.0 restful interface. Or, is this a bug that we can't have spaces in _queryId?


Here is what I got: 

This first query returned one result:


Query 1:
curl --request GET --header "iPlanetDirectoryPro: AQIC5wM2LY4Sfcy9I3MtwE-6a5nKwYwaS1P6gUKIxCc0XHU.*AAJTSQACMDEAAlNLABMzNzM3MTcyMTUyMjkwNzE1MjIzAAJTMQAA*" --header "Content-Type: application/json"   "http://openamserver:8080/openam/json/groups?_queryId=abc*"

{"result":[{"username":"abc def","realm":"dc=example,dc=com","cn":["abc def"],"dn":["cn=abc def,ou=groups,dc=example,dc=com"],"objectclass":["groupofuniquenames","top"],"universalid":["id=abc def,ou=group,dc=example,dc=com"]}],"resultCount":1,"pagedResultsCookie":null,"totalPagedResultsPolicy":"NONE","totalPagedResults":-1,"remainingPagedResults":-1}

But rest of the following returned nothing:
Query 2:
curl --request GET --header "iPlanetDirectoryPro:  AQIC5wM2LY4Sfcy9I3MtwE-6a5nKwYwaS1P6gUKIxCc0XHU.*AAJTSQACMDEAAlNLABMzNzM3MTcyMTUyMjkwNzE1MjIzAAJTMQAA*" --header "Content-Type: application/json"   "http://openamserver:8080/openam/json/groups?_queryId=abc d*"

Query 3:
curl --request GET --header "iPlanetDirectoryPro: AQIC5wM2LY4Sfcy9I3MtwE-6a5nKwYwaS1P6gUKIxCc0XHU.*AAJTSQACMDEAAlNLABMzNzM3MTcyMTUyMjkwNzE1MjIzAAJTMQAA*" --header "Content-Type: application/json"   "http://openamserver:8080/openam/json/groups?_queryId=abc\ d*"

Query 4:
curl --request GET --header "iPlanetDirectoryPro: AQIC5wM2LY4Sfcy9I3MtwE-6a5nKwYwaS1P6gUKIxCc0XHU.*AAJTSQACMDEAAlNLABMzNzM3MTcyMTUyMjkwNzE1MjIzAAJTMQAA*" --header "Content-Type: application/json"   'http://openamserver:8080/openam/json/groups?_queryId=abc d*'

Regards

Alex


This email with any attachments is confidential and may be subject to legal privilege. If it is not intended for you please reply immediately, destroy it and do not copy, disclose or use it in any way.
_______________________________________________
Visit the OpenAM forum at https://forgerock.org/forum/fr-projects/openam/
OpenAM mailing list
[hidden email]
https://lists.forgerock.org/mailman/listinfo/openam
Reply | Threaded
Open this post in threaded view
|

Re: List identity with space in _queryId

Jari Ahonen

Hi,

 

Doing appropriate URL encoding on the query parameter works:

?queryId=abc%20d*

 

- Jari

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Alex Zeng
Sent: Wednesday, November 30, 2016 3:17 AM
To: [hidden email]
Subject: [OpenAM] List identity with space in _queryId

 

Hi,

 

Does anyone know how to escape spaces inside _queryId parameter of list identity function in OpenAM 13.0.0 restful interface. Or, is this a bug that we can't have spaces in _queryId?

 

Here is what I got: 

This first query returned one result:

 

Query 1:

curl --request GET --header "iPlanetDirectoryPro: AQIC5wM2LY4Sfcy9I3MtwE-6a5nKwYwaS1P6gUKIxCc0XHU.*AAJTSQACMDEAAlNLABMzNzM3MTcyMTUyMjkwNzE1MjIzAAJTMQAA*" --header "Content-Type: application/json"   "http://openamserver:8080/openam/json/groups?_queryId=abc*"

 

{"result":[{"username":"abc def","realm":"dc=example,dc=com","cn":["abc def"],"dn":["cn=abc def,ou=groups,dc=example,dc=com"],"objectclass":["groupofuniquenames","top"],"universalid":["id=abc def,ou=group,dc=example,dc=com"]}],"resultCount":1,"pagedResultsCookie":null,"totalPagedResultsPolicy":"NONE","totalPagedResults":-1,"remainingPagedResults":-1}

 

But rest of the following returned nothing:

Query 2:

curl --request GET --header "iPlanetDirectoryPro:  AQIC5wM2LY4Sfcy9I3MtwE-6a5nKwYwaS1P6gUKIxCc0XHU.*AAJTSQACMDEAAlNLABMzNzM3MTcyMTUyMjkwNzE1MjIzAAJTMQAA*" --header "Content-Type: application/json"   "http://openamserver:8080/openam/json/groups?_queryId=abc d*"

 

Query 3:

curl --request GET --header "iPlanetDirectoryPro: AQIC5wM2LY4Sfcy9I3MtwE-6a5nKwYwaS1P6gUKIxCc0XHU.*AAJTSQACMDEAAlNLABMzNzM3MTcyMTUyMjkwNzE1MjIzAAJTMQAA*" --header "Content-Type: application/json"   "<a href="http://openamserver:8080/openam/json/groups?_queryId=abc\%20d*">http://openamserver:8080/openam/json/groups?_queryId=abc\ d*"

 

Query 4:

curl --request GET --header "iPlanetDirectoryPro: AQIC5wM2LY4Sfcy9I3MtwE-6a5nKwYwaS1P6gUKIxCc0XHU.*AAJTSQACMDEAAlNLABMzNzM3MTcyMTUyMjkwNzE1MjIzAAJTMQAA*" --header "Content-Type: application/json"   'http://openamserver:8080/openam/json/groups?_queryId=abc d*'

 

Regards

 

Alex

 

 

This email with any attachments is confidential and may be subject to legal privilege. If it is not intended for you please reply immediately, destroy it and do not copy, disclose or use it in any way.


_______________________________________________
Visit the OpenAM forum at https://forgerock.org/forum/fr-projects/openam/
OpenAM mailing list
[hidden email]
https://lists.forgerock.org/mailman/listinfo/openam