client-keys.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">
  2. <ol class="breadcrumb">
  3. <li><a href="#/realms/{{realm.realm}}/clients">{{:: 'clients' | translate}}</a></li>
  4. <li>{{client.clientId}}</li>
  5. </ol>
  6. <kc-tabs-client></kc-tabs-client>
  7. <form class="form-horizontal" name="keyForm" novalidate kc-read-only="!client.access.configure">
  8. <fieldset>
  9. <legend collapsed><span class="text">{{:: 'import-keys-and-cert' | translate}}</span> <kc-tooltip>{{:: 'import-keys-and-cert.tooltip' | translate}}</kc-tooltip></legend>
  10. <div class="form-group">
  11. <label class="col-md-2 control-label" for="uploadKeyFormat">{{:: 'archive-format' | translate}}</label>
  12. <div class="col-sm-6">
  13. <div>
  14. <select class="form-control" id="uploadKeyFormat"
  15. ng-model="uploadKeyFormat"
  16. ng-options="f for f in keyFormats">
  17. </select>
  18. </div>
  19. </div>
  20. <kc-tooltip>{{:: 'archive-format.tooltip' | translate}}</kc-tooltip>
  21. </div>
  22. <div class="form-group">
  23. <label class="col-md-2 control-label" for="uploadKeyAlias">{{:: 'key-alias' | translate}}</label>
  24. <div class="col-md-6">
  25. <input class="form-control" type="text" id="uploadKeyAlias" name="uploadKeyAlias" data-ng-model="uploadKeyAlias" autofocus required>
  26. </div>
  27. <kc-tooltip>{{:: 'key-alias.tooltip' | translate}}</kc-tooltip>
  28. </div>
  29. <div class="form-group">
  30. <label class="col-md-2 control-label" for="uploadKeyPas">{{:: 'key-password' | translate}}</label>
  31. <div class="col-md-6">
  32. <input class="form-control" kc-password id="uploadKeyPas" name="uploadKeyPassword" data-ng-model="uploadKeyPassword" autofocus required>
  33. </div>
  34. <kc-tooltip>{{:: 'key-password.tooltip' | translate}}</kc-tooltip>
  35. </div>
  36. <div class="form-group">
  37. <label class="col-md-2 control-label" for="uploadStorePas">{{:: 'store-password' | translate}}</label>
  38. <div class="col-md-6">
  39. <input class="form-control" kc-password id="uploadStorePas" name="uploadStorePas" data-ng-model="uploadStorePassword" autofocus required>
  40. </div>
  41. <kc-tooltip>{{:: 'store-password.tooltip' | translate}}</kc-tooltip>
  42. </div>
  43. <div class="form-group">
  44. <label class="col-md-2 control-label">{{:: 'upload-keys' | translate}} </label>
  45. <div class="col-md-6">
  46. <div class="controls kc-button-input-file" data-ng-show="!files || files.length == 0">
  47. <a href="#" class="btn btn-default"><span class="kc-icon-upload">Icon: Upload</span>{{:: 'choose-a-file.placeholder' | translate}}</a>
  48. <input id="import-file" type="file" class="transparent" ng-file-select="onFileSelect($files)">
  49. </div>
  50. <span class="kc-uploaded-file" data-ng-show="files.length > 0">
  51. {{files[0].name}}
  52. </span>
  53. </div>
  54. </div>
  55. <div class="pull-right form-actions" data-ng-show="files.length > 0">
  56. <button type="submit" data-ng-click="clearFileSelect()" class="btn btn-lg btn-default">{{:: 'cancel' | translate}}</button>
  57. <button type="submit" data-ng-click="uploadFile()" class="btn btn-lg btn-primary">{{:: 'upload' | translate}}</button>
  58. </div>
  59. </fieldset>
  60. <fieldset class="form-group col-sm-10" data-ng-hide="!keyInfo.privateKey">
  61. <legend collapsed><span class="text">{{:: 'download-keys-and-cert' | translate}}</span> <kc-tooltip>Client key pair, cert, and realm certificate will be stuffed into a PKCS12 or Java keystore that you can use in your clients.</kc-tooltip></legend>
  62. <div class="form-group">
  63. <label class="col-md-2 control-label" for="downloadKeyFormat">{{:: 'archive-format' | translate}}</label>
  64. <div class="col-sm-6">
  65. <div>
  66. <select class="form-control" id="downloadKeyFormat"
  67. ng-model="jks.format"
  68. ng-options="f for f in keyFormats">
  69. </select>
  70. </div>
  71. </div>
  72. <kc-tooltip>Java keystore or PKCS12 archive format.</kc-tooltip>
  73. </div>
  74. <div class="form-group">
  75. <label class="col-md-2 control-label" for="keyAlias">Key Alias</label>
  76. <div class="col-md-6">
  77. <input class="form-control" type="text" id="keyAlias" name="keyAlias" data-ng-model="jks.keyAlias" autofocus required>
  78. </div>
  79. <kc-tooltip>Archive alias for your private key and certificate.</kc-tooltip>
  80. </div>
  81. <div class="form-group">
  82. <label class="col-md-2 control-label" for="keyPas">Key Password</label>
  83. <div class="col-md-6">
  84. <input class="form-control" kc-password id="keyPas" name="keyPas" data-ng-model="jks.keyPassword" autofocus required>
  85. </div>
  86. <kc-tooltip>Password to access the private key in the archive</kc-tooltip>
  87. </div>
  88. <div class="form-group">
  89. <label class="col-md-2 control-label" for="realmAlias">Realm Certificate Alias</label>
  90. <div class="col-md-6">
  91. <input class="form-control" type="text" id="realmAlias" name="realmAlias" data-ng-model="jks.realmAlias" autofocus required>
  92. </div>
  93. <kc-tooltip>Realm certificate is stored in archive too. This is the alias to it.</kc-tooltip>
  94. </div>
  95. <div class="form-group">
  96. <label class="col-md-2 control-label" for="storePas">Store Password</label>
  97. <div class="col-md-6">
  98. <input class="form-control" kc-password id="storePas" name="storePas" data-ng-model="jks.storePassword" autofocus required>
  99. </div>
  100. <kc-tooltip>Password to access the archive itself</kc-tooltip>
  101. </div>
  102. <div class="form-group" data-ng-show="access.manageRealm">
  103. <div class="pull-right">
  104. <button class="btn btn-primary" type="submit" data-ng-click="downloadJKS()">Download</button>
  105. </div>
  106. </div>
  107. </fieldset>
  108. <fieldset class="form-group col-sm-10">
  109. <legend><span class="text">Keys and Certificate</span> <kc-tooltip>Keys and cert in PEM format.</kc-tooltip></legend>
  110. <div class="form-group" data-ng-hide="!keyInfo.privateKey">
  111. <label class="col-md-2 control-label" for="publicKey">Private key</label>
  112. <div class="col-sm-10">
  113. <textarea type="text" id="Private" name="publicKey" class="form-control" rows="5"
  114. kc-select-action="click" readonly>{{keyInfo.privateKey}}</textarea>
  115. </div>
  116. </div>
  117. <div class="form-group" data-ng-hide="!keyInfo.privateKey">
  118. <label class="col-md-2 control-label" for="publicKey">Public key</label>
  119. <div class="col-sm-10">
  120. <textarea type="text" id="publicKey" name="publicKey" class="form-control" rows="5"
  121. kc-select-action="click" readonly>{{keyInfo.publicKey}}</textarea>
  122. </div>
  123. </div>
  124. <div class="form-group" data-ng-hide="!keyInfo.privateKey">
  125. <label class="col-md-2 control-label" for="publicKey">Certificate</label>
  126. <div class="col-sm-10">
  127. <textarea type="text" id="certificate" name="certificate" class="form-control" rows="5"
  128. kc-select-action="click" readonly>{{keyInfo.certificate}}</textarea>
  129. </div>
  130. </div>
  131. <div class="form-group" data-ng-show="client.access.configure">
  132. <div class="pull-right">
  133. <button class="btn btn-primary" type="submit" data-ng-click="generate()">Generate new keys</button>
  134. </div>
  135. </div>
  136. </fieldset>
  137. </form>
  138. </div>
  139. <kc-menu></kc-menu>