appAdd.jsp 12 KB

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