You are here

README.txt in Lightweight Directory Access Protocol (LDAP) 7

// $Id: README.txt,v 1.2 2010/12/29 01:37:46 johnbarclay Exp $

Vocubulary of LDAP Authorization and its Code

----------------------
"Consumer"
----------------------
The "consumer" or entity that authorization is being granted.

Examples:  Drupal role, Organic Group group

----------------------
"Consumer Type"
----------------------
Machine ID of a consumer.  This is used in naming conventionss.

Examples:  drupal_role, og_group

----------------------
"Consumer Module"
----------------------
The module that bridges ldap_authorization and the consumer.
It needs to (1) provide a class: LdapAuthorizationConsumer<consumer_type>
and (2) implement hook_ldap_authorization_consumer.

Examples:  ldap_authorization_drupal_role


----------------------
"Authorization ID" aka "Consumer ID"
----------------------
The id of an individual authorization such as a drupal role or organic group.

Examples:  "authenticated user", "admin" (for drupal roles)
Examples:  "knitters on skates", "vacationing programmers" (og group names for organic groups)


----------------------
"Consumer Configuration"
----------------------
Configuration of how a users ldap attributes will
determine a set of Consumer ids the user should be granted.
Represented by LdapAuthorizationConsumerConf and LdapAuthorizationConsumerConfAdmin classes
and managed at /admin/config/people/ldap/authorization.  Stored in ldap_authorization database table.

---------------------
LDAP Server Configuration
---------------------
Each Consumer Configuration will use a single ldap server configuration to bind
and query ldap.  The ldap server configuration is also used to map the drupal
username to an ldap user entry.


----------------------
LDAP Authorization data storage:
---------------------

Authorization data is stored in user->data array.  Ultimately these should be stored in $user entity fields to make integration with other modules better.

$user->data['ldap_authorizations'][<consumerType>][<authorization_id>] => attributes

such as:

$user->data = array(
  'ldap_authorizations' => array(
    'og_group' => array (
      '3-2' => array (
        'date_granted' => 1329105152,
      ),
      '2-3' => array (
        'date_granted' => 1329105152,
      ),
    ),
    'drupal_role' => array (
      '7' => array (
        'date_granted' => 1329105152,
      ),
      '5' => array (
        'date_granted' => 1329105152,
      ),
    ),
  );

File

ldap_authorization/README.txt
View source
  1. // $Id: README.txt,v 1.2 2010/12/29 01:37:46 johnbarclay Exp $
  2. Vocubulary of LDAP Authorization and its Code
  3. ----------------------
  4. "Consumer"
  5. ----------------------
  6. The "consumer" or entity that authorization is being granted.
  7. Examples: Drupal role, Organic Group group
  8. ----------------------
  9. "Consumer Type"
  10. ----------------------
  11. Machine ID of a consumer. This is used in naming conventionss.
  12. Examples: drupal_role, og_group
  13. ----------------------
  14. "Consumer Module"
  15. ----------------------
  16. The module that bridges ldap_authorization and the consumer.
  17. It needs to (1) provide a class: LdapAuthorizationConsumer
  18. and (2) implement hook_ldap_authorization_consumer.
  19. Examples: ldap_authorization_drupal_role
  20. ----------------------
  21. "Authorization ID" aka "Consumer ID"
  22. ----------------------
  23. The id of an individual authorization such as a drupal role or organic group.
  24. Examples: "authenticated user", "admin" (for drupal roles)
  25. Examples: "knitters on skates", "vacationing programmers" (og group names for organic groups)
  26. ----------------------
  27. "Consumer Configuration"
  28. ----------------------
  29. Configuration of how a users ldap attributes will
  30. determine a set of Consumer ids the user should be granted.
  31. Represented by LdapAuthorizationConsumerConf and LdapAuthorizationConsumerConfAdmin classes
  32. and managed at /admin/config/people/ldap/authorization. Stored in ldap_authorization database table.
  33. ---------------------
  34. LDAP Server Configuration
  35. ---------------------
  36. Each Consumer Configuration will use a single ldap server configuration to bind
  37. and query ldap. The ldap server configuration is also used to map the drupal
  38. username to an ldap user entry.
  39. ----------------------
  40. LDAP Authorization data storage:
  41. ---------------------
  42. Authorization data is stored in user->data array. Ultimately these should be stored in $user entity fields to make integration with other modules better.
  43. $user->data['ldap_authorizations'][][] => attributes
  44. such as:
  45. $user->data = array(
  46. 'ldap_authorizations' => array(
  47. 'og_group' => array (
  48. '3-2' => array (
  49. 'date_granted' => 1329105152,
  50. ),
  51. '2-3' => array (
  52. 'date_granted' => 1329105152,
  53. ),
  54. ),
  55. 'drupal_role' => array (
  56. '7' => array (
  57. 'date_granted' => 1329105152,
  58. ),
  59. '5' => array (
  60. 'date_granted' => 1329105152,
  61. ),
  62. ),
  63. );