You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/configuration.adoc
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ The configurable attributes on context-source are as follows (required attribute
66
66
| `LdapUtils.emptyLdapName()`
67
67
| The base DN. When this attribute has been configured, all Distinguished Names supplied to and received from LDAP operations are relative to the specified LDAP path.
68
68
This can significantly simplify working against the LDAP tree. However, there are several occasions when you need to have access to the base path.
69
-
For more information on this, see <<base-context-configuration>>
69
+
For more information on this, see xref:configuration.adoc#base-context-configuration[Obtaining a Reference to the Base LDAP Path]
70
70
71
71
| `anonymous-read-only`
72
72
| `false`
@@ -83,15 +83,15 @@ a| Defines the strategy with which to handle referrals, as described https://do
83
83
84
84
| `native-pooling`
85
85
| `false`
86
-
| Specify whether native Java LDAP connection pooling should be used. Consider using Spring LDAP connection pooling instead. See <<pooling>> for more information.
86
+
| Specify whether native Java LDAP connection pooling should be used. Consider using Spring LDAP connection pooling instead. See xref:pooling.adoc[Pooling Support] for more information.
87
87
88
88
| `authentication-source-ref`
89
89
| A `SimpleAuthenticationSource` instance.
90
-
| ID of the `AuthenticationSource` instance to use (see <<spring-ldap-custom-principal-credentials-management>>).
90
+
| ID of the `AuthenticationSource` instance to use (see xref:configuration.adoc#spring-ldap-custom-principal-credentials-management[Custom Principal and Credentials Management]).
91
91
92
92
| `authentication-strategy-ref`
93
93
| A `SimpleDirContextAuthenticationStrategy` instance.
94
-
| ID of the `DirContextAuthenticationStrategy` instance to use (see <<spring-ldap-custom-dircontext-authentication-processing>>).
94
+
| ID of the `DirContextAuthenticationStrategy` instance to use (see xref:configuration.adoc#spring-ldap-custom-dircontext-authentication-processing[Custom `DirContext` Authentication Processing]).
95
95
96
96
| `base-env-props-ref`
97
97
|
@@ -104,7 +104,7 @@ a| Defines the strategy with which to handle referrals, as described https://do
104
104
When `DirContext` instances are created to be used for performing operations on an LDAP server, these contexts often need to be authenticated.
105
105
Spring LDAP offers various options for configuring this.
106
106
107
-
NOTE: This section refers to authenticating contexts in the core functionality of the `ContextSource`, to construct `DirContext` instances for use by `LdapClient` and `LdapTemplate`. LDAP is commonly used for the sole purpose of user authentication, and the `ContextSource` may be used for that as well. That process is discussed in <<user-authentication>>.
107
+
NOTE: This section refers to authenticating contexts in the core functionality of the `ContextSource`, to construct `DirContext` instances for use by `LdapClient` and `LdapTemplate`. LDAP is commonly used for the sole purpose of user authentication, and the `ContextSource` may be used for that as well. That process is discussed in xref:user-authentication.adoc[User Authentication using Spring LDAP].
108
108
109
109
By default, authenticated contexts are created for both read-only and read-write operations. You should specify the `username` and `password` of the LDAP user to be used for authentication on the `context-source` element.
110
110
@@ -130,7 +130,7 @@ Where `DefaultTlsDirContextAuthenticationStrategy` applies SIMPLE authentication
130
130
131
131
Since different LDAP server implementations respond differently to explicit shutdown of the TLS channel (some servers require the connection be shut down gracefully, while others do not support it), the TLS `DirContextAuthenticationStrategy` implementations support specifying the shutdown behavior by using the `shutdownTlsGracefully` parameter. If this property is set to `false` (the default), no explicit TLS shutdown happens. If it is `true`, Spring LDAP tries to shut down the TLS channel gracefully before closing the target context.
132
132
133
-
NOTE: When working with TLS connections, you need to make sure that the native LDAP Pooling functionality (as specified by using the `native-pooling` attribute) is turned off. This is particularly important if `shutdownTlsGracefully` is set to `false`. However, since the TLS channel negotiation process is quite expensive, you can gain great performance benefits by using the Spring LDAP Pooling Support, described in <<pooling>>.
133
+
NOTE: When working with TLS connections, you need to make sure that the native LDAP Pooling functionality (as specified by using the `native-pooling` attribute) is turned off. This is particularly important if `shutdownTlsGracefully` is set to `false`. However, since the TLS channel negotiation process is quite expensive, you can gain great performance benefits by using the Spring LDAP Pooling Support, described in xref:pooling.adoc[Pooling Support].
@@ -167,7 +167,7 @@ NOTE: When using the `SpringSecurityAuthenticationSource`, you need to use Sprin
167
167
168
168
The internal Java LDAP provider provides some very basic pooling capabilities. You can turn this LDAP connection pooling on or off by using the `pooled` flag on `AbstractContextSource`. The default value is `false` (since release 1.3) -- that is, the native Java LDAP pooling is turned off. The configuration of LDAP connection pooling is managed by using `System` properties, so you need to handle this manually, outside of the Spring Context configuration. You can find details of the native pooling configuration https://java.sun.com/products/jndi/tutorial/ldap/connect/config.html[here].
169
169
170
-
NOTE: There are several serious deficiencies in the built-in LDAP connection pooling, which is why Spring LDAP provides a more sophisticated approach to LDAP connection pooling, described in <<pooling>>. If you need pooling functionality, this is the recommended approach.
170
+
NOTE: There are several serious deficiencies in the built-in LDAP connection pooling, which is why Spring LDAP provides a more sophisticated approach to LDAP connection pooling, described in xref:pooling.adoc[Pooling Support]. If you need pooling functionality, this is the recommended approach.
171
171
172
172
NOTE: Regardless of the pooling configuration, the `ContextSource#getContext(String principal, String credentials)` method always explicitly does not use native Java LDAP Pooling, in order for reset passwords to take effect as soon as possible.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/dirobjectfactory.adoc
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -105,7 +105,7 @@ involved in adding and updating data.
105
105
[[adding-data-by-using-dircontextadapter]]
106
106
=== Adding Data by Using `DirContextAdapter`
107
107
108
-
The following example uses `DirContextAdapter` to implement an improved implementation of the `create` repository method presented in <<basic-binding-data>>:
108
+
The following example uses `DirContextAdapter` to implement an improved implementation of the `create` repository method presented in xref:spring-ldap-basic-usage.adoc#basic-binding-data[Adding Data]:
109
109
110
110
.Binding using `DirContextAdapter`
111
111
====
@@ -286,7 +286,7 @@ public class GroupRepo implements BaseLdapNameAware {
286
286
----
287
287
====
288
288
289
-
In the preceding example, we implement `BaseLdapNameAware` to get the base LDAP path as described in <<base-context-configuration>>.
289
+
In the preceding example, we implement `BaseLdapNameAware` to get the base LDAP path as described in xref:configuration.adoc#base-context-configuration[Obtaining a Reference to the Base LDAP Path].
290
290
This is necessary because distinguished names as member attribute values must always be absolute from the directory root.
291
291
292
292
[[a-complete-personrepository-class]]
@@ -397,5 +397,5 @@ public class PersonRepoImpl implements PersonRepo {
397
397
NOTE: In several cases, the Distinguished Name (DN) of an object is constructed by using properties of the object.
398
398
In the preceding example, the country, company and full name of the `Person` are used in the DN, which means that updating any of these properties actually requires moving the entry in the LDAP tree by using the `rename()` operation in addition to updating the `Attribute` values.
399
399
Since this is highly implementation-specific, this is something you need to keep track of yourself, either by disallowing the user to change these properties or performing the `rename()` operation in your `update()` method if needed.
400
-
Note that, by using <<odm>>, the library can automatically handle this for you if you annotate your domain classes appropriately.
400
+
Note that, by using xref:odm.adoc[Object-Directory Mapping (ODM)], the library can automatically handle this for you if you annotate your domain classes appropriately.
@@ -201,15 +201,15 @@ The following list briefly describes the most important changes in Spring LDAP 2
201
201
* The central API has been updated with Java 5+ features such as generics and varargs.
202
202
As a consequence, the entire `spring-ldap-tiger` module has been deprecated, and we encourage you to migrate to using the core Spring LDAP classes.
203
203
The parameterization of the core interfaces causes lots of compilation warnings on existing code, and we encourage you to take appropriate action to get rid of these warnings.
204
-
* The ODM (Object-Directory Mapping) functionality has been moved to core, and there are new methods in `LdapOperations` and `LdapTemplate` that use this automatic translation to and from ODM-annotated classes. See <<odm>> for more information.
204
+
* The ODM (Object-Directory Mapping) functionality has been moved to core, and there are new methods in `LdapOperations` and `LdapTemplate` that use this automatic translation to and from ODM-annotated classes. See xref:odm.adoc[Object-Directory Mapping (ODM)] for more information.
205
205
* A custom XML namespace is now (finally) provided to simplify configuration of Spring LDAP. See <<configuration>> for more information.
206
-
* Spring LDAP now provides support for Spring Data Repository and QueryDSL. See <<repositories>> for more information.
206
+
* Spring LDAP now provides support for Spring Data Repository and QueryDSL. See xref:repositories.adoc[Spring LDAP Repositories] for more information.
207
207
* `Name` instances as attribute values are now handled properly with regards to distinguished name equality in `DirContextAdapter` and ODM.
208
-
See <<dns-as-attribute-values>> and <<odm-dn-attributes>> for more information.
208
+
See xref:dirobjectfactory.adoc#dns-as-attribute-values[`DirContextAdapter` and Distinguished Names as Attribute Values] and xref:odm.adoc#odm-dn-attributes[ODM and Distinguished Names as Attribute Values] for more information.
209
209
* `DistinguishedName` and associated classes have been deprecated in favor of the standard Java `LdapName`.
210
-
See <<ldap-names>> for information on how the library helps when working with `LdapName` objects.
210
+
See xref:spring-ldap-basic-usage.adoc#ldap-names[Dynamically Building Distinguished Names] for information on how the library helps when working with `LdapName` objects.
211
211
* Fluent LDAP query building support has been added. This makes for a more pleasant programming experience when working with LDAP searches in Spring LDAP.
212
-
See <<basic-queries>> and <<query-builder-advanced>> for more information about the LDAP query builder support.
212
+
See xref:spring-ldap-basic-usage.adoc#basic-queries[Building LDAP Queries] and xref:query-builder-advanced.adoc[Advanced LDAP Queries] for more information about the LDAP query builder support.
213
213
* The old `authenticate` methods in `LdapTemplate` have been deprecated in favor of a couple of new `authenticate` methods that work with `LdapQuery` objects and _throw exceptions_ on authentication failure, making it easier for the user to find out what caused an authentication attempt to fail.
214
214
* The https://github.com/spring-projects/spring-ldap/tree/main/samples[samples] have been polished and updated to make use of the features in 2.0.
215
215
Quite a bit of effort has been put into providing a useful example of an https://github.com/spring-projects/spring-ldap/tree/main/samples/user-admin[LDAP user management application].
Copy file name to clipboardExpand all lines: modules/ROOT/pages/odm.adoc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,7 @@ public class OdmPersonRepo {
132
132
== ODM and Distinguished Names as Attribute Values
133
133
134
134
Security groups in LDAP commonly contain a multi-value attribute, where each of the values is the distinguished name
135
-
of a user in the system. The difficulties involved when handling these kinds of attributes are discussed in <<dns-as-attribute-values>>.
135
+
of a user in the system. The difficulties involved when handling these kinds of attributes are discussed in xref:dirobjectfactory.adoc#dns-as-attribute-values[`DirContextAdapter` and Distinguished Names as Attribute Values].
136
136
137
137
ODM also has support for `javax.naming.Name` attribute values, making group modifications easy, as the following example shows:
Copy file name to clipboardExpand all lines: modules/ROOT/pages/pooling.adoc
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Validation of pooled connections is the primary motivation for using a custom po
13
13
If connection validation is configured, pooled connections are validated by using `DefaultDirContextValidator`.
14
14
`DefaultDirContextValidator` does a `DirContext.search(String, String, SearchControls)`, with an empty name, a filter of `"objectclass=*"`, and `SearchControls` set to limit a single result with the only the `objectclass` attribute and a 500ms timeout. If the returned `NamingEnumeration` has results, the `DirContext` passes validation. If no results are returned or an exception is thrown, the `DirContext` fails validation.
15
15
The default settings should work with no configuration changes on most LDAP servers and provide the fastest way to validate the `DirContext`.
16
-
If you need customization, you can do so by using the validation configuration attributes, described in <<pool-configuration>>.
16
+
If you need customization, you can do so by using the validation configuration attributes, described in xref:pooling.adoc#pool-configuration[Pool Configuration].
17
17
18
18
NOTE: Connections are automatically invalidated if they throw an exception that is considered non-transient. For example, if a `DirContext` instance throws a `javax.naming.CommunicationException`, it is interpreted as a non-transient error and the instance is automatically invalidated, without the overhead of an additional `testOnReturn` operation. The exceptions that are interpreted as non-transient are configured by using the `nonTransientExceptions` property of the `PoolingContextSource`.
19
19
@@ -252,7 +252,7 @@ The following example tests each `DirContext` before it is passed to the client
252
252
253
253
This section describes issues that sometimes arise when people use Spring LDAP. At present, it covers the following issues:
Copy file name to clipboardExpand all lines: modules/ROOT/pages/repositories.adoc
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Spring LDAP has built-in support for Spring Data repositories. The basic functio
7
7
8
8
* To include support for `LdapQuery` parameters in automatically generated repositories, have your interface extend `LdapRepository` rather than `CrudRepository`.
9
9
10
-
* All Spring LDAP repositories must work with entities that are annotated with the ODM annotations, as described in <<odm>>.
10
+
* All Spring LDAP repositories must work with entities that are annotated with the ODM annotations, as described in xref:odm.adoc[Object-Directory Mapping (ODM)].
11
11
12
12
* Since all ODM managed classes must have a Distinguished Name as the ID, all Spring LDAP repositories must have the ID type parameter set to `javax.naming.Name`.
13
13
The built-in `LdapRepository` takes only one type parameter: the managed entity class, defaulting the ID to `javax.naming.Name`.
@@ -18,7 +18,7 @@ Spring LDAP has built-in support for Spring Data repositories. The basic functio
18
18
== QueryDSL support
19
19
Basic QueryDSL support is included in Spring LDAP. This support includes the following:
20
20
21
-
* An annotation processor, called `LdapAnnotationProcessor`, for generating QueryDSL classes based on Spring LDAP ODM annotations. See <<odm>> for more information on the ODM annotations.
21
+
* An annotation processor, called `LdapAnnotationProcessor`, for generating QueryDSL classes based on Spring LDAP ODM annotations. See xref:odm.adoc[Object-Directory Mapping (ODM)] for more information on the ODM annotations.
22
22
23
23
* A Query implementation, called `QueryDslLdapQuery`, for building and running QueryDSL queries in code.
0 commit comments