ldap-ocs.feature 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. Feature: LDAP
  2. Background:
  3. Given using api version "2"
  4. Scenario: Creating an new, empty configuration
  5. Given As an "admin"
  6. When sending "POST" to "/apps/user_ldap/api/v1/config"
  7. Then the OCS status code should be "200"
  8. And the HTTP status code should be "200"
  9. And the response should contain a tag "configID"
  10. Scenario: Delete a non-existing configuration
  11. Given As an "admin"
  12. When sending "DELETE" to "/apps/user_ldap/api/v1/config/s666"
  13. Then the OCS status code should be "404"
  14. And the HTTP status code should be "404"
  15. Scenario: Create and delete a configuration
  16. Given As an "admin"
  17. And creating an LDAP configuration at "/apps/user_ldap/api/v1/config"
  18. When deleting the LDAP configuration
  19. Then the OCS status code should be "200"
  20. And the HTTP status code should be "200"
  21. Scenario: Create and modify a configuration
  22. Given As an "admin"
  23. And creating an LDAP configuration at "/apps/user_ldap/api/v1/config"
  24. When setting the LDAP configuration to
  25. | configData[ldapHost] | ldaps://my.ldap.server |
  26. Then the OCS status code should be "200"
  27. And the HTTP status code should be "200"
  28. Scenario: Modifying a non-existing configuration
  29. Given As an "admin"
  30. When sending "PUT" to "/apps/user_ldap/api/v1/config/s666" with
  31. | configData[ldapHost] | ldaps://my.ldap.server |
  32. Then the OCS status code should be "404"
  33. And the HTTP status code should be "404"
  34. Scenario: Modifying an existing configuration with malformed configData
  35. Given As an "admin"
  36. And creating an LDAP configuration at "/apps/user_ldap/api/v1/config"
  37. When setting the LDAP configuration to
  38. | configData | ldapHost=ldaps://my.ldap.server |
  39. Then the OCS status code should be "400"
  40. And the HTTP status code should be "400"
  41. Scenario: create, modify and get a configuration
  42. Given As an "admin"
  43. And creating an LDAP configuration at "/apps/user_ldap/api/v1/config"
  44. And setting the LDAP configuration to
  45. | configData[ldapHost] | ldaps://my.ldap.server |
  46. | configData[ldapLoginFilter] | (&(\|(objectclass=inetOrgPerson))(uid=%uid)) |
  47. | configData[ldapAgentPassword] | psst,secret |
  48. When getting the LDAP configuration with showPassword "0"
  49. Then the OCS status code should be "200"
  50. And the HTTP status code should be "200"
  51. And the response should contain a tag "ldapHost" with value "ldaps://my.ldap.server"
  52. And the response should contain a tag "ldapLoginFilter" with value "(&(|(objectclass=inetOrgPerson))(uid=%uid))"
  53. And the response should contain a tag "ldapAgentPassword" with value "***"
  54. Scenario: receiving password in plain text
  55. Given As an "admin"
  56. And creating an LDAP configuration at "/apps/user_ldap/api/v1/config"
  57. And setting the LDAP configuration to
  58. | configData[ldapAgentPassword] | psst,secret |
  59. When getting the LDAP configuration with showPassword "1"
  60. Then the OCS status code should be "200"
  61. And the HTTP status code should be "200"
  62. And the response should contain a tag "ldapAgentPassword" with value "psst,secret"