Skip to content

Commit 11b441f

Browse files
committed
Add a W3C trace context request control
Added client-side support for a W3C trace context request control that can be used to convey information for use in distributed tracing (e.g., via OpenTelemetry). This control was originally defined in the ForgeRock Directory Server (now known as PingDS), and will also be supported in the Ping Identity Directory Server.
1 parent 72e58a2 commit 11b441f

7 files changed

Lines changed: 941 additions & 0 deletions

File tree

docs/ldap-oid-reference.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4645,6 +4645,11 @@ <h2>LDAP OID Reference</h2>
46454645
<td>Affinity Request Control</td>
46464646
<td>ForgeRock Directory Server</td>
46474647
</tr>
4648+
<tr>
4649+
<td>1.3.6.1.4.1.36733.2.1.5.7</td>
4650+
<td>W3C Trace Context Request Control</td>
4651+
<td>ForgeRock Directory Server</td>
4652+
</tr>
46484653
<tr>
46494654
<td>1.3.6.1.5.5.7.9.1</td>
46504655
<td><tt>dateOfBirth</tt> Attribute Type</td>

docs/release-notes.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ <h3>Version 7.0.4</h3>
1313
</p>
1414

1515
<ul>
16+
<li>
17+
Added client-side support for a W3C trace context request control that can be
18+
used to convey information for use in distributed tracing (e.g., via
19+
OpenTelemetry). This control was originally defined in the ForgeRock Directory
20+
Server (now known as PingDS), and will also be supported in the Ping Identity
21+
Directory Server.
22+
<br><br>
23+
</li>
24+
1625
<li>
1726
Updated the server set blacklist manager to improve debug logging in the event
1827
that servers are added to or removed from the blacklist. The round robin and

messages/unboundid-ldapsdk-forgerock-controls.properties

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,16 @@ INFO_CONTROL_NAME_CSN_RESPONSE=Change Sequence Number Response Control
5353
ERR_AFFINITY_REQUEST_MISSING_VALUE=The provided control cannot be decoded as \
5454
an affinity request control because it does not have a value.
5555
INFO_CONTROL_NAME_AFFINITY_REQUEST=Affinity Request Control
56+
ERR_WC3_TRACE_CONTEXT_REQUST_NO_VALUE=Unable to decode the provided control \
57+
as a W3C trace context request control because the provided control does \
58+
not have a value.
59+
ERR_WC3_TRACE_CONTEXT_REQUST_CANNOT_DECODE=An unexpected error occurred while \
60+
attempting to decode the provided control as a W3C trace context request \
61+
control: {0}
62+
INFO_CONTROL_NAME_WC3_TRACE_CONTEXT_REQUEST=W3C Trace Context Request Control
63+
ERR_WC3_TRACE_CONTEXT_REQUEST_MISSING_JSON_TRACE_PARENT=Unable to decode the \
64+
provided JSON object as a W3C trace context request control because it is \
65+
missing the required ''{0}'' field.
66+
ERR_WC3_TRACE_CONTEXT_REQUEST_UNRECOGNIZED_JSON_FIELD=Unable to decode the \
67+
provided JSON object as a W3C trace context request control because it \
68+
includes unrecognized field ''{0}''.

resource/oid-registry.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,7 @@
923923
{ "oid":"1.3.6.1.4.1.30221.2.12.7", "name":"Extended Matching Entry Count Response Data", "type":"Feature", "origin":"Ping Identity Directory Server" }
924924
{ "oid":"1.3.6.1.4.1.36733.2.1.5.1", "name":"Transaction ID", "type":"Request Control", "origin":"ForgeRock Directory Server" }
925925
{ "oid":"1.3.6.1.4.1.36733.2.1.5.2", "name":"Affinity", "type":"Request Control", "origin":"ForgeRock Directory Server" }
926+
{ "oid":"1.3.6.1.4.1.36733.2.1.5.7", "name":"W3C Trace Context", "type":"Request Control", "origin":"ForgeRock Directory Server" }
926927
{ "oid":"1.3.6.1.5.5.7.9.1", "name":"dateOfBirth", "type":"Attribute Type", "origin":"RFC 2985", "url":"https://docs.ldap.com/specs/rfc2985.txt" }
927928
{ "oid":"1.3.6.1.5.5.7.9.2", "name":"placeOfBirth", "type":"Attribute Type", "origin":"RFC 2985", "url":"https://docs.ldap.com/specs/rfc2985.txt" }
928929
{ "oid":"1.3.6.1.5.5.7.9.3", "name":"gender", "type":"Attribute Type", "origin":"RFC 2985", "url":"https://docs.ldap.com/specs/rfc2985.txt" }

src/com/unboundid/ldap/sdk/Control.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
import com.unboundid.ldap.sdk.controls.SubtreeDeleteRequestControl;
7676
import com.unboundid.ldap.sdk.controls.VirtualListViewRequestControl;
7777
import com.unboundid.ldap.sdk.controls.VirtualListViewResponseControl;
78+
import com.unboundid.ldap.sdk.forgerockds.controls.
79+
W3CTraceContextRequestControl;
7880
import com.unboundid.ldap.sdk.unboundidds.controls.AccessLogFieldRequestControl;
7981
import com.unboundid.ldap.sdk.unboundidds.controls.AccountUsableRequestControl;
8082
import com.unboundid.ldap.sdk.unboundidds.controls.AccountUsableResponseControl;
@@ -1429,6 +1431,10 @@ public static Control decodeJSONControl(
14291431
return VirtualListViewResponseControl.decodeJSONControl(
14301432
controlObject, strict);
14311433

1434+
case W3CTraceContextRequestControl.W3C_TRACE_CONTEXT_REQUEST_OID:
1435+
return W3CTraceContextRequestControl.decodeJSONControl(
1436+
controlObject, strict);
1437+
14321438
default:
14331439
// The OID doesn't match that of a control for which we provide specific
14341440
// JSON support. Treat it as a generic control. Note that we can't

0 commit comments

Comments
 (0)