2
0

appUpdate.jsp 17 KB

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