Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Barchiesi
OpenLDAP
Commits
f415a8dd
Commit
f415a8dd
authored
14 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
ITS#6521
parent
9e25b62a
No related branches found
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES
+1
-0
1 addition, 0 deletions
CHANGES
doc/guide/admin/overlays.sdf
+50
-17
50 additions, 17 deletions
doc/guide/admin/overlays.sdf
with
51 additions
and
17 deletions
CHANGES
+
1
−
0
View file @
f415a8dd
...
...
@@ -119,6 +119,7 @@ OpenLDAP 2.4.24 Engineering
admin24 guide fix examples (ITS#6681)
admin24 guide typo fixes (ITS#6609)
admin24 guide refint rootdn requirement (ITS#6364)
admin24 add pcache overlay section (ITS#6521)
ldap_open(3) document ldap_set_urllist_proc (ITS#6601)
slapo-refint(5) rootdn requirement (ITS#6364)
...
...
This diff is collapsed.
Click to expand it.
doc/guide/admin/overlays.sdf
+
50
−
17
View file @
f415a8dd
...
...
@@ -724,13 +724,13 @@ design and implementation details.
H3: Proxy Cache Configuration
The cache configuration specific directives described below must
appear after a {{EX:overlay p
roxy
cache}} directive within a
{{EX:"database meta"}} or {{EX:database ldap}} section of
appear after a {{EX:overlay pcache}} directive within a
{{EX:"database meta"}} or {{EX:
"
database ldap
"
}} section of
the server's {{slapd.conf}}(5) file.
H4: Setting cache parameters
> p
roxyC
ache <DB> <maxentries> <nattrsets> <entrylimit> <period>
> p
c
ache <DB> <maxentries> <nattrsets> <entrylimit> <period>
This directive enables proxy caching and sets general cache
parameters. The <DB> parameter specifies which underlying database
...
...
@@ -738,7 +738,7 @@ is to be used to hold cached entries. It should be set to
{{EX:bdb}} or {{EX:hdb}}. The <maxentries> parameter specifies the
total number of entries which may be held in the cache. The
<nattrsets> parameter specifies the total number of attribute sets
(as specified by the {{EX:p
roxy
Attr
S
et}} directive) that may be
(as specified by the {{EX:p
cache
Attr
s
et}} directive) that may be
defined. The <entrylimit> parameter specifies the maximum number of
entries in a cacheable query. The <period> specifies the consistency
check period (in seconds). In each period, queries with expired
...
...
@@ -746,16 +746,16 @@ TTLs are removed.
H4: Defining attribute sets
> p
roxy
Attrset <index> <attrs...>
> p
cache
Attrset <index> <attrs...>
Used to associate a set of attributes to an index. Each attribute
set is associated with an index number from 0 to <numattrsets>-1.
These indices are used by the p
roxy
Template directive to define
These indices are used by the p
cache
Template directive to define
cacheable templates.
H4: Specifying cacheable templates
> p
roxy
Template <prototype_string> <attrset_index> <TTL>
> p
cache
Template <prototype_string> <attrset_index> <TTL>
Specifies a cacheable template and the "time to live" (in sec) <TTL>
for queries belonging to the template. A template is described by
...
...
@@ -763,7 +763,7 @@ its prototype filter string and set of required attributes identified
by <attrset_index>.
H4: Example
H4: Example
for slapd.conf
An example {{slapd.conf}}(5) database section for a caching server
which proxies for the {{EX:"dc=example,dc=com"}} subtree held
...
...
@@ -773,27 +773,60 @@ at server {{EX:ldap.example.com}}.
> suffix "dc=example,dc=com"
> rootdn "dc=example,dc=com"
> uri ldap://ldap.example.com/
> overlay p
roxy
cache
> p
roxy
cache bdb 100000 1 1000 100
> p
roxy
Attrset 0 mail postaladdress telephonenumber
> p
roxy
Template (sn=) 0 3600
> p
roxy
Template (&(sn=)(givenName=)) 0 3600
> p
roxy
Template (&(departmentNumber=)(secretary=*)) 0 3600
> overlay pcache
> pcache
bdb 100000 1 1000 100
> p
cache
Attrset 0 mail postaladdress telephonenumber
> p
cache
Template (sn=) 0 3600
> p
cache
Template (&(sn=)(givenName=)) 0 3600
> p
cache
Template (&(departmentNumber=)(secretary=*)) 0 3600
>
> cachesize 20
> directory ./testrun/db.2.a
> index objectClass eq
> index cn,sn,uid,mail pres,eq,sub
H4: Example for slapd-config
The same example as a LDIF file for back-config for a caching server
which proxies for the {{EX:"dc=example,dc=com"}} subtree held
at server {{EX:ldap.example.com}}.
> dn: olcDatabase={2}ldap
> objectClass: olcDatabaseConfig
> objectClass: olcLDAPConfig
> olcDatabase: {2}ldap
> olcSuffix: dc=example,dc=com
> olcRootDN: dc=example,dc=com
> olcDbURI: "ldap://ldap.example.com"
>
> dn: olcOverlay={0}pcache
> objectClass: olcOverlayConfig
> objectClass: olcPcacheConfig
> olcOverlay: {0}pcache
> olcPcache: bdb 100000 1 1000 100
> olcPcacheAttrset: 0 mail postalAddress telephoneNumber
> olcPcacheTemplate: "(sn=)" 0 3600 0 0 0
> olcPcacheTemplate: "(&(sn=)(givenName=))" 0 3600 0 0 0
> olcPcacheTemplate: "(&(departmentNumber=)(secretary=))" 0 3600
>
> dn: olcDatabase={0}hdb
> objectClass: olcHdbConfig
> objectClass: olcPcacheDatabase
> olcDatabase: {0}hdb
> olcDbDirectory: ./testrun/db.2.a
> olcDbCacheSize: 20
> olcDbIndex: objectClass eq
> olcDbIndex: cn,sn,uid,mail pres,eq,sub
H5: Cacheable Queries
A LDAP search query is cacheable when its filter matches one of the
templates as defined in the "p
roxy
Template" statements and when it references
templates as defined in the "p
cache
Template" statements and when it references
only the attributes specified in the corresponding attribute set.
In the example above the attribute set number 0 defines that only the
attributes: {{EX:mail postaladdress telephonenumber}} are cached for the following
p
roxy
Templates.
p
cache
Templates.
H5: Examples:
...
...
@@ -801,7 +834,7 @@ H5: Examples:
> Attrs: mail telephoneNumber
is cacheable, because it matches the template {{EX:(&(sn=)(givenName=))}} and its
attributes are contained in p
roxy
Attrset 0.
attributes are contained in p
cache
Attrset 0.
> Filter: (&(sn=Richard*)(telephoneNumber))
> Attrs: givenName
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment