Skip to main content
Pentaho Documentation

LDAP Resource

Overview

Resource allows reading and updating LDAP settings.

Overview

Resource allows reading and updating LDAP settings.

The following resources are applicable:

/ldap/config/getAttributeValues

GET

Retrieve the LDAP attributes of the repository.

Example Request:
GET pentaho-di/api/ldap/config/getAttributeValues

Response Body

element: (custom)
media types: application/json

An AttributeSet object containing LDAP attributes of the repository.

Example Response:

{
"attributes": [
{
"key": "allAuthoritiesSearch.searchBase",
"value": "ou=roles"
},
{
"key": "allUsernamesSearch.searchBase",
"value": "ou=users"
},
{
"key": "userSearch.searchFilter",
"value": "(cn={0})"
},
{
"key": "securityProvider",
"value": "jackrabbit"
},
{
"key": "populator.groupRoleAttribute",
"value": "cn"
},
{
"key": "allUsernamesSearch.usernameAttribute",
"value": "uid"
},
{
"key": "populator.groupSearchBase",
"value": "ou=roles"
},
{
"key": "contextSource.providerUrl",
"value": "ldap://localhost:10389/ou=system"
},
{
"key": "populator.searchSubtree",
"value": "false"
},
{
"key": "allUsernamesSearch.searchFilter",
"value": "objectClass=Person"
},
{
"key": "populator.convertToUpperCase",
"value": "false"
},
{
"key": "populator.rolePrefix",
"value": ""
},
{
"key": "contextSource.password",
"value": "secret"
},
{
"key": "userSearch.searchBase",
"value": "ou=users"
},
{
"key": "allAuthoritiesSearch.roleAttribute",
"value": "cn"
},
{
"key": "adminUser",
"value": "uid=admin,ou=users"
},
{
"key": "contextSource.userDn",
"value": "uid=admin,ou=system"
},
{
"key": "allAuthoritiesSearch.searchFilter",
"value": "(objectClass=organizationalRole)"
},
{
"key": "populator.groupSearchFilter",
"value": "(roleOccupant={0})"
},
{
"key": "adminRole",
"value": "cn=Administrator,ou=roles"
}
]
}

Status Codes

code description
200 Successfully retrieved the LDAP attributes of the repository.
500 Server Error.

/ldap/config/setAttributeValues

PUT

Writes LDAP attributes with new authentication parameters.

Example Request:
PUT pentaho-di/api/ldap/config/setAttributeValues
PUT data:

{
"attributes": [
{
"key": "allAuthoritiesSearch.searchBase",
"value": "ou=roles"
},
{
"key": "allUsernamesSearch.searchBase",
"value": "ou=users"
},
{
"key": "userSearch.searchFilter",
"value": "(cn={0})"
},
{
"key": "securityProvider",
"value": "jackrabbit"
},
{
"key": "populator.groupRoleAttribute",
"value": "cn"
},
{
"key": "allUsernamesSearch.usernameAttribute",
"value": "uid"
},
{
"key": "populator.groupSearchBase",
"value": "ou=roles"
},
{
"key": "contextSource.providerUrl",
"value": "ldap://localhost:10389/ou=system"
},
{
"key": "populator.searchSubtree",
"value": "false"
},
{
"key": "allUsernamesSearch.searchFilter",
"value": "objectClass=Person"
},
{
"key": "populator.convertToUpperCase",
"value": "false"
},
{
"key": "populator.rolePrefix",
"value": ""
},
{
"key": "contextSource.password",
"value": "secret"
},
{
"key": "userSearch.searchBase",
"value": "ou=users"
},
{
"key": "allAuthoritiesSearch.roleAttribute",
"value": "cn"
},
{
"key": "adminUser",
"value": "uid=admin,ou=users"
},
{
"key": "contextSource.userDn",
"value": "uid=admin,ou=system"
},
{
"key": "allAuthoritiesSearch.searchFilter",
"value": "(objectClass=organizationalRole)"
},
{
"key": "populator.groupSearchFilter",
"value": "(roleOccupant={0})"
},
{
"key": "adminRole",
"value": "cn=Administrator,ou=roles"
}
]
}

Request Body

element: (custom)
media types: application/json

An AttributeSet representing the new authentication parameters

Response Body

element: (custom)
media types: */*
application/xml
application/octet-stream

A jax-rs Response object with the appropriate status code, header, and body.

Example Response:

This response does not contain data.

Status Codes

code description
200 Successfully retrieved the LDAP attributes of the repository.
500 Server Error.

Copyright © Pentaho.com