admin-user-debug.jsp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. <%--
  2. ~ Password Management Servlets (PWM)
  3. ~ http://www.pwm-project.org
  4. ~
  5. ~ Copyright (c) 2006-2009 Novell, Inc.
  6. ~ Copyright (c) 2009-2017 The PWM Project
  7. ~
  8. ~ This program is free software; you can redistribute it and/or modify
  9. ~ it under the terms of the GNU General Public License as published by
  10. ~ the Free Software Foundation; either version 2 of the License, or
  11. ~ (at your option) any later version.
  12. ~
  13. ~ This program is distributed in the hope that it will be useful,
  14. ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ~ GNU General Public License for more details.
  17. ~
  18. ~ You should have received a copy of the GNU General Public License
  19. ~ along with this program; if not, write to the Free Software
  20. ~ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. --%>
  22. <%@ page import="com.novell.ldapchai.cr.Challenge" %>
  23. <%@ page import="password.pwm.Permission" %>
  24. <%@ page import="password.pwm.bean.ResponseInfoBean" %>
  25. <%@ page import="password.pwm.bean.pub.PublicUserInfoBean" %>
  26. <%@ page import="password.pwm.config.profile.ChallengeProfile" %>
  27. <%@ page import="password.pwm.config.profile.ProfileType" %>
  28. <%@ page import="password.pwm.config.profile.PwmPasswordPolicy" %>
  29. <%@ page import="password.pwm.config.profile.PwmPasswordRule" %>
  30. <%@ page import="password.pwm.http.servlet.admin.UserDebugDataBean" %>
  31. <%@ page import="password.pwm.i18n.Display" %>
  32. <%@ page import="java.util.Map" %>
  33. <!DOCTYPE html>
  34. <%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
  35. <%@ taglib uri="pwm" prefix="pwm" %>
  36. <html lang="<pwm:value name="<%=PwmValue.localeCode%>"/>" dir="<pwm:value name="<%=PwmValue.localeDir%>"/>">
  37. <%@ include file="/WEB-INF/jsp/fragment/header.jsp" %>
  38. <body class="nihilo">
  39. <div id="wrapper">
  40. <jsp:include page="/WEB-INF/jsp/fragment/header-body.jsp">
  41. <jsp:param name="pwm.PageName" value="User Debug"/>
  42. </jsp:include>
  43. <div id="centerbody" class="wide">
  44. <div id="page-content-title">User Debug</div>
  45. <%@ include file="fragment/admin-nav.jsp" %>
  46. <% final UserDebugDataBean userDebugDataBean = (UserDebugDataBean)JspUtility.getAttribute(pageContext, PwmRequestAttribute.UserDebugData); %>
  47. <% if (userDebugDataBean == null) { %>
  48. <%@ include file="/WEB-INF/jsp/fragment/message.jsp" %>
  49. <div id="panel-searchbar" class="searchbar">
  50. <form method="post" class="pwm-form">
  51. <input id="username" name="username" placeholder="<pwm:display key="Placeholder_Search"/>" title="<pwm:display key="Placeholder_Search"/>" class="helpdesk-input-username" <pwm:autofocus/> autocomplete="off"/>
  52. <input type="hidden" id="pwmFormID" name="pwmFormID" value="<pwm:FormID/>"/>
  53. <button type="submit" class="btn"><pwm:display key="Button_Search"/></button>
  54. </form>
  55. </div>
  56. <% } else { %>
  57. <div class="buttonbar">
  58. <form method="get" class="pwm-form">
  59. <button type="submit" class="btn"><pwm:display key="Button_Continue"/></button>
  60. </form>
  61. </div>
  62. <div class="buttonbar">
  63. <form method="get">
  64. <input type="hidden" name="processAction" value="<%=AdminServlet.AdminAction.downloadUserDebug.toString()%>"/>
  65. <button type="submit" class="btn">Download</button>
  66. </form>
  67. </div>
  68. <% final PublicUserInfoBean userInfo = userDebugDataBean.getPublicUserInfoBean(); %>
  69. <% if (userInfo != null) { %>
  70. <table>
  71. <tr>
  72. <td colspan="10" class="title">Identity</td>
  73. </tr>
  74. <tr>
  75. <td class="key">UserDN</td>
  76. <td><%=JspUtility.freindlyWrite(pageContext, userInfo.getUserDN())%></td>
  77. </tr>
  78. <tr>
  79. <td class="key">Ldap Profile</td>
  80. <td><%=JspUtility.freindlyWrite(pageContext, userInfo.getLdapProfile())%></td>
  81. </tr>
  82. <tr>
  83. <td class="key">Username</td>
  84. <td><%=JspUtility.freindlyWrite(pageContext, userInfo.getUserID())%></td>
  85. </tr>
  86. <tr>
  87. <td class="key"><%=PwmConstants.PWM_APP_NAME%> GUID</td>
  88. <td><%=JspUtility.freindlyWrite(pageContext, userInfo.getUserGUID())%></td>
  89. </tr>
  90. </table>
  91. <br/>
  92. <table>
  93. <tr>
  94. <td colspan="10" class="title">Status</td>
  95. </tr>
  96. <tr>
  97. <td class="key">Last Login Time</td>
  98. <td><%=JspUtility.freindlyWrite(pageContext, userInfo.getPasswordLastModifiedTime())%></td>
  99. </tr>
  100. <tr>
  101. <td class="key">Account Expiration Time</td>
  102. <td><%=JspUtility.freindlyWrite(pageContext, userInfo.getAccountExpirationTime())%></td>
  103. </tr>
  104. <tr>
  105. <td class="key">Password Expiration</td>
  106. <td><%=JspUtility.freindlyWrite(pageContext, userInfo.getPasswordExpirationTime())%></td>
  107. </tr>
  108. <tr>
  109. <td class="key">Password Last Modified</td>
  110. <td><%=JspUtility.freindlyWrite(pageContext, userInfo.getPasswordLastModifiedTime())%></td>
  111. </tr>
  112. <tr>
  113. <td class="key">Email Address</td>
  114. <td><%=JspUtility.freindlyWrite(pageContext, userInfo.getUserEmailAddress())%></td>
  115. </tr>
  116. <tr>
  117. <td class="key">Phone Number</td>
  118. <td><%=JspUtility.freindlyWrite(pageContext, userDebugDataBean.getUserInfo().getUserSmsNumber())%></td>
  119. </tr>
  120. <tr>
  121. <td class="key">Username</td>
  122. <td><%=JspUtility.freindlyWrite(pageContext, userInfo.getUserID())%></td>
  123. </tr>
  124. <tr>
  125. <td class="key">
  126. <pwm:display key="Field_PasswordExpired"/>
  127. </td>
  128. <td id="PasswordExpired">
  129. <%= JspUtility.freindlyWrite(pageContext, userInfo.getPasswordStatus().isExpired()) %>
  130. </td>
  131. </tr>
  132. <tr>
  133. <td class="key">
  134. <pwm:display key="Field_PasswordPreExpired"/>
  135. </td>
  136. <td id="PasswordPreExpired">
  137. <%= JspUtility.freindlyWrite(pageContext, userInfo.getPasswordStatus().isPreExpired()) %>
  138. </td>
  139. </tr>
  140. <tr>
  141. <td class="key">
  142. <pwm:display key="Field_PasswordWithinWarningPeriod"/>
  143. </td>
  144. <td id="PasswordWithinWarningPeriod">
  145. <%= JspUtility.freindlyWrite(pageContext, userInfo.getPasswordStatus().isWarnPeriod()) %>
  146. </td>
  147. </tr>
  148. <tr>
  149. <td class="key">
  150. <pwm:display key="Field_PasswordViolatesPolicy"/>
  151. </td>
  152. <td id="PasswordViolatesPolicy">
  153. <%= JspUtility.freindlyWrite(pageContext, userInfo.getPasswordStatus().isViolatesPolicy()) %>
  154. </td>
  155. </tr>
  156. <tr>
  157. <td class="key">
  158. Password Readable From LDAP
  159. </td>
  160. <td>
  161. <%= JspUtility.freindlyWrite(pageContext, userDebugDataBean.isPasswordReadable()) %>
  162. </td>
  163. </tr>
  164. <tr>
  165. <td class="key">
  166. Requires New Password
  167. </td>
  168. <td>
  169. <%= JspUtility.freindlyWrite(pageContext, userInfo.isRequiresNewPassword()) %>
  170. </td>
  171. </tr>
  172. <tr>
  173. <td class="key">
  174. Requires Response Setup
  175. </td>
  176. <td>
  177. <%= JspUtility.freindlyWrite(pageContext, userInfo.isRequiresResponseConfig()) %>
  178. </td>
  179. </tr>
  180. <tr>
  181. <td class="key">
  182. Requires OTP Setup
  183. </td>
  184. <td>
  185. <%= JspUtility.freindlyWrite(pageContext, userInfo.isRequiresOtpConfig()) %>
  186. </td>
  187. </tr>
  188. <tr>
  189. <td class="key">
  190. Requires Profile Update
  191. </td>
  192. <td>
  193. <%= JspUtility.freindlyWrite(pageContext, userInfo.isRequiresUpdateProfile()) %>
  194. </td>
  195. </tr>
  196. </table>
  197. <br/>
  198. <table>
  199. <tr>
  200. <td colspan="10" class="title">Applied Configuration</td>
  201. </tr>
  202. <tr>
  203. <td class="key">Profiles</td>
  204. <td>
  205. <table>
  206. <tr>
  207. <td class="key">Service</td>
  208. <td class="key">ProfileID</td>
  209. </tr>
  210. <% for (final ProfileType profileType : userDebugDataBean.getProfiles().keySet()) { %>
  211. <tr>
  212. <td><%=profileType%></td>
  213. <td><%=JspUtility.freindlyWrite(pageContext, userDebugDataBean.getProfiles().get(profileType))%></td>
  214. </tr>
  215. <% } %>
  216. </table>
  217. </td>
  218. </tr>
  219. <tr>
  220. <td class="key">Permissions</td>
  221. <td>
  222. <table>
  223. <tr>
  224. <td class="key">Permission</td>
  225. <td class="key">Status</td>
  226. </tr>
  227. <% for (final Permission permission : userDebugDataBean.getPermissions().keySet()) { %>
  228. <tr>
  229. <td><%=permission%></td>
  230. <td><%=JspUtility.freindlyWrite(pageContext, userDebugDataBean.getPermissions().get(permission))%></td>
  231. </tr>
  232. <% } %>
  233. </table>
  234. </td>
  235. </tr>
  236. </table>
  237. <br/>
  238. <table>
  239. <tr>
  240. <td colspan="10" class="title">Password Policy</td>
  241. </tr>
  242. <% PwmPasswordPolicy userPolicy = userDebugDataBean.getUserInfo().getPasswordPolicy(); %>
  243. <% if (userPolicy != null) { %>
  244. <% PwmPasswordPolicy configPolicy = userDebugDataBean.getConfiguredPasswordPolicy(); %>
  245. <% PwmPasswordPolicy ldapPolicy = userDebugDataBean.getLdapPasswordPolicy(); %>
  246. <tr>
  247. <td colspan="10">
  248. <table>
  249. <tr class="title">
  250. <td class="key" style="width: 1px;">Rule</td>
  251. <td class="key" style="width: 1px;">Rule Type</td>
  252. <td class="key" style="width: 20%;">Configured <%=PwmConstants.PWM_APP_NAME%> Policy</td>
  253. <td class="key" style="width: 20%;">LDAP Policy</td>
  254. <td class="key" style="width: 20%;">Effective Policy</td>
  255. </tr>
  256. <tr>
  257. <td>ID</td>
  258. <td><pwm:display key="<%=Display.Value_NotApplicable.toString()%>"/></td>
  259. <td><%=JspUtility.freindlyWrite(pageContext, configPolicy.getIdentifier())%></td>
  260. <td><%=JspUtility.freindlyWrite(pageContext, ldapPolicy.getIdentifier())%></td>
  261. <td><%=JspUtility.freindlyWrite(pageContext, userPolicy.getIdentifier())%></td>
  262. </tr>
  263. <tr>
  264. <td>Display Name</td>
  265. <td><pwm:display key="<%=Display.Value_NotApplicable.toString()%>"/></td>
  266. <td><%=JspUtility.freindlyWrite(pageContext, configPolicy.getDisplayName(JspUtility.locale(request)))%></td>
  267. <td><%=JspUtility.freindlyWrite(pageContext, ldapPolicy.getDisplayName(JspUtility.locale(request)))%></td>
  268. <td><%=JspUtility.freindlyWrite(pageContext, userPolicy.getDisplayName(JspUtility.locale(request)))%></td>
  269. </tr>
  270. <% for (final PwmPasswordRule rule : PwmPasswordRule.values()) { %>
  271. <tr>
  272. <td><span title="<%=rule.getKey()%>"><%=rule.getLabel(JspUtility.locale(request), JspUtility.getPwmRequest(pageContext).getConfig())%></span></td>
  273. <td><%=rule.getRuleType()%></td>
  274. <td><%=JspUtility.freindlyWrite(pageContext, configPolicy.getValue(rule))%></td>
  275. <td><%=JspUtility.freindlyWrite(pageContext, ldapPolicy.getValue(rule))%></td>
  276. <td><%=JspUtility.freindlyWrite(pageContext, userPolicy.getValue(rule))%></td>
  277. </tr>
  278. <% } %>
  279. </table>
  280. </td>
  281. </tr>
  282. <% } %>
  283. </table>
  284. <br/>
  285. <table>
  286. <tr>
  287. <td colspan="10" class="title">Stored Responses</td>
  288. </tr>
  289. <% final ResponseInfoBean responseInfoBean = userDebugDataBean.getUserInfo().getResponseInfoBean(); %>
  290. <% if (responseInfoBean == null) { %>
  291. <tr>
  292. <td>Stored Responses</td>
  293. <td><pwm:display key="<%=Display.Value_NotApplicable.toString()%>"/></td>
  294. </tr>
  295. <% } else { %>
  296. <tr>
  297. <td>Identifier</td>
  298. <td><%=responseInfoBean.getCsIdentifier()%></td>
  299. </tr>
  300. <tr>
  301. <td>Storage Type</td>
  302. <td><%=responseInfoBean.getDataStorageMethod()%></td>
  303. </tr>
  304. <tr>
  305. <td>Format</td>
  306. <td><%=responseInfoBean.getFormatType()%></td>
  307. </tr>
  308. <tr>
  309. <td>Locale</td>
  310. <td><%=responseInfoBean.getLocale()%></td>
  311. </tr>
  312. <tr>
  313. <td>Storage Timestamp</td>
  314. <td><%=JspUtility.freindlyWrite(pageContext, responseInfoBean.getTimestamp())%></td>
  315. </tr>
  316. <tr>
  317. <td>Answered Challenges</td>
  318. <% final Map<Challenge,String> crMap = responseInfoBean.getCrMap(); %>
  319. <% if (crMap == null) { %>
  320. <td>
  321. n/a
  322. </td>
  323. <% } else { %>
  324. <td>
  325. <table>
  326. <tr>
  327. <td class="key">Type</td>
  328. <td class="key">Required</td>
  329. <td class="key">Text</td>
  330. </tr>
  331. <% for (final Challenge challenge : crMap.keySet()) { %>
  332. <tr>
  333. <td>
  334. <%= challenge.isAdminDefined() ? "Admin Defined" : "User Defined" %>
  335. </td>
  336. <td>
  337. <%= JspUtility.freindlyWrite(pageContext, challenge.isRequired())%>
  338. </td>
  339. <td>
  340. <%= JspUtility.freindlyWrite(pageContext, challenge.getChallengeText())%>
  341. </td>
  342. </tr>
  343. <% } %>
  344. </table>
  345. </td>
  346. <% } %>
  347. </tr>
  348. <tr>
  349. <td>
  350. Minimum Randoms Required
  351. </td>
  352. <td>
  353. <%=responseInfoBean.getMinRandoms()%>
  354. </td>
  355. </tr>
  356. <tr>
  357. <td>Helpdesk Answered Challenges</td>
  358. <% final Map<Challenge,String> helpdeskCrMap = responseInfoBean.getHelpdeskCrMap(); %>
  359. <% if (helpdeskCrMap == null) { %>
  360. <td>
  361. <pwm:display key="<%=Display.Value_NotApplicable.toString()%>"/>
  362. </td>
  363. <% } else { %>
  364. <td>
  365. <% for (final Challenge challenge : helpdeskCrMap.keySet()) { %>
  366. <%= JspUtility.freindlyWrite(pageContext, challenge.getChallengeText())%><br/>
  367. <% } %>
  368. </td>
  369. <% } %>
  370. </tr>
  371. <% } %>
  372. </table>
  373. <br/>
  374. <table>
  375. <tr>
  376. <td colspan="10" class="title">Challenge Profile</td>
  377. </tr>
  378. <% final ChallengeProfile challengeProfile = userDebugDataBean.getUserInfo().getChallengeProfile(); %>
  379. <% if (challengeProfile == null) { %>
  380. <tr>
  381. <td>Assigned Profile</td>
  382. <td><pwm:display key="<%=Display.Value_NotApplicable.toString()%>"/></td>
  383. </tr>
  384. <% } else { %>
  385. <tr>
  386. <td>Display Name</td>
  387. <td><%=challengeProfile.getDisplayName(JspUtility.locale(request))%></td>
  388. </tr>
  389. <tr>
  390. <td>Identifier</td>
  391. <td><%=challengeProfile.getIdentifier()%></td>
  392. </tr>
  393. <tr>
  394. <td>Locale</td>
  395. <td><%=challengeProfile.getLocale()%></td>
  396. </tr>
  397. <tr>
  398. <td>Challenges</td>
  399. <td>
  400. <table>
  401. <tr>
  402. <td class="key">Type</td>
  403. <td class="key">Text</td>
  404. <td class="key">Required</td>
  405. <td class="key">Min Length</td>
  406. <td class="key">Max Length</td>
  407. <td class="key">Enforce Wordlist</td>
  408. <td class="key">Max Question Characters</td>
  409. </tr>
  410. <% for (final Challenge challenge : challengeProfile.getChallengeSet().getChallenges()) { %>
  411. <tr>
  412. <td>
  413. <%= challenge.isAdminDefined() ? "Admin Defined" : "User Defined" %>
  414. </td>
  415. <td>
  416. <%= JspUtility.freindlyWrite(pageContext, challenge.getChallengeText())%>
  417. </td>
  418. <td>
  419. <%= JspUtility.freindlyWrite(pageContext, challenge.isRequired())%>
  420. </td>
  421. <td>
  422. <%= challenge.getMinLength() %>
  423. </td>
  424. <td>
  425. <%= challenge.getMaxLength() %>
  426. </td>
  427. <td>
  428. <%= JspUtility.freindlyWrite(pageContext, challenge.isEnforceWordlist())%>
  429. </td>
  430. <td>
  431. <%= challenge.getMaxQuestionCharsInAnswer() %>
  432. </td>
  433. </tr>
  434. <% } %>
  435. </table>
  436. </td>
  437. </tr>
  438. <% } %>
  439. </table>
  440. <% } %>
  441. <div class="buttonbar">
  442. <form method="get" class="pwm-form">
  443. <button type="submit" class="btn"><pwm:display key="Button_Continue"/></button>
  444. </form>
  445. </div>
  446. <% } %>
  447. </div>
  448. <div class="push"></div>
  449. </div>
  450. <jsp:include page="/WEB-INF/jsp/fragment/footer.jsp"/>
  451. </body>
  452. </html>