IBM-Security / isam-ansible-roles

Ansible Custom Modules, Handlers and Tasks for ISAM. Requires "ibmsecurity" python package.
Apache License 2.0
24 stars 43 forks source link

add_oauth_client #188

Closed ramraj241 closed 4 years ago

ramraj241 commented 4 years ago

Is there a role to add multiple redirect uris? the one which is available right now add_oauth_client is updating the current redirect uri instead of adding new one

ram-ibm commented 4 years ago

I would start by using set() instead of add(). I recollect redirect uris can be multiples - but REST API documentation is showing a string: https://www.ibm.com/support/knowledgecenter/SSPREK_9.0.7/com.ibm.isam.doc/develop/rapi/Register%20an%20API%20protection%20client.xml

May need to check how the LMI is doing it and use the corresponding type (perhaps list when updating it).

ramraj241 commented 4 years ago

I tried a custom role with set() and it still does the same action as add()...just replacing/overwriting the existing stuff...any other ways to get this redirurls added?

ram-ibm commented 4 years ago

Try passing data like this:

add_oauth_client_redirectUri:
  - "/firstRedirect"
  - "/secondRedirect"

You need to pass an array of values to redirectUri. If it is still not working, please provide sample data that is not working for you.

ramraj241 commented 4 years ago

That works, thanks Ram