masterpassword.rst 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. .. _rest_api_masterpassword:
  2. Keystore Password
  3. =================
  4. The ``keystore password`` is used to encrypt the GeoServer key store and for an emergency login using
  5. the user ``root``.
  6. .. warning::
  7. The use of HTTPS is recommended, otherwise all password are sent in plain text.
  8. ``/security/masterpw[.<format>]``
  9. ---------------------------------
  10. Fetches the keystore password and allows to change the keystore password
  11. .. list-table::
  12. :header-rows: 1
  13. * - Method
  14. - Action
  15. - Status code
  16. - Formats
  17. - Default Format
  18. * - GET
  19. - Fetch the keystore password
  20. - 200,403
  21. - XML, JSON
  22. -
  23. * - PUT
  24. - Changes the keystore password
  25. - 200,405,422
  26. - XML, JSON
  27. -
  28. Formats for PUT (keystore password change).
  29. **XML**
  30. .. code-block:: xml
  31. <masterPassword>
  32. <oldMasterPassword>oldPassword</oldMasterPassword>
  33. <newMasterPassword>newPassword</newMasterPassword>
  34. </masterPassword>
  35. **JSON**
  36. .. code-block:: json
  37. { "oldMasterPassword":"oldPassword",
  38. "newMasterPassword":"newPassword" }
  39. Exceptions
  40. ~~~~~~~~~~
  41. .. list-table::
  42. :header-rows: 1
  43. * - Exception
  44. - Status code
  45. * - GET without administrative privileges
  46. - 403
  47. * - PUT without administrative privileges
  48. - 405
  49. * - PUT with the wrong current keystore password
  50. - 422
  51. * - PUT with a new keystore password rejected by the password policy
  52. - 422