CA API Management: OTK 3.6 Unable to list client keys after a search

Document ID : KB000092853
Last Modified Date : 24/04/2018
Show Technical Document Details
Issue:
In OTK 3.6, when searching in OAuth manager for a client and then clicking on 'list keys'  you receive the below error. If you do not first perform a search and simply click 'list keys' all works well.

{ "error":"invalid_request", "error_description":"The request failed due to some unknown reason" } 
Please try again. If the error occurs again please click here to login again. 

If the error still occurs please contact the system administrator. 

 
Environment:
OTK 3.6
Resolution:
1. From Policy Manager, open the service oauth/manager/clients 
2. Show comments and Assertion Numbers
3. At the line 91, you can find an assertion called Apply XSL Transformation. (This assertion is under the branch List client Apps displayed by the comment).
4. Double click on this assertion, then replace the content in XSLT Stylesheet field by the following content :

<xsl:stylesheet version="1.0" xmlns:ns="http://ns.l7tech.com/2012/11/otk-clientstore" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

                <xsl:output method="html"/>

                <xsl:param name="this.app.url"/>
                <xsl:param name="offset"/>
                <xsl:param name="synchToken"/>

                <xsl:template match="/ns:values">
                <table border="1" class="table-striped table-hover" id="tblResult" style="padding:2px; empty-cells: show;">
                <tr style="background-color: rgb(216,216,216);">
                <th>index</th>
                <xsl:for-each select="ns:value[1][node()]/descendant::node()[not(name()='')]">
                <th>
                <xsl:value-of select="name()"/>
                </th>
                </xsl:for-each>
                <th colspan="3">action</th>
                </tr>
                <xsl:for-each select="ns:value[node()]">
                <xsl:variable name="tempClientName" select="descendant::node()[local-name()='name']"/>
                <xsl:variable name="tempClientIdent" select="descendant::node()[local-name()='client_ident']"/>
                <tr>
                <xsl:variable name="trPosition" select="position()"/>
                <td>
                <xsl:value-of select="@index+number($offset)"/>
                </td>
                <xsl:for-each select="descendant::node()[not(name()='')]">
                <xsl:choose>
                <xsl:when test="name()='client_custom'">
                <xsl:variable name="nextId" select="concat('custom_value',$trPosition,position())"/>
                <td id="{$nextId}" style="max-width: 170px; word-wrap:break-word">
                <xsl:value-of select="text()"/>
                </td>
                </xsl:when>
                <xsl:otherwise>
                <td style="max-width: 170px; word-wrap:break-word">
                <xsl:value-of select="text()"/>
                </td>
                </xsl:otherwise>
                </xsl:choose>
                </xsl:for-each>
                <td>
                <form action="{$this.app.url}?state=deleteClient" enctype="application/x-www-form-urlencoded" method="POST" onsubmit="return confirmDelete('{$tempClientName}')">
                <input name="name" type="hidden" value="{$tempClientName}"/>
                <input name="client_ident" type="hidden" value="{$tempClientIdent}"/>
                <input name="synchToken" type="hidden" value="{$synchToken}"/>
                <button class="btn btn-primary btn-mini" type="submit" value="Delete">Delete</button>
                </form>
                </td>
                <td>
                <form action="{$this.app.url}?state=editClient" enctype="application/x-www-form-urlencoded" method="POST">
                <input name="name" type="hidden" value="{$tempClientName}"/>
                <input name="client_ident" type="hidden" value="{$tempClientIdent}"/>
                <input name="synchToken" type="hidden" value="{$synchToken}"/>
                <button class="btn btn-primary btn-mini" type="submit" value="Edit">Edit</button>
                </form>
                </td>
                <td>
                <form action="{$this.app.url}?state=clientKeys" enctype="application/x-www-form-urlencoded" method="POST">
                <input name="client_ident" type="hidden" value="{$tempClientIdent}"/>
                <input name="synchToken" type="hidden" value="{$synchToken}"/>
                <button class="btn btn-primary btn-mini" type="submit" value="List Keys">List Keys</button>
                </form>
                </td>
                </tr>
                </xsl:for-each>
                </table>
                </xsl:template>

                </xsl:stylesheet>

5. Save and Active the  oauth/manager/clients policy