appUpdate.ftl 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <script type="text/javascript">
  2. <!--
  3. $(function(){
  4. $("#generateSecret").on("click",function(){
  5. $.post("<@base/>/apps/generate/secret/oauth20", {_method:"post",currTime:(new Date()).getTime()}, function(data) {
  6. $("#clientSecret").val(data+"");
  7. $("#clientSecret_text").html(data+"");
  8. $("#secret").val(data+"");
  9. $("#secret_text").html(data+"");
  10. });
  11. });
  12. });
  13. //-->
  14. </script>
  15. <form id="actionForm_app" method="post" type="label" autoclose="true"
  16. action="<@base/>/apps/oauth20/update"
  17. forward="<@base/>/apps/list"
  18. enctype="multipart/form-data">
  19. <!-- content -->
  20. <!--table-->
  21. <table width="960" class="datatable" >
  22. <tbody>
  23. <tr>
  24. <td ><jsp:include page="../appUpdateCommon.jsp"/></td>
  25. </tr>
  26. <tr>
  27. <td>
  28. <table width="960" class="datatable" >
  29. <tbody>
  30. <tr>
  31. <td colspan=4><@locale code="apps.oauth.v2.0.info" /></td>
  32. </tr>
  33. <tr>
  34. <th style="width:15%;"><@locale code="apps.oauth.v2.0.clientId" />:</th>
  35. <td style="width:35%;">
  36. <span id="clientId_text">${model.clientId}</span>
  37. <input type="hidden" id="clientId" name="clientId" title="" value="${model.clientId}"/>
  38. </td>
  39. <th style="width:15%;"><@locale code="apps.oauth.v2.0.clientSecret" />:</th>
  40. <td style="width:35%;">
  41. <span id="clientSecret_text">${model.clientSecret}</span>
  42. <input type="hidden" id="clientSecret" name="clientSecret" title="" value="${model.clientSecret}"/>
  43. </td>
  44. </tr>
  45. <tr>
  46. <th><@locale code="apps.oauth.scope" />:</th>
  47. <td colspan="3">
  48. <table class="hidetable" style="width:100%;">
  49. <tr>
  50. <td>read<input type="checkbox" id="scope_trust" name="scope" value="read" <c:if test="${fn:contains(model.scope, 'read')}">checked</c:if> /></td>
  51. <td>write<input type="checkbox" id="scope_write" name="scope" value="write" <c:if test="${fn:contains(model.scope, 'write')}">checked</c:if>/></td>
  52. <td>trust<input type="checkbox" id="scope_trust" name="scope" value="trust" <c:if test="${fn:contains(model.scope, 'trust')}">checked</c:if>/></td>
  53. <td>openid<input type="checkbox" id="scope_openid" name="scope" value="openid" <c:if test="${fn:contains(model.scope, 'openid')}">checked</c:if>/></td>
  54. <td>profile<input type="checkbox" id="scope_profile" name="scope" value="profile" <c:if test="${fn:contains(model.scope, 'profile')}">checked</c:if>/></td>
  55. <td>email<input type="checkbox" id="scope_email" name="scope" value="email" <c:if test="${fn:contains(model.scope, 'email')}">checked</c:if>/></td>
  56. <td>phone<input type="checkbox" id="scope_phone" name="scope" value="phone" <c:if test="${fn:contains(model.scope, 'phone')}">checked</c:if>/></td>
  57. <td>address<input type="checkbox" id="scope_address" name="scope" value="address" <c:if test="${fn:contains(model.scope, 'address')}">checked</c:if>/></td>
  58. <td>all<input type="checkbox" id="scope_all" name="scope" value="all" <c:if test="${fn:contains(model.scope, 'all')}">checked</c:if>/></td>
  59. <td><b class="orange">*</b><label for="scope"></label></td>
  60. </tr>
  61. </table>
  62. </td>
  63. </tr>
  64. <tr>
  65. <th><@locale code="apps.oauth.GrantTypes" />:</th>
  66. <td colspan="3">
  67. <table class="hidetable" style="width:100%;">
  68. <tr>
  69. <td>authorization_code | code<input <c:if test="${fn:contains(model.authorizedGrantTypes, 'authorization_code')}">checked</c:if> type="checkbox" id="grantTypes_authorization_code" name="authorizedGrantTypes" value="authorization_code"/></td>
  70. <td>password<input <c:if test="${fn:contains(model.authorizedGrantTypes, 'password')}">checked</c:if> type="checkbox" id="grantTypes_trust" name="authorizedGrantTypes" value="password"/></td>
  71. <td>implicit<input <c:if test="${fn:contains(model.authorizedGrantTypes, 'implicit')}">checked</c:if> type="checkbox" id="grantTypes_implicit" name="authorizedGrantTypes" value="implicit"/></td>
  72. <td>refresh_token<input <c:if test="${fn:contains(model.authorizedGrantTypes, 'refresh_token')}">checked</c:if> type="checkbox" id="grantTypes_refresh_token" name="authorizedGrantTypes" value="refresh_token"/></td>
  73. <td>id_token<input <c:if test="${fn:contains(model.authorizedGrantTypes, 'id_token')}">checked</c:if> type="checkbox" id="grantTypes_id_token" name="authorizedGrantTypes" value="id_token"/></td>
  74. <td>token<input <c:if test="${fn:contains(model.authorizedGrantTypes, 'token')}">checked</c:if> type="checkbox" id="grantTypes_token" name="authorizedGrantTypes" value="token"/></td>
  75. <td><b class="orange">*</b><label for="authorizedGrantTypes"></label></td>
  76. </tr>
  77. </table>
  78. </td>
  79. </tr>
  80. <tr>
  81. <th><@locale code="apps.oauth.registeredRedirectUris" />:</th>
  82. <td colspan=3>
  83. <textarea id="registeredRedirectUris" name="registeredRedirectUris" rows="4" cols="60">${model.registeredRedirectUris}</textarea>
  84. <b class="orange">*</b><label for="registeredRedirectUris"></label>
  85. </td>
  86. </tr>
  87. <tr>
  88. <th><@locale code="apps.oauth.accessTokenValiditySeconds" />:</th>
  89. <td >
  90. <input type="text" id="accessTokenValiditySeconds" name="accessTokenValiditySeconds" title="" value="${model.accessTokenValiditySeconds}"/>
  91. <b class="orange">*</b><label for="accessTokenValiditySeconds"></label>
  92. </td>
  93. <th><@locale code="apps.oauth.refreshTokenValiditySeconds" />:</th>
  94. <td>
  95. <input type="text" id="refreshTokenValiditySeconds" name="refreshTokenValiditySeconds" title="" value="${model.refreshTokenValiditySeconds}"/>
  96. <b class="orange">*</b><label for="refreshTokenValiditySeconds"></label>
  97. </td>
  98. </tr>
  99. <tr>
  100. <th><@locale code="apps.connect.idTokenSigningAlgorithm" />:</th>
  101. <td >
  102. <select id="idTokenSigningAlgorithm" name="idTokenSigningAlgorithm" >
  103. <option value="none" <c:if test="${'none' ==model.idTokenSigningAlgorithm}">selected</c:if>>No digital signature</option>
  104. <option value="HS256" <c:if test="${'HS256'==model.idTokenSigningAlgorithm}">selected</c:if>>HMAC using SHA-256 hash algorithm</option>
  105. <option value="HS384" <c:if test="${'HS384'==model.idTokenSigningAlgorithm}">selected</c:if>>HMAC using SHA-384 hash algorithm</option>
  106. <option value="HS512" <c:if test="${'HS512'==model.idTokenSigningAlgorithm}">selected</c:if>>HMAC using SHA-512 hash algorithm</option>
  107. <option value="RS256" <c:if test="${'RS256'==model.idTokenSigningAlgorithm}">selected</c:if>>RSASSA using SHA-256 hash algorithm</option>
  108. <option value="RS384" <c:if test="${'RS384'==model.idTokenSigningAlgorithm}">selected</c:if>>RSASSA using SHA-384 hash algorithm</option>
  109. <option value="RS512" <c:if test="${'RS256'==model.idTokenSigningAlgorithm}">selected</c:if>>RSASSA using SHA-512 hash algorithm</option>
  110. <option value="ES256" <c:if test="${'ES256'==model.idTokenSigningAlgorithm}">selected</c:if>>ECDSA using P-256 curve and SHA-256 hash algorithm</option>
  111. <option value="ES384" <c:if test="${'ES384'==model.idTokenSigningAlgorithm}">selected</c:if>>ECDSA using P-384 curve and SHA-384 hash algorithm</option>
  112. <option value="ES512" <c:if test="${'ES512'==model.idTokenSigningAlgorithm}">selected</c:if>>ECDSA using P-512 curve and SHA-512 hash algorithm</option>
  113. </select>
  114. </td>
  115. <th><@locale code="apps.connect.userInfoSigningAlgorithm" />:</th>
  116. <td >
  117. <select id="userInfoSigningAlgorithm" name="userInfoSigningAlgorithm" >
  118. <option value="none" <c:if test="${'none' ==model.userInfoSigningAlgorithm}">selected</c:if>>No digital signature</option>
  119. <option value="HS256" <c:if test="${'HS256'==model.userInfoSigningAlgorithm}">selected</c:if>>HMAC using SHA-256 hash algorithm</option>
  120. <option value="HS384" <c:if test="${'HS384'==model.userInfoSigningAlgorithm}">selected</c:if>>HMAC using SHA-384 hash algorithm</option>
  121. <option value="HS512" <c:if test="${'HS512'==model.userInfoSigningAlgorithm}">selected</c:if>>HMAC using SHA-512 hash algorithm</option>
  122. <option value="RS256" <c:if test="${'RS256'==model.userInfoSigningAlgorithm}">selected</c:if>>RSASSA using SHA-256 hash algorithm</option>
  123. <option value="RS384" <c:if test="${'RS384'==model.userInfoSigningAlgorithm}">selected</c:if>>RSASSA using SHA-384 hash algorithm</option>
  124. <option value="RS512" <c:if test="${'RS256'==model.userInfoSigningAlgorithm}">selected</c:if>>RSASSA using SHA-512 hash algorithm</option>
  125. <option value="ES256" <c:if test="${'ES256'==model.userInfoSigningAlgorithm}">selected</c:if>>ECDSA using P-256 curve and SHA-256 hash algorithm</option>
  126. <option value="ES384" <c:if test="${'ES384'==model.userInfoSigningAlgorithm}">selected</c:if>>ECDSA using P-384 curve and SHA-384 hash algorithm</option>
  127. <option value="ES512" <c:if test="${'ES512'==model.userInfoSigningAlgorithm}">selected</c:if>>ECDSA using P-512 curve and SHA-512 hash algorithm</option>
  128. </select>
  129. </td>
  130. </tr>
  131. <tr>
  132. <th><@locale code="apps.connect.jwksUri" />:</th>
  133. <td colspan =3>
  134. <input type="text" id="jwksUri" name="jwksUri" title="" value="${model.jwksUri}"/>
  135. </td>
  136. </tr>
  137. <tr>
  138. <th><@locale code="apps.connect.idTokenEncryptedAlgorithm" />:</th>
  139. <td >
  140. <select id="idTokenEncryptedAlgorithm" name="idTokenEncryptedAlgorithm" >
  141. <option value="none" <c:if test="${'none'==model.idTokenEncryptedAlgorithm}">selected</c:if> >No encryption</option>
  142. <option value="RSA1_5" <c:if test="${'RSA1_5'==model.idTokenEncryptedAlgorithm}">selected</c:if> >RSAES-PKCS1-V1_5</option>
  143. <option value="RSA-OAEP" <c:if test="${'RSA-OAEP'==model.idTokenEncryptedAlgorithm}">selected</c:if>>RSAES using Optimal Asymmetric Encryption Padding (OAEP)</option>
  144. <option value="A128KW" <c:if test="${'A128KW'==model.idTokenEncryptedAlgorithm}">selected</c:if>>AES Key Wrap Algorithm using 128 bit keys </option>
  145. <option value="A256KW" <c:if test="${'A256KW'==model.idTokenEncryptedAlgorithm}">selected</c:if>>AES Key Wrap Algorithm using 256 bit keys</option>
  146. <option value="dir" <c:if test="${'dir'==model.idTokenEncryptedAlgorithm}">selected</c:if>>Direct use of a shared symmetric key as the Content Master Key (CMK) for the block encryption step</option>
  147. <option value="ECDH-ES" <c:if test="${'ECDH-ES'==model.idTokenEncryptedAlgorithm}">selected</c:if>>Elliptic Curve Diffie-Hellman Ephemeral Static key agreement using the Concat KDF, with the agreed-upon key being used directly as the Content Master Key (CMK)</option>
  148. <option value="ECDH-ES+A128KW" <c:if test="${'ECDH-ES+A128KW'==model.idTokenEncryptedAlgorithm}">selected</c:if>>Elliptic Curve Diffie-Hellman Ephemeral Static key agreement per ECDH-ES and Section 4.7, but where the agreed-upon key is used to wrap the Content Master Key (CMK) with the A128KW function</option>
  149. <option value="ECDH-ES+A256KW" <c:if test="${'ECDH-ES+A256KW'==model.idTokenEncryptedAlgorithm}">selected</c:if>>Elliptic Curve Diffie-Hellman Ephemeral Static key agreement per ECDH-ES and Section 4.7, but where the agreed-upon key is used to wrap the Content Master Key (CMK) with the A256KW function</option>
  150. </select>
  151. </td>
  152. <th><@locale code="apps.connect.userInfoEncryptedAlgorithm" />:</th>
  153. <td >
  154. <select id="userInfoEncryptedAlgorithm" name="userInfoEncryptedAlgorithm" >
  155. <option value="none" <c:if test="${'none'==model.userInfoEncryptedAlgorithm}">selected</c:if> >No encryption</option>
  156. <option value="RSA1_5" <c:if test="${'RSA1_5'==model.userInfoEncryptedAlgorithm}">selected</c:if> >RSAES-PKCS1-V1_5</option>
  157. <option value="RSA-OAEP" <c:if test="${'RSA-OAEP'==model.userInfoEncryptedAlgorithm}">selected</c:if>>RSAES using Optimal Asymmetric Encryption Padding (OAEP)</option>
  158. <option value="A128KW" <c:if test="${'A128KW'==model.userInfoEncryptedAlgorithm}">selected</c:if>>AES Key Wrap Algorithm using 128 bit keys </option>
  159. <option value="A256KW" <c:if test="${'A256KW'==model.userInfoEncryptedAlgorithm}">selected</c:if>>AES Key Wrap Algorithm using 256 bit keys</option>
  160. <option value="dir" <c:if test="${'dir'==model.userInfoEncryptedAlgorithm}">selected</c:if>>Direct use of a shared symmetric key as the Content Master Key (CMK) for the block encryption step</option>
  161. <option value="ECDH-ES" <c:if test="${'ECDH-ES'==model.userInfoEncryptedAlgorithm}">selected</c:if>>Elliptic Curve Diffie-Hellman Ephemeral Static key agreement using the Concat KDF, with the agreed-upon key being used directly as the Content Master Key (CMK)</option>
  162. <option value="ECDH-ES+A128KW" <c:if test="${'ECDH-ES+A128KW'==model.userInfoEncryptedAlgorithm}">selected</c:if>>Elliptic Curve Diffie-Hellman Ephemeral Static key agreement per ECDH-ES and Section 4.7, but where the agreed-upon key is used to wrap the Content Master Key (CMK) with the A128KW function</option>
  163. <option value="ECDH-ES+A256KW" <c:if test="${'ECDH-ES+A256KW'==model.userInfoEncryptedAlgorithm}">selected</c:if>>Elliptic Curve Diffie-Hellman Ephemeral Static key agreement per ECDH-ES and Section 4.7, but where the agreed-upon key is used to wrap the Content Master Key (CMK) with the A256KW function</option>
  164. </select>
  165. </td>
  166. </tr>
  167. <tr>
  168. <th><@locale code="apps.connect.idTokenEncryptionMethod" />:</th>
  169. <td >
  170. <select id="idTokenEncryptionMethod" name="idTokenEncryptionMethod" >
  171. <option value="none" <c:if test="${'none'==model.idTokenEncryptionMethod}">selected</c:if>>No encryption</option>
  172. <option value="A128CBC+HS256" <c:if test="${'A128CBC+HS256'==model.idTokenEncryptionMethod}">selected</c:if>>Composite Authenticated Encryption algorithm using AES in Cipher Block Chaining (CBC) mode with PKCS #5 padding with an integrity calculation using HMAC SHA-256, using a 256 bit CMK (and 128 bit CEK)</option>
  173. <option value="A256CBC+HS512" <c:if test="${'A256CBC+HS512'==model.idTokenEncryptionMethod}">selected</c:if>>Composite Authenticated Encryption algorithm using AES in CBC mode with PKCS #5 padding with an integrity calculation using HMAC SHA-512, using a 512 bit CMK (and 256 bit CEK)</option>
  174. <option value="A128GCM" <c:if test="${'A128GCM'==model.idTokenEncryptionMethod}">selected</c:if>>AES GCM using 128 bit keys</option>
  175. <option value="A256GCM" <c:if test="${'A256GCM'==model.idTokenEncryptionMethod}">selected</c:if>>AES GCM using 256 bit keys</option>
  176. </select>
  177. </td>
  178. <th><@locale code="apps.connect.userInfoEncryptionMethod" />:</th>
  179. <td >
  180. <select id="userInfoEncryptionMethod" name="userInfoEncryptionMethod" >
  181. <option value="none" <c:if test="${'none'==model.userInfoEncryptionMethod}">selected</c:if>>No encryption</option>
  182. <option value="A128CBC+HS256" <c:if test="${'A128CBC+HS256'==model.userInfoEncryptionMethod}">selected</c:if>>Composite Authenticated Encryption algorithm using AES in Cipher Block Chaining (CBC) mode with PKCS #5 padding with an integrity calculation using HMAC SHA-256, using a 256 bit CMK (and 128 bit CEK)</option>
  183. <option value="A256CBC+HS512" <c:if test="${'A256CBC+HS512'==model.userInfoEncryptionMethod}">selected</c:if>>Composite Authenticated Encryption algorithm using AES in CBC mode with PKCS #5 padding with an integrity calculation using HMAC SHA-512, using a 512 bit CMK (and 256 bit CEK)</option>
  184. <option value="A128GCM" <c:if test="${'A128GCM'==model.userInfoEncryptionMethod}">selected</c:if>>AES GCM using 128 bit keys</option>
  185. <option value="A256GCM" <c:if test="${'A256GCM'==model.userInfoEncryptionMethod}">selected</c:if>>AES GCM using 256 bit keys</option>
  186. </select>
  187. </td>
  188. </tr>
  189. <tr>
  190. <th><@locale code="apps.oauth.approvalPrompt" />:</th>
  191. <td >
  192. <select id="approvalPrompt" name="approvalPrompt" >
  193. <option value="force" <c:if test="${null==model.approvalPrompt}">selected</c:if>>
  194. <@locale code="apps.oauth.approvalPrompt.force" /></option>
  195. <option value="auto" <c:if test="${'auto'==model.approvalPrompt}">selected</c:if>>
  196. <@locale code="apps.oauth.approvalPrompt.auto" /></option>
  197. </select>
  198. </td>
  199. <th><@locale code="apps.isAdapter" />:</th>
  200. <td >
  201. <select id="isAdapter" name="isAdapter" >
  202. <option value="0" <c:if test="${0==model.isAdapter}">selected</c:if> >
  203. <@locale code="apps.isAdapter.no" /></option>
  204. <option value="1" <c:if test="${1==model.isAdapter}">selected</c:if> >
  205. <@locale code="apps.isAdapter.yes" /></option>
  206. </select>
  207. </td>
  208. </tr>
  209. <tr>
  210. <th><@locale code="apps.adapter" />:</th>
  211. <td colspan =3>
  212. <input type="text" id="adapter" name="adapter" title="" value="${model.adapter}"/>
  213. </td>
  214. </tr>
  215. </tbody>
  216. </table>
  217. </td>
  218. </tr>
  219. </tbody>
  220. </table>
  221. <input class="button" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
  222. <input class="button" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>
  223. </form>