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