001/*
002 * Copyright 2022-2024 Ping Identity Corporation
003 * All Rights Reserved.
004 */
005/*
006 * Copyright 2022-2024 Ping Identity Corporation
007 *
008 * Licensed under the Apache License, Version 2.0 (the "License");
009 * you may not use this file except in compliance with the License.
010 * You may obtain a copy of the License at
011 *
012 *    http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing, software
015 * distributed under the License is distributed on an "AS IS" BASIS,
016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017 * See the License for the specific language governing permissions and
018 * limitations under the License.
019 */
020/*
021 * Copyright (C) 2022-2024 Ping Identity Corporation
022 *
023 * This program is free software; you can redistribute it and/or modify
024 * it under the terms of the GNU General Public License (GPLv2 only)
025 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
026 * as published by the Free Software Foundation.
027 *
028 * This program is distributed in the hope that it will be useful,
029 * but WITHOUT ANY WARRANTY; without even the implied warranty of
030 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
031 * GNU General Public License for more details.
032 *
033 * You should have received a copy of the GNU General Public License
034 * along with this program; if not, see <http://www.gnu.org/licenses>.
035 */
036package com.unboundid.ldap.sdk.unboundidds.logs.v2.json;
037
038
039
040import java.util.Collections;
041import java.util.Map;
042import java.util.TreeMap;
043import java.util.concurrent.ConcurrentHashMap;
044import java.util.concurrent.atomic.AtomicReference;
045
046import com.unboundid.ldap.sdk.unboundidds.logs.v2.LogField;
047import com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.BooleanLogFieldSyntax;
048import com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.DNLogFieldSyntax;
049import com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.FilterLogFieldSyntax;
050import com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.
051            FloatingPointLogFieldSyntax;
052import com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.IntegerLogFieldSyntax;
053import com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.JSONLogFieldSyntax;
054import com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.LogFieldSyntax;
055import com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.
056            RFC3339TimestampLogFieldSyntax;
057import com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.StringLogFieldSyntax;
058import com.unboundid.util.NotNull;
059import com.unboundid.util.Nullable;
060import com.unboundid.util.StaticUtils;
061import com.unboundid.util.ThreadSafety;
062import com.unboundid.util.ThreadSafetyLevel;
063
064
065
066/**
067 * This class defines a number of constants that represent fields that may
068 * appear in JSON-formatted access log messages.
069 * <BR>
070 * <BLOCKQUOTE>
071 *   <B>NOTE:</B>  This class, and other classes within the
072 *   {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only
073 *   supported for use against Ping Identity, UnboundID, and
074 *   Nokia/Alcatel-Lucent 8661 server products.  These classes provide support
075 *   for proprietary functionality or for external specifications that are not
076 *   considered stable or mature enough to be guaranteed to work in an
077 *   interoperable way with other types of LDAP servers.
078 * </BLOCKQUOTE>
079 *
080 * @see  LogField
081 */
082@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE)
083public final class JSONFormattedAccessLogFields
084{
085  /**
086   * A map containing all of the defined fields in this class.
087   */
088  @NotNull() private static final Map<String,LogField> DEFINED_FIELDS =
089       new ConcurrentHashMap<>();
090
091
092
093  /**
094   * A map containing all of the defined fields in this class.
095   */
096  @NotNull() private static final AtomicReference<Map<String,LogField>>
097       READ_ONLY_DEFINED_FIELDS_REF = new AtomicReference<>();
098
099
100
101  /**
102   * The default value to use for the maximum number of characters per string.
103   */
104  private static final int DEFAULT_MAX_CHARACTERS_PER_STRING = 2_000;
105
106
107
108  /**
109   * The default syntax instance that will be used for fields with Boolean
110   * values.
111   */
112  @NotNull private static final BooleanLogFieldSyntax BOOLEAN_SYNTAX =
113       BooleanLogFieldSyntax.getInstance();
114
115
116
117  /**
118   * The default syntax instance that will be used for fields whose values are
119   * expected to be DNs.  This instance does not specify any included or
120   * excluded sensitive attributes, so all attribute values will be redacted
121   * or tokenized when calling methods that redact or tokenize components.  It
122   * will also use a default escaping strategy for determining which special
123   * characters should be escaped.
124   */
125  @NotNull private static final DNLogFieldSyntax DN_SYNTAX =
126       new DNLogFieldSyntax(DEFAULT_MAX_CHARACTERS_PER_STRING, null, null,
127            null);
128
129
130
131  /**
132   * The default syntax instance that will be used for fields whose values are
133   * expected to be search filters.  This instance does not specify any included
134   * or excluded sensitive attributes, so all attribute values will be redacted
135   * or tokenized when calling methods that redact or tokenize components.
136   */
137  @NotNull private static final FilterLogFieldSyntax FILTER_SYNTAX =
138       new FilterLogFieldSyntax(DEFAULT_MAX_CHARACTERS_PER_STRING, null,
139            null, null);
140
141
142
143  /**
144   * The default syntax instance that will be used for fields whose values are
145   * floating-point numbers.
146   */
147  @NotNull private static final FloatingPointLogFieldSyntax
148       FLOATING_POINT_SYNTAX = FloatingPointLogFieldSyntax.getInstance();
149
150
151
152  /**
153   * The default syntax instance that will be used for fields whose values are
154   * integers.
155   */
156  @NotNull private static final IntegerLogFieldSyntax INTEGER_SYNTAX =
157       IntegerLogFieldSyntax.getInstance();
158
159
160
161  /**
162   * The default syntax instance that will be used for fields whose values are
163   * expected to be JSON objects.  This instance does not specify any included
164   * or excluded sensitive fields, so all field values will be redacted or
165   * tokenized when calling methods that redact or tokenize components.
166   */
167  @NotNull private static final JSONLogFieldSyntax JSON_SYNTAX =
168       new JSONLogFieldSyntax(DEFAULT_MAX_CHARACTERS_PER_STRING, null, null);
169
170
171
172  /**
173   * The default syntax instance that will be used for fields whose values are
174   * timestamps in the generalized time format.
175   */
176  @NotNull private static final RFC3339TimestampLogFieldSyntax
177       RFC_3339_TIMESTAMP_SYNTAX = RFC3339TimestampLogFieldSyntax.getInstance();
178
179
180
181  /**
182   * The default syntax instance that will be used for fields whose values are
183   * strings.
184   */
185  @NotNull private static final StringLogFieldSyntax STRING_SYNTAX =
186       new StringLogFieldSyntax(DEFAULT_MAX_CHARACTERS_PER_STRING);
187
188
189
190  /**
191   * A field that holds the message ID for an operation to be abandoned.  This
192   * field may appear in log messages for abandon operations.
193   */
194  @NotNull public static final LogField ABANDON_MESSAGE_ID =
195       createField("ABANDON_MESSAGE_ID", "idToAbandon", INTEGER_SYNTAX);
196
197
198
199  /**
200   * A field whose value is a JSON array containing the names of the attributes
201   * to be added.  This field may appear in access log messages for add
202   * operations.
203   */
204  @NotNull public static final LogField ADD_ATTRIBUTES =
205       createField("ADD_ATTRIBUTES", "attributes", STRING_SYNTAX);
206
207
208
209  /**
210   * A field that holds the DN of the entry to be added.  This field may appear
211   * in access log messages for add operations.
212   */
213  @NotNull public static final LogField ADD_ENTRY_DN =
214       createField("ADD_ENTRY_DN", "dn", DN_SYNTAX);
215
216
217
218  /**
219   * A field that holds the DN of the soft-deleted entry being undeleted.  This
220   * field may appear in access log messages for add operations.
221   */
222  @NotNull public static final LogField ADD_UNDELETE_FROM_DN =
223       createField("ADD_UNDELETE_FROM_DN", "undeleteFromDN", DN_SYNTAX);
224
225
226
227  /**
228   * A field that holds a message with additional information about the server's
229   * processing for an operation.  This message will not be returned to the
230   * client.  This field may appear in all types of operation result access log
231   * messages.
232   */
233  @NotNull public static final LogField ADDITIONAL_INFO =
234       createField("ADDITIONAL_INFO", "additionalInfo", STRING_SYNTAX);
235
236
237
238  /**
239   * A field that indicates that the associated operation includes an
240   * administrative operation request control.  The value of the field is the
241   * message (if any) contained in that control.  This field may appear in all
242   * types of access log messages that are associated with an operation.
243   */
244  @NotNull public static final LogField ADMINISTRATIVE_OPERATION = createField(
245       "ADMINISTRATIVE_OPERATION", "administrativeOperation", STRING_SYNTAX);
246
247
248
249  /**
250   * A field whose value is a JSON object with the assured replication
251   * requirements for the operation.  This field may appear in all types of
252   * operation result access log messages.
253   */
254  @NotNull public static final LogField ASSURED_REPLICATION_REQUIREMENTS =
255       createField("ASSURED_REPLICATION_REQUIREMENTS",
256            "assuredReplicationRequirements", JSON_SYNTAX);
257
258
259
260  /**
261   * A field (appearing inside the {@link #ASSURED_REPLICATION_REQUIREMENTS}
262   * JSON object) that indicates whether the replication assurance requirements
263   * were altered by the presence of an assured replication request control.
264   * This field may appear in all types of operation result access log messages.
265   */
266  @NotNull public static final LogField
267       ASSURED_REPLICATION_REQUIREMENTS_ALTERED_BY_REQUEST_CONTROL =
268            createField(
269                 "ASSURED_REPLICATION_REQUIREMENTS_ALTERED_BY_REQUEST_CONTROL",
270                 "alteredByRequestControl", BOOLEAN_SYNTAX);
271
272
273
274  /**
275   * A field (appearing inside the {@link #ASSURED_REPLICATION_REQUIREMENTS}
276   * JSON object) that holds the requested replication assurance timeout.  This
277   * field may appear in all types of operation result access log messages.
278   */
279  @NotNull public static final LogField
280       ASSURED_REPLICATION_REQUIREMENTS_ASSURANCE_TIMEOUT_MILLIS = createField(
281            "ASSURED_REPLICATION_REQUIREMENTS_ASSURANCE_TIMEOUT_MILLIS",
282            "assuranceTimeoutMillis", INTEGER_SYNTAX);
283
284
285
286  /**
287   * A field (appearing inside the {@link #ASSURED_REPLICATION_REQUIREMENTS}
288   * JSON object) that holds the name of the requested local replication
289   * assurance level for the operation.  This field may appear in all types of
290   * operation result access log messages.
291   */
292  @NotNull public static final LogField
293       ASSURED_REPLICATION_REQUIREMENTS_LOCAL_ASSURANCE_LEVEL = createField(
294            "ASSURED_REPLICATION_REQUIREMENTS_LOCAL_ASSURANCE_LEVEL",
295            "localAssuranceLevel", STRING_SYNTAX);
296
297
298
299  /**
300   * A field (appearing inside the {@link #ASSURED_REPLICATION_REQUIREMENTS}
301   * JSON object) that holds the name of the requested remote replication
302   * assurance level for the operation.  This field may appear in all types of
303   * operation result access log messages.
304   */
305  @NotNull public static final LogField
306       ASSURED_REPLICATION_REQUIREMENTS_REMOTE_ASSURANCE_LEVEL = createField(
307            "ASSURED_REPLICATION_REQUIREMENTS_REMOTE_ASSURANCE_LEVEL",
308            "remoteAssuranceLevel", STRING_SYNTAX);
309
310
311
312  /**
313   * A field (appearing inside the {@link #ASSURED_REPLICATION_REQUIREMENTS}
314   * JSON object) that indicates whether the response to the operation was
315   * delayed by replication assurance processing.  This field may appear in all
316   * types of operation result access log messages.
317   */
318  @NotNull public static final LogField
319       ASSURED_REPLICATION_REQUIREMENTS_RESPONSE_DELAYED_BY_ASSURANCE =
320            createField(
321       "ASSURED_REPLICATION_REQUIREMENTS_RESPONSE_DELAYED_BY_ASSURANCE",
322       "responseDelayedByAssurance", BOOLEAN_SYNTAX);
323
324
325
326  /**
327   * A field that holds the DN that was used as the alternative authorization
328   * identity for the operation.  This field may appear in all types of
329   * operation result access log messages.
330   */
331  @NotNull public static final LogField AUTHORIZATION_DN =
332       createField("AUTHORIZATION_DN", "authorizationDN", DN_SYNTAX);
333
334
335
336  /**
337   * A field that holds the DN of the user that was automatically authenticated
338   * to the server based on the certificate chain the client presented during
339   * security negotiation.  This field may appear in SECURITY-NEGOTIATION
340   * access log messages.
341   */
342  @NotNull public static final LogField AUTO_AUTHENTICATED_AS =
343       createField("AUTO_AUTHENTICATED_AS", "autoAuthenticatedAs", DN_SYNTAX);
344
345
346
347  /**
348   * A field that holds the DN of the user that was authenticated in a bind
349   * operation.  This field may appear in bind result access log messages.
350   */
351  @NotNull public static final LogField BIND_AUTHENTICATION_DN =
352       createField("BIND_AUTHENTICATION_DN", "authenticationDN", DN_SYNTAX);
353
354
355
356  /**
357   * A field whose value is a JSON object with information about the reason for
358   * a failed authentication attempt.  This field may appear in bind result
359   * access log messages.
360   */
361  @NotNull public static final LogField BIND_AUTHENTICATION_FAILURE_REASON =
362       createField("BIND_AUTHENTICATION_FAILURE_REASON",
363            "authenticationFailureReason", JSON_SYNTAX);
364
365
366
367  /**
368   * A field (appearing inside the {@link #BIND_AUTHENTICATION_FAILURE_REASON}
369   * JSON object) that holds the numeric identifier for the failure reason.
370   * This field may appear in bind result access log messages.
371   */
372  @NotNull public static final LogField BIND_AUTHENTICATION_FAILURE_REASON_ID =
373       createField("BIND_AUTHENTICATION_FAILURE_REASON_ID", "id",
374            INTEGER_SYNTAX);
375
376
377
378  /**
379   * A field (appearing inside the {@link #BIND_AUTHENTICATION_FAILURE_REASON}
380   * JSON object) that holds a message with additional information about the
381   * authentication failure.  This field may appear in bind result access log
382   * messages.
383   */
384  @NotNull public static final LogField
385       BIND_AUTHENTICATION_FAILURE_REASON_MESSAGE = createField(
386            "BIND_AUTHENTICATION_FAILURE_REASON_MESSAGE", "message",
387            STRING_SYNTAX);
388
389
390
391  /**
392   * A field (appearing inside the {@link #BIND_AUTHENTICATION_FAILURE_REASON}
393   * JSON object) that holds the name for the failure reason.  This field may
394   * appear in bind result access log messages.
395   */
396  @NotNull public static final LogField
397       BIND_AUTHENTICATION_FAILURE_REASON_NAME = createField(
398            "BIND_AUTHENTICATION_FAILURE_REASON_NAME", "name", STRING_SYNTAX);
399
400
401
402  /**
403   * A field that holds the authentication type for a bind request.  This field
404   * may appear in access log messages for bind operations.
405   */
406  @NotNull public static final LogField BIND_AUTHENTICATION_TYPE =
407       createField("BIND_AUTHENTICATION_TYPE", "authType", STRING_SYNTAX);
408
409
410
411  /**
412   * A field that holds the DN of the authorization identity resulting from a
413   * bind operation.  This field may appear in bind result access log messages.
414   */
415  @NotNull public static final LogField BIND_AUTHORIZATION_DN =
416       createField("BIND_AUTHORIZATION_DN", "authorizationDN", DN_SYNTAX);
417
418
419
420  /**
421   * A field that holds the bind DN for a bind request.  This field may appear
422   * in access log messages for bind operations.
423   */
424  @NotNull public static final LogField BIND_DN =
425       createField("BIND_DN", "dn", DN_SYNTAX);
426
427
428
429  /**
430   * A field that holds the protocol version for a bind request.  This field may
431   * appear in access log messages for bind operations.
432   */
433  @NotNull public static final LogField BIND_PROTOCOL_VERSION =
434       createField("BIND_PROTOCOL_VERSION", "version", STRING_SYNTAX);
435
436
437
438  /**
439   * A field that indicates whether a retired password was used in the course of
440   * processing a bind operation.  This field may appear in bind result access
441   * log messages.
442   */
443  @NotNull public static final LogField BIND_RETIRED_PASSWORD_USED =
444       createField("BIND_RETIRED_PASSWORD_USED", "retiredPasswordUsed",
445            BOOLEAN_SYNTAX);
446
447
448
449  /**
450   * A field that holds the name of the SASL mechanism used for a bind request.
451   * This field may appear in access log messages for bind operations.
452   */
453  @NotNull public static final LogField BIND_SASL_MECHANISM =
454       createField("BIND_SASL_MECHANISM", "saslMechanism", STRING_SYNTAX);
455
456
457
458  /**
459   * A field that indicates whether the associated operation updated or removed
460   * a soft-deleted entry.  This field may appear in access log messages for
461   * modify and delete operations.
462   */
463  @NotNull public static final LogField CHANGE_TO_SOFT_DELETED_ENTRY =
464       createField("CHANGE_TO_SOFT_DELETED_ENTRY", "changeToSoftDeletedEntry",
465            BOOLEAN_SYNTAX);
466
467
468
469  /**
470   * A field that holds the name of the cipher algorithm that was negotiated for
471   * the client connection.  This field may appear in SECURITY-NEGOTIATION
472   * access log messages.
473   */
474  @NotNull public static final LogField CIPHER =
475       createField("CIPHER", "cipher", STRING_SYNTAX);
476
477
478
479  /**
480   * A field that holds the name of the client connection policy that has been
481   * assigned to the associated connection.  This field may appear in CONNECT
482   * access log messages, as well as in result access log messages for
483   * operations that may cause a new client connection policy to be assigned
484   * to the connection (including bind and StartTLS).
485   */
486  @NotNull public static final LogField CLIENT_CONNECTION_POLICY = createField(
487       "CLIENT_CONNECTION_POLICY", "clientConnectionPolicy", STRING_SYNTAX);
488
489
490
491  /**
492   * A field that holds the assertion value included in a compare operation.
493   * This field may appear in access log messages for compare operations.
494   */
495  @NotNull public static final LogField COMPARE_ASSERTION_VALUE =
496       createField("COMPARE_ASSERTION_VALUE", "assertionValue", STRING_SYNTAX);
497
498
499
500  /**
501   * A field that holds the name of the attribute targeted by a compare
502   * operation.  This field may appear in access log messages for compare
503   * operations.
504   */
505  @NotNull public static final LogField COMPARE_ATTRIBUTE_NAME =
506       createField("COMPARE_ATTRIBUTE_NAME", "attr", STRING_SYNTAX);
507
508
509
510  /**
511   * A field that holds the DN of the entry targeted by a compare operation.
512   * This field may appear in access log messages for compare operations.
513   */
514  @NotNull public static final LogField COMPARE_ENTRY_DN =
515       createField("COMPARE_ENTRY_DN", "dn", DN_SYNTAX);
516
517
518
519  /**
520   * A field that holds the address of the client from which a connection has
521   * been established.  This field may appear in CONNECT access log messages.
522   */
523  @NotNull public static final LogField CONNECT_FROM_ADDRESS =
524       createField("CONNECT_FROM_ADDRESS", "fromAddress", STRING_SYNTAX);
525
526
527
528  /**
529   * A field that holds the remote port for a client connection that has been
530   * established.  This field may appear in CONNECT access log messages.
531   */
532  @NotNull public static final LogField CONNECT_FROM_PORT =
533       createField("CONNECT_FROM_PORT", "fromPort", INTEGER_SYNTAX);
534
535
536
537  /**
538   * A field that holds the server address to which a connection has been
539   * established.  This field may appear in CONNECT access log messages.
540   */
541  @NotNull public static final LogField CONNECT_TO_ADDRESS =
542       createField("CONNECT_TO_ADDRESS", "toAddress", STRING_SYNTAX);
543
544
545
546  /**
547   * A field that holds the server port to which a connection has been
548   * established.  This field may appear in CONNECT access log messages.
549   */
550  @NotNull public static final LogField CONNECT_TO_PORT =
551       createField("CONNECT_TO_PORT", "toPort", INTEGER_SYNTAX);
552
553
554
555  /**
556   * A field that holds a numeric identifier for the associated client
557   * connection.  All access log messages associated with a given connection
558   * will share the same connection ID, so this field may be used to identify
559   * messages associated with that connection.  Note, however, that the
560   * connection ID counter is reset when the server is restarted, so the
561   * {@link #STARTUP_ID} field may also be necessary to further distinguish
562   * between connections across restarts.  Further, connection ID values may be
563   * reused across instances, so the {@link #INSTANCE_NAME} field may also be
564   * needed to distinguish between connections to different instances.  This
565   * field may appear in all types of access log messages.
566   */
567  @NotNull public static final LogField CONNECTION_ID =
568       createField("CONNECTION_ID", "connectionID", INTEGER_SYNTAX);
569
570
571
572  /**
573   * A field that holds the DN of the entry targeted by a delete operation.
574   * This field may appear in access log messages for delete operations.
575   */
576  @NotNull public static final LogField DELETE_ENTRY_DN =
577       createField("DELETE_ENTRY_DN", "dn", DN_SYNTAX);
578
579
580
581  /**
582   * A field that holds the DN of a soft-deleted entry resulting from a delete
583   * operation.  This field may appear in access log messages for delete
584   * operations.
585   */
586  @NotNull public static final LogField DELETE_SOFT_DELETED_ENTRY_DN =
587       createField("DELETE_SOFT_DELETED_ENTRY_DN", "softDeletedEntryDN",
588            DN_SYNTAX);
589
590
591
592 /**
593  * A field that holds the diagnostic message for an operation, which is a
594  * message that is returned to the client.  This field may appear in all types
595  * of operation result access log messages.
596   */
597  @NotNull public static final LogField DIAGNOSTIC_MESSAGE =
598      createField("DIAGNOSTIC_MESSAGE", "message", STRING_SYNTAX);
599
600
601
602 /**
603  * A field that holds an additional message for a connection closure, which may
604  * provide additional details about the disconnect.  This field may appear in
605  * DISCONNECT access log messages.
606   */
607  @NotNull public static final LogField DISCONNECT_MESSAGE =
608       createField("DISCONNECT_MESSAGE", "message", STRING_SYNTAX);
609
610
611
612  /**
613   * A field that holds a reason for a connection closure.  This field may
614   * appear in DISCONNECT access log messages.
615   */
616  @NotNull public static final LogField DISCONNECT_REASON =
617       createField("DISCONNECT_REASON", "disconnectReason", STRING_SYNTAX);
618
619
620
621  /**
622   * A field that holds a message about any administrative action that may be
623   * required after an entry rebalancing operation.  This field may appear in
624   * entry rebalancing access log messages.
625   */
626  @NotNull public static final LogField ENTRY_REBALANCING_ADMIN_ACTION_MESSAGE =
627       createField("ENTRY_REBALANCING_ADMIN_ACTION_MESSAGE",
628            "adminActionRequired", STRING_SYNTAX);
629
630
631
632  /**
633   * A field that holds the base DN for an entry rebalancing operation.  This
634   * field may appear in entry rebalancing access log messages.
635   */
636  @NotNull public static final LogField ENTRY_REBALANCING_BASE_DN =
637       createField("ENTRY_REBALANCING_BASE_DN", "baseDN", DN_SYNTAX);
638
639
640
641  /**
642   * A field that holds the number of entries added to the target server in the
643   * course of processing an entry rebalancing operation.  This field may appear
644   * in entry rebalancing access log messages.
645   */
646  @NotNull public static final LogField
647       ENTRY_REBALANCING_ENTRIES_ADDED_TO_TARGET = createField(
648            "ENTRY_REBALANCING_ENTRIES_ADDED_TO_TARGET", "entriesAddedToTarget",
649            INTEGER_SYNTAX);
650
651
652
653  /**
654   * A field that holds the number of entries deleted from the source server in
655   * the course of processing an entry rebalancing operation.  This field may
656   * appear in entry rebalancing access log messages.
657   */
658  @NotNull public static final LogField
659       ENTRY_REBALANCING_ENTRIES_DELETED_FROM_SOURCE = createField(
660            "ENTRY_REBALANCING_ENTRIES_DELETED_FROM_SOURCE",
661            "entriesDeletedFromSource", INTEGER_SYNTAX);
662
663
664
665  /**
666   * A field that holds the number of entries read from the source server in the
667   * course of processing an entry rebalancing operation.  This field may appear
668   * in entry rebalancing access log messages.
669   */
670  @NotNull public static final LogField
671       ENTRY_REBALANCING_ENTRIES_READ_FROM_SOURCE = createField(
672            "ENTRY_REBALANCING_ENTRIES_READ_FROM_SOURCE",
673            "entriesReadFromSource", INTEGER_SYNTAX);
674
675
676
677  /**
678   * A field that holds an error message for an entry rebalancing operation.
679   * This field may appear in entry rebalancing access log messages.
680   */
681  @NotNull public static final LogField ENTRY_REBALANCING_ERROR_MESSAGE =
682       createField("ENTRY_REBALANCING_ERROR_MESSAGE", "errorMessage",
683            STRING_SYNTAX);
684
685
686
687  /**
688   * A field that holds the operation ID for an entry rebalancing operation.
689   * This field may appear in entry rebalancing access log messages.
690   */
691  @NotNull public static final LogField ENTRY_REBALANCING_OPERATION_ID =
692       createField("ENTRY_REBALANCING_OPERATION_ID", "rebalancingOperationID",
693            INTEGER_SYNTAX);
694
695
696
697  /**
698   * A field that holds the size limit for an entry rebalancing operation.
699   * This field may appear in entry rebalancing access log messages.
700   */
701  @NotNull public static final LogField ENTRY_REBALANCING_SIZE_LIMIT =
702       createField("ENTRY_REBALANCING_SIZE_LIMIT", "sizeLimit", INTEGER_SYNTAX);
703
704
705
706  /**
707   * A field that holds the name of the source backend set for an entry
708   * rebalancing operation.  This field may appear in entry rebalancing access
709   * log messages.
710   */
711  @NotNull public static final LogField ENTRY_REBALANCING_SOURCE_BACKEND_SET =
712       createField("ENTRY_REBALANCING_SOURCE_BACKEND_SET", "sourceBackendSet",
713            STRING_SYNTAX);
714
715
716
717  /**
718   * A field whose value is a JSON object with information about the source
719   * server for an entry rebalancing operation.  This field may appear in entry
720   * rebalancing access log messages.
721   */
722  @NotNull public static final LogField ENTRY_REBALANCING_SOURCE_SERVER =
723       createField("ENTRY_REBALANCING_SOURCE_SERVER", "sourceServer",
724            JSON_SYNTAX);
725
726
727  /**
728   * A field (appearing inside the {@link #ENTRY_REBALANCING_SOURCE_SERVER}
729   * JSON object) that holds the address of the source server for an entry
730   * rebalancing operation.  This field may appear in entry rebalancing access
731   * log messages.
732   */
733  @NotNull public static final LogField
734       ENTRY_REBALANCING_SOURCE_SERVER_ADDRESS = createField(
735            "ENTRY_REBALANCING_SOURCE_SERVER_ADDRESS", "address",
736            STRING_SYNTAX);
737
738
739
740  /**
741   * A field that indicates whether the source server was altered in the course
742   * of processing an entry rebalancing operation.  This field may appear in
743   * entry rebalancing access log messages.
744   */
745  @NotNull public static final LogField
746       ENTRY_REBALANCING_SOURCE_SERVER_ALTERED = createField(
747            "ENTRY_REBALANCING_SOURCE_SERVER_ALTERED", "sourceServerAltered",
748            BOOLEAN_SYNTAX);
749
750
751  /**
752   * A field (appearing inside the {@link #ENTRY_REBALANCING_SOURCE_SERVER}
753   * JSON object) that holds the port of the source server for an entry
754   * rebalancing operation.  This field may appear in entry rebalancing access
755   * log messages.
756   */
757  @NotNull public static final LogField ENTRY_REBALANCING_SOURCE_SERVER_PORT =
758       createField("ENTRY_REBALANCING_SOURCE_SERVER_PORT", "port",
759            INTEGER_SYNTAX);
760
761
762
763  /**
764   * A field that holds the name of the target backend set for an entry
765   * rebalancing operation.  This field may appear in entry rebalancing access
766   * log messages.
767   */
768  @NotNull public static final LogField ENTRY_REBALANCING_TARGET_BACKEND_SET =
769       createField("ENTRY_REBALANCING_TARGET_BACKEND_SET", "targetBackendSet",
770            STRING_SYNTAX);
771
772
773
774  /**
775   * A field whose value is a JSON object with information about the target
776   * server for an entry rebalancing operation.  This field may appear in entry
777   * rebalancing access log messages.
778   */
779  @NotNull public static final LogField ENTRY_REBALANCING_TARGET_SERVER =
780       createField("ENTRY_REBALANCING_TARGET_SERVER", "targetServer",
781            JSON_SYNTAX);
782
783
784  /**
785   * A field (appearing inside the {@link #ENTRY_REBALANCING_TARGET_SERVER}
786   * JSON object) that holds the address of the target server for an entry
787   * rebalancing operation.  This field may appear in entry rebalancing access
788   * log messages.
789   */
790  @NotNull public static final LogField
791       ENTRY_REBALANCING_TARGET_SERVER_ADDRESS = createField(
792            "ENTRY_REBALANCING_TARGET_SERVER_ADDRESS", "address",
793            STRING_SYNTAX);
794
795
796
797  /**
798   * A field that indicates whether the target server was altered in the course
799   * of processing an entry rebalancing operation.  This field may appear in
800   * entry rebalancing access log messages.
801   */
802  @NotNull public static final LogField
803       ENTRY_REBALANCING_TARGET_SERVER_ALTERED = createField(
804            "ENTRY_REBALANCING_TARGET_SERVER_ALTERED", "targetServerAltered",
805            BOOLEAN_SYNTAX);
806
807
808  /**
809   * A field (appearing inside the {@link #ENTRY_REBALANCING_TARGET_SERVER}
810   * JSON object) that holds the port of the target server for an entry
811   * rebalancing operation.  This field may appear in entry rebalancing access
812   * log messages.
813   */
814  @NotNull public static final LogField ENTRY_REBALANCING_TARGET_SERVER_PORT =
815       createField("ENTRY_REBALANCING_TARGET_SERVER_PORT", "port",
816            INTEGER_SYNTAX);
817
818
819
820  /**
821   * A field that holds the request OID for an extended operation.  This field
822   * may appear in access log messages for extended operations.
823   */
824  @NotNull public static final LogField EXTENDED_REQUEST_OID =
825       createField("EXTENDED_REQUEST_OID", "requestOID", STRING_SYNTAX);
826
827
828
829  /**
830   * A field that holds the name for an extended request.  This field may
831   * appear in access log messages for extended operations.
832   */
833  @NotNull public static final LogField EXTENDED_REQUEST_TYPE =
834       createField("EXTENDED_REQUEST_TYPE", "requestType", STRING_SYNTAX);
835
836
837
838  /**
839   * A field that holds the response OID for an extended operation.  This field
840   * may appear in access log messages for extended operations.
841   */
842  @NotNull public static final LogField EXTENDED_RESPONSE_OID =
843       createField("EXTENDED_RESPONSE_OID", "responseOID", STRING_SYNTAX);
844
845
846
847  /**
848   * A field that holds the name for an extended response.  This field may
849   * appear in access log messages for extended operations.
850   */
851  @NotNull public static final LogField EXTENDED_RESPONSE_TYPE =
852       createField("EXTENDED_RESPONSE_TYPE", "responseType", STRING_SYNTAX);
853
854
855
856  /**
857   * A field whose value is a JSON array containing the names of any
858   * indexes accessed in the course of processing operation that had exceeded
859   * the index entry limit.  This field may appear operation result access log
860   * messages.
861   */
862  @NotNull public static final LogField
863       INDEXES_WITH_KEYS_ACCESSED_EXCEEDING_ENTRY_LIMIT = createField(
864            "INDEXES_WITH_KEYS_ACCESSED_EXCEEDING_ENTRY_LIMIT",
865            "indexesWithKeysAccessedExceedingEntryLimit", STRING_SYNTAX);
866
867
868
869  /**
870   * A field whose value is a JSON array containing the names of any
871   * indexes accessed in the course of processing operation that were near the
872   * index entry limit.  This field may appear operation result access log
873   * messages.
874   */
875  @NotNull public static final LogField
876       INDEXES_WITH_KEYS_ACCESSED_NEAR_ENTRY_LIMIT = createField(
877            "INDEXES_WITH_KEYS_ACCESSED_NEAR_ENTRY_LIMIT",
878            "indexesWithKeysAccessedNearEntryLimit", STRING_SYNTAX);
879
880
881
882  /**
883   * A field that holds the name of the server instance that logged the message.
884   * This field may appear in all types of access log messages.
885   */
886  @NotNull public static final LogField INSTANCE_NAME =
887       createField("INSTANCE_NAME", "instanceName", STRING_SYNTAX);
888
889
890
891  /**
892   * A field whose value is an array of JSON objects with details about a set of
893   * inter-server request controls included in the operation request.  This
894   * field may appear in all types of access log messages that are associated
895   * with operations.
896   */
897  @NotNull public static final LogField INTER_SERVER_REQUEST_CONTROLS =
898       createField("INTER_SERVER_REQUEST_CONTROLS",
899            "interServerRequestControls", JSON_SYNTAX);
900
901
902
903  /**
904   * A field (appearing inside a JSON object in the
905   * {@link #INTER_SERVER_REQUEST_CONTROLS} array) that holds the name of the
906   * component that generated the inter-server request control.  This field may
907   * appear in all types of access log messages that are associated with
908   * operations.
909   */
910  @NotNull public static final LogField
911       INTER_SERVER_REQUEST_CONTROLS_COMPONENT_NAME = createField(
912            "INTER_SERVER_REQUEST_CONTROLS_COMPONENT_NAME", "componentName",
913            STRING_SYNTAX);
914
915
916
917  /**
918   * A field (appearing inside a JSON object in the
919   * {@link #INTER_SERVER_REQUEST_CONTROLS} array) that holds the purpose for
920   * the inter-server request control.  This field may appear in all types of
921   * access log messages that are associated with operations.
922   */
923  @NotNull public static final LogField
924       INTER_SERVER_REQUEST_CONTROLS_OPERATION_PURPOSE = createField(
925            "INTER_SERVER_REQUEST_CONTROLS_OPERATION_PURPOSE",
926            "operationPurpose", STRING_SYNTAX);
927
928
929
930  /**
931   * A field (appearing inside a JSON object in the
932   * {@link #INTER_SERVER_REQUEST_CONTROLS} array) that holds an array of JSON
933   * objects with property name-value pairs from the inter-server request
934   * control.  This field may appear in all types of access log messages that
935   * are associated with operations.
936   */
937  @NotNull public static final LogField
938       INTER_SERVER_REQUEST_CONTROLS_PROPERTIES = createField(
939            "INTER_SERVER_REQUEST_CONTROLS_PROPERTIES", "properties",
940            JSON_SYNTAX);
941
942
943
944  /**
945   * A field (appearing inside a JSON object in the
946   * {@link #INTER_SERVER_REQUEST_CONTROLS_PROPERTIES} array) that holds the
947   * name of the inter-server request property.  This field may appear in all
948   * types of access log messages that are associated with operations.
949   */
950  @NotNull public static final LogField
951       INTER_SERVER_REQUEST_CONTROLS_PROPERTIES_NAME = createField(
952            "INTER_SERVER_REQUEST_CONTROLS_PROPERTIES_NAME", "name",
953            STRING_SYNTAX);
954
955
956
957  /**
958   * A field (appearing inside a JSON object in the
959   * {@link #INTER_SERVER_REQUEST_CONTROLS_PROPERTIES} array) that holds the
960   * value of the inter-server request property.  This field may appear in all
961   * types of access log messages that are associated with operations.
962   */
963  @NotNull public static final LogField
964       INTER_SERVER_REQUEST_CONTROLS_PROPERTIES_VALUE = createField(
965            "INTER_SERVER_REQUEST_CONTROLS_PROPERTIES_VALUE", "value",
966            STRING_SYNTAX);
967
968
969
970  /**
971   * A field whose value is a JSON object with details about an intermediate
972   * client request control included in the operation request.  This field may
973   * appear in all types of access log messages that are associated with
974   * operations.
975   */
976  @NotNull public static final LogField INTERMEDIATE_CLIENT_REQUEST_CONTROL =
977       createField("INTERMEDIATE_CLIENT_REQUEST_CONTROL",
978            "intermediateClientRequestControl", JSON_SYNTAX);
979
980
981
982  /**
983   * A field (appearing inside the {@link #INTERMEDIATE_CLIENT_REQUEST_CONTROL}
984   * JSON object) that holds the requested alternative authorization identity.
985   * This field may appear in all types of access log messages that are
986   * associated with operations.
987   */
988  @NotNull public static final LogField
989       INTERMEDIATE_CLIENT_REQUEST_CONTROL_CLIENT_IDENTITY = createField(
990            "INTERMEDIATE_CLIENT_REQUEST_CONTROL_CLIENT_IDENTITY",
991            "clientIdentity", STRING_SYNTAX);
992
993
994
995  /**
996   * A field (appearing inside the {@link #INTERMEDIATE_CLIENT_REQUEST_CONTROL}
997   * JSON object) that holds the name of the client application.  This field may
998   * appear in all types of access log messages that are associated with
999   * operations.
1000   */
1001  @NotNull public static final LogField
1002       INTERMEDIATE_CLIENT_REQUEST_CONTROL_CLIENT_NAME = createField(
1003            "INTERMEDIATE_CLIENT_REQUEST_CONTROL_CLIENT_NAME", "clientName",
1004            STRING_SYNTAX);
1005
1006
1007
1008  /**
1009   * A field (appearing inside the {@link #INTERMEDIATE_CLIENT_REQUEST_CONTROL}
1010   * JSON object) that holds the session ID that the client has assigned for the
1011   * request received from the downstream system.  This field may appear in all
1012   * types of access log messages that are associated with operations.
1013   */
1014  @NotNull public static final LogField
1015       INTERMEDIATE_CLIENT_REQUEST_CONTROL_REQUEST_ID = createField(
1016            "INTERMEDIATE_CLIENT_REQUEST_CONTROL_REQUEST_ID", "clientRequestID",
1017            STRING_SYNTAX);
1018
1019
1020
1021  /**
1022   * A field (appearing inside the {@link #INTERMEDIATE_CLIENT_REQUEST_CONTROL}
1023   * JSON object) that holds the session ID that the client has assigned for
1024   * communication with the downstream system.  This field may appear in all
1025   * types of access log messages that are associated with operations.
1026   */
1027  @NotNull public static final LogField
1028       INTERMEDIATE_CLIENT_REQUEST_CONTROL_SESSION_ID = createField(
1029            "INTERMEDIATE_CLIENT_REQUEST_CONTROL_SESSION_ID", "clientSessionID",
1030            STRING_SYNTAX);
1031
1032
1033
1034  /**
1035   * A field (appearing inside the {@link #INTERMEDIATE_CLIENT_REQUEST_CONTROL}
1036   * JSON object) that holds the address of downstream system communicating with
1037   * the client.  This field may appear in all types of access log messages that
1038   * are associated with operations.
1039   */
1040  @NotNull public static final LogField
1041       INTERMEDIATE_CLIENT_REQUEST_CONTROL_DOWNSTREAM_CLIENT_ADDRESS =
1042            createField(
1043            "INTERMEDIATE_CLIENT_REQUEST_CONTROL_DOWNSTREAM_CLIENT_ADDRESS",
1044            "downstreamClientAddress", STRING_SYNTAX);
1045
1046
1047
1048  /**
1049   * A field (appearing inside the {@link #INTERMEDIATE_CLIENT_REQUEST_CONTROL}
1050   * JSON object) that indicates whether the client's communication with the
1051   * downstream system is considered secure.  This field may appear in all types
1052   * of access log messages that are associated with operations.
1053   */
1054  @NotNull public static final LogField
1055       INTERMEDIATE_CLIENT_REQUEST_CONTROL_DOWNSTREAM_CLIENT_SECURE =
1056            createField(
1057                 "INTERMEDIATE_CLIENT_REQUEST_CONTROL_DOWNSTREAM_CLIENT_SECURE",
1058                 "downstreamClientSecure", BOOLEAN_SYNTAX);
1059
1060
1061
1062  /**
1063   * A field (appearing inside the {@link #INTERMEDIATE_CLIENT_REQUEST_CONTROL}
1064   * JSON object) that holds a JSON object representation of an intermediate
1065   * client request received by the client.  The downstream request object has
1066   * the same format as the {@code INTERMEDIATE_CLIENT_REQUEST} object itself.
1067   * This field may appear in all types of access log messages that are
1068   * associated with operations.
1069   */
1070  @NotNull public static final LogField
1071       INTERMEDIATE_CLIENT_REQUEST_CONTROL_DOWNSTREAM_REQUEST = createField(
1072            "INTERMEDIATE_CLIENT_REQUEST_CONTROL_DOWNSTREAM_REQUEST",
1073            "downstreamRequest", JSON_SYNTAX);
1074
1075
1076
1077  /**
1078   * A field whose value is a JSON object with details about an intermediate
1079   * client response control included in the operation result.  This field may
1080   * appear in all types of operation result access log messages.
1081   */
1082  @NotNull public static final LogField INTERMEDIATE_CLIENT_RESPONSE_CONTROL =
1083       createField("INTERMEDIATE_CLIENT_RESPONSE_CONTROL",
1084            "intermediateClientResponseControl", JSON_SYNTAX);
1085
1086
1087
1088  /**
1089   * A field (appearing inside the {@link #INTERMEDIATE_CLIENT_RESPONSE_CONTROL}
1090   * JSON object) that holds a response ID that the upstream server has assigned
1091   * for the operation.  This field may appear in all types of operation result
1092   * access log messages.
1093   */
1094  @NotNull public static final LogField
1095       INTERMEDIATE_CLIENT_RESPONSE_CONTROL_RESPONSE_ID = createField(
1096            "INTERMEDIATE_CLIENT_RESPONSE_CONTROL_RESPONSE_ID",
1097            "serverResponseID", STRING_SYNTAX);
1098
1099
1100
1101  /**
1102   * A field (appearing inside the {@link #INTERMEDIATE_CLIENT_RESPONSE_CONTROL}
1103   * JSON object) that holds the name of the application acting as the upstream
1104   * server.  This field may appear in all types of operation result access log
1105   * messages.
1106   */
1107  @NotNull public static final LogField
1108       INTERMEDIATE_CLIENT_RESPONSE_CONTROL_SERVER_NAME =
1109            createField("INTERMEDIATE_CLIENT_RESPONSE_CONTROL_SERVER_NAME",
1110                 "serverName", STRING_SYNTAX);
1111
1112
1113
1114  /**
1115   * A field (appearing inside the {@link #INTERMEDIATE_CLIENT_RESPONSE_CONTROL}
1116   * JSON object) that holds a session ID that the upstream server has assigned
1117   * for the connection.  This field may appear in all types of operation result
1118   * access log messages.
1119   */
1120  @NotNull public static final LogField
1121       INTERMEDIATE_CLIENT_RESPONSE_CONTROL_SESSION_ID = createField(
1122            "INTERMEDIATE_CLIENT_RESPONSE_CONTROL_SESSION_ID",
1123            "serverSessionID", STRING_SYNTAX);
1124
1125
1126
1127  /**
1128   * A field (appearing inside the {@link #INTERMEDIATE_CLIENT_RESPONSE_CONTROL}
1129   * JSON object) that holds a JSON object representation of an intermediate
1130   * client request forwarded to another server  The upstream response object
1131   * has the same format as the {@code INTERMEDIATE_CLIENT_RESPONSE} object
1132   * itself.  This field may appear in all types of operation result access log
1133   * messages.
1134   */
1135  @NotNull public static final LogField
1136       INTERMEDIATE_CLIENT_RESPONSE_CONTROL_UPSTREAM_RESPONSE = createField(
1137            "INTERMEDIATE_CLIENT_RESPONSE_CONTROL_UPSTREAM_RESPONSE",
1138            "upstreamResponse", JSON_SYNTAX);
1139
1140
1141
1142  /**
1143   * A field (appearing inside the {@link #INTERMEDIATE_CLIENT_RESPONSE_CONTROL}
1144   * JSON object) that holds the address of an upstream server involved in
1145   * processing the operation.  This field may appear in all types of operation
1146   * result access log messages.
1147   */
1148  @NotNull public static final LogField
1149       INTERMEDIATE_CLIENT_RESPONSE_CONTROL_UPSTREAM_SERVER_ADDRESS =
1150            createField(
1151                 "INTERMEDIATE_CLIENT_RESPONSE_CONTROL_UPSTREAM_SERVER_ADDRESS",
1152                 "upstreamServerAddress", STRING_SYNTAX);
1153
1154
1155
1156  /**
1157   * A field (appearing inside the {@link #INTERMEDIATE_CLIENT_RESPONSE_CONTROL}
1158   * JSON object) that indicates whether communication with the associated
1159   * upstream server is considered secure.  This field may appear in all types
1160   * of operation result access log messages.
1161   */
1162  @NotNull public static final LogField
1163       INTERMEDIATE_CLIENT_RESPONSE_CONTROL_UPSTREAM_SERVER_SECURE =
1164            createField(
1165                 "INTERMEDIATE_CLIENT_RESPONSE_CONTROL_UPSTREAM_SERVER_SECURE",
1166                 "upstreamServerSecure", BOOLEAN_SYNTAX);
1167
1168
1169
1170  /**
1171   * A field that holds the name for an intermediate response returned to the
1172   * client.  This field may appear in intermediate response access log
1173   * messages.
1174   */
1175  @NotNull public static final LogField INTERMEDIATE_RESPONSE_NAME =
1176       createField("INTERMEDIATE_RESPONSE_NAME", "name", STRING_SYNTAX);
1177
1178
1179
1180  /**
1181   * A field that holds the OID for an intermediate response returned to the
1182   * client.  This field may appear in intermediate response access log
1183   * messages.
1184   */
1185  @NotNull public static final LogField INTERMEDIATE_RESPONSE_OID =
1186       createField("INTERMEDIATE_RESPONSE_OID", "oid", STRING_SYNTAX);
1187
1188
1189
1190  /**
1191   * A field that holds a string representation of the value for an intermediate
1192   * response returned to the client.  This field may appear in intermediate
1193   * response access log messages.
1194   */
1195  @NotNull public static final LogField INTERMEDIATE_RESPONSE_VALUE =
1196       createField("INTERMEDIATE_RESPONSE_VALUE", "value", STRING_SYNTAX);
1197
1198
1199
1200  /**
1201   * A field that holds the number of intermediate response messages returned to
1202   * the client in the course of processing the operation.  This field may
1203   * appear in all types of operation result access log messages.
1204   */
1205  @NotNull public static final LogField INTERMEDIATE_RESPONSES_RETURNED =
1206       createField("INTERMEDIATE_RESPONSES_RETURNED",
1207            "intermediateResponsesReturned", INTEGER_SYNTAX);
1208
1209
1210
1211  /**
1212   * A field that indicates whether the requested local assurance level was
1213   * satisfied in the course of processing the operation.  This field may appear
1214   * in assurance completed access log messages.
1215   */
1216  @NotNull public static final LogField LOCAL_ASSURANCE_SATISFIED =
1217       createField("LOCAL_ASSURANCE_SATISFIED", "localAssuranceSatisfied",
1218            BOOLEAN_SYNTAX);
1219
1220
1221
1222  /**
1223   * A field that holds the log type for the log message (which should always be
1224   * "access" for access log messages).  This field may appear in all types of
1225   * access log messages.
1226   */
1227  @NotNull public static final LogField LOG_TYPE =
1228       createField("LOG_TYPE", "logType", STRING_SYNTAX);
1229
1230
1231
1232  /**
1233   * A field that holds the matched DN for the operation, which is the DN for
1234   * the closest ancestor of an entry that does not exist.  This field may
1235   * appear in all types of operation result access log messages.
1236   */
1237  @NotNull public static final LogField MATCHED_DN =
1238       createField("MATCHED_DN", "matchedDN", DN_SYNTAX);
1239
1240
1241
1242  /**
1243   * A field that holds the numeric message ID for the associated operation on
1244   * the client connection.  For LDAP operations, this is the message ID
1245   * included in the LDAP request and response messages for that operation.
1246   * This field may appear in all types of access log messages that are
1247   * associated with operations.
1248   */
1249  @NotNull public static final LogField MESSAGE_ID =
1250       createField("MESSAGE_ID", "messageID", INTEGER_SYNTAX);
1251
1252
1253
1254  /**
1255   * A field that holds the message type for the log message.  This field may
1256   * appear in all types of access log messages.
1257   */
1258  @NotNull public static final LogField MESSAGE_TYPE =
1259       createField("MESSAGE_TYPE", "messageType", STRING_SYNTAX);
1260
1261
1262
1263  /**
1264   * A field whose value is a JSON array containing the names of any privileges
1265   * that were required for the processing the operation that the requester did
1266   * not have.  This field may appear in all types of operation result access
1267   * log messages.
1268   */
1269  @NotNull public static final LogField MISSING_PRIVILEGES =
1270       createField("MISSING_PRIVILEGES", "missingPrivileges", STRING_SYNTAX);
1271
1272
1273
1274  /**
1275   * A field that indicates whether old RDN attribute values should be removed
1276   * from the entry.  This field may appear in access log messages for modify DN
1277   * operations.
1278   */
1279  @NotNull public static final LogField MODDN_DELETE_OLD_RDN =
1280       createField("MODDN_DELETE_OLD_RDN", "deleteOldRDN", BOOLEAN_SYNTAX);
1281
1282
1283
1284  /**
1285   * A field that holds the DN of the entry to be renamed.  This field may
1286   * appear in access log messages for modify DN operations.
1287   */
1288  @NotNull public static final LogField MODDN_ENTRY_DN =
1289       createField("MODDN_ENTRY_DN", "dn", DN_SYNTAX);
1290
1291
1292
1293  /**
1294   * A field that holds the new RDN to use for the entry to be renamed.  This
1295   * field may appear in access log messages for modify DN operations.
1296   */
1297  @NotNull public static final LogField MODDN_NEW_RDN =
1298       createField("MODDN_NEW_RDN", "newRDN", DN_SYNTAX);
1299
1300
1301
1302  /**
1303   * A field that holds the new superior entry DN to use for the entry to be
1304   * renamed.  This field may appear in access log messages for modify DN
1305   * operations.
1306   */
1307  @NotNull public static final LogField MODDN_NEW_SUPERIOR_DN =
1308       createField("MODDN_NEW_SUPERIOR_DN", "newSuperior", DN_SYNTAX);
1309
1310
1311
1312  /**
1313   * A field whose value is a JSON array containing the names of the attributes
1314   * to be modified.  This field may appear in access log messages for modify
1315   * operations.
1316   */
1317  @NotNull public static final LogField MODIFY_ATTRIBUTES =
1318       createField("MODIFY_ATTRIBUTES", "attributes", STRING_SYNTAX);
1319
1320
1321
1322  /**
1323   * A field that holds the DN of the entry to be modified.  This field may
1324   * appear in access log messages for modify operations.
1325   */
1326  @NotNull public static final LogField MODIFY_ENTRY_DN =
1327       createField("MODIFY_ENTRY_DN", "dn", DN_SYNTAX);
1328
1329
1330
1331  /**
1332   * A field that holds a numeric identifier for the associated operation on the
1333   * client connection.  If there are multiple access log messages for a given
1334   * operation (for example, if both request and response messages should be
1335   * logged), then each of those log messages will have the same connection ID
1336   * and operation ID values, so those fields may be used to identify messages
1337   * for that operation.  Note, however, that the connection ID counter is reset
1338   * when the server is restarted, so the {@link #STARTUP_ID} field may also be
1339   * necessary to further distinguish between connections across restarts.
1340   * Further, connection ID values may be reused across instances, so the
1341   * {@link #INSTANCE_NAME} field may also be needed to distinguish between
1342   * connections to different instances.  This field may appear in all types of
1343   * access log messages that are associated with operations.
1344   */
1345  @NotNull public static final LogField OPERATION_ID =
1346       createField("OPERATION_ID", "operationID", INTEGER_SYNTAX);
1347
1348
1349
1350  /**
1351   * A field whose value is a JSON object with details about an operation
1352   * purpose request control included in the operation request.  This field may
1353   * appear in all types of access log messages that are associated with
1354   * operations.
1355   */
1356  @NotNull public static final LogField OPERATION_PURPOSE =
1357       createField("OPERATION_PURPOSE", "operationPurposeRequestControl",
1358            JSON_SYNTAX);
1359
1360
1361
1362  /**
1363   * A field (appearing inside the {@link #OPERATION_PURPOSE} JSON object) that
1364   * holds the name of the application that generated the request.  This field
1365   * may appear in all types of access log messages that are associated with
1366   * operations.
1367   */
1368  @NotNull public static final LogField OPERATION_PURPOSE_APPLICATION_NAME =
1369       createField("OPERATION_PURPOSE_APPLICATION_NAME", "applicationName",
1370            STRING_SYNTAX);
1371
1372
1373
1374  /**
1375   * A field (appearing inside the {@link #OPERATION_PURPOSE} JSON object) that
1376   * holds the version of the application that generated the request.  This
1377   * field may appear in all types of access log messages that are associated
1378   * with operations.
1379   */
1380  @NotNull public static final LogField OPERATION_PURPOSE_APPLICATION_VERSION =
1381       createField("OPERATION_PURPOSE_APPLICATION_VERSION",
1382            "applicationVersion", STRING_SYNTAX);
1383
1384
1385
1386  /**
1387   * A field (appearing inside the {@link #OPERATION_PURPOSE} JSON object) that
1388   * holds the location in the client code where the request was generated.
1389   * This field may appear in all types of access log messages that are
1390   * associated with operations.
1391   */
1392  @NotNull public static final LogField OPERATION_PURPOSE_CODE_LOCATION =
1393       createField("OPERATION_PURPOSE_CODE_LOCATION", "codeLocation",
1394            STRING_SYNTAX);
1395
1396
1397
1398  /**
1399   * A field (appearing inside the {@link #OPERATION_PURPOSE} JSON object) that
1400   * explains the purpose for the request.  This field may appear in all types
1401   * of access log messages that are associated with operations.
1402   */
1403  @NotNull public static final LogField OPERATION_PURPOSE_REQUEST_PURPOSE =
1404       createField("OPERATION_PURPOSE_REQUEST_PURPOSE", "requestPurpose",
1405            STRING_SYNTAX);
1406
1407
1408
1409  /**
1410   * A field that holds the operation type for the log message.  This field may
1411   * appear in all types of access log messages that are associated with
1412   * operations.
1413   */
1414  @NotNull public static final LogField OPERATION_TYPE =
1415       createField("OPERATION_TYPE", "operationType", STRING_SYNTAX);
1416
1417
1418
1419  /**
1420   * A field that holds information about the origin of the associated
1421   * operation.  This is especially common for things like internal operations
1422   * or operations processed by the replication subsystem.  This field may
1423   * appear in all types of access log messages that are associated with
1424   * operations.
1425   */
1426  @NotNull public static final LogField ORIGIN =
1427       createField("ORIGIN", "origin", STRING_SYNTAX);
1428
1429
1430
1431  /**
1432   * A field that holds an array of JSON objects with additional details about
1433   * the origin of an operation.  This field may appear in all types of access
1434   * log messages that are associated with operations.
1435   */
1436  @NotNull public static final LogField ORIGIN_DETAILS =
1437       createField("ORIGIN_DETAILS", "originDetails", JSON_SYNTAX);
1438
1439
1440
1441  /**
1442   * A field that holds the name from an {@link #ORIGIN_DETAILS} object.
1443   */
1444  @NotNull public static final LogField ORIGIN_DETAILS_NAME =
1445       createField("ORIGIN_DETAILS_NAME", "name", STRING_SYNTAX);
1446
1447
1448
1449  /**
1450   * A field that holds the value from an {@link #ORIGIN_DETAILS} object.
1451   */
1452  @NotNull public static final LogField ORIGIN_DETAILS_VALUE =
1453       createField("ORIGIN_DETAILS_VALUE", "value", STRING_SYNTAX);
1454
1455
1456
1457  /**
1458   * A field that holds a JSON object with the peer certificate chain presented
1459   * during TLS negotiation.  This field may appear in CLIENT-CERTIFICATE
1460   * access log messages.
1461   */
1462  @NotNull public static final LogField PEER_CERTIFICATE_CHAIN =
1463       createField("PEER_CERTIFICATE_CHAIN", "certificateChain", JSON_SYNTAX);
1464
1465
1466
1467  /**
1468   * A field that holds a hexadecimal representation of the bytes that comprise
1469   * the encoded representation of a certificate included in the peer
1470   * certificate chain presented during TLS negotiation.  This field may appear
1471   * in CLIENT-CERTIFICATE access log messages.
1472   */
1473  @NotNull public static final LogField
1474       PEER_CERTIFICATE_CHAIN_CERTIFICATE_BYTES = createField(
1475            "PEER_CERTIFICATE_CHAIN_CERTIFICATE_BYTES", "certificateBytes",
1476            STRING_SYNTAX);
1477
1478
1479
1480  /**
1481   * A field that holds a string representation of a certificate included in the
1482   * peer certificate chain presented during TLS negotiation.  This field may
1483   * appear in CLIENT-CERTIFICATE access log messages.
1484   */
1485  @NotNull public static final LogField
1486       PEER_CERTIFICATE_CHAIN_CERTIFICATE_STRING = createField(
1487            "PEER_CERTIFICATE_CHAIN_CERTIFICATE_STRING", "toString",
1488            STRING_SYNTAX);
1489
1490
1491
1492  /**
1493   * A field that holds the name of the certificate type for a certificate
1494   * included in the peer certificate chain presented during TLS negotiation.
1495   * This field may appear in CLIENT-CERTIFICATE access log messages.
1496   */
1497  @NotNull public static final LogField
1498       PEER_CERTIFICATE_CHAIN_CERTIFICATE_TYPE = createField(
1499            "PEER_CERTIFICATE_CHAIN_CERTIFICATE_TYPE", "type", STRING_SYNTAX);
1500
1501
1502
1503  /**
1504   * A field that holds the issuer subject DN for a certificate presented in the
1505   * client certificate chain during security negotiation.  This field may
1506   * appear in CLIENT-CERTIFICATE access log messages, in the
1507   * {@link #PEER_CERTIFICATE_CHAIN} object.
1508   */
1509  @NotNull public static final LogField
1510       PEER_CERTIFICATE_CHAIN_ISSUER_SUBJECT_DN = createField(
1511            "PEER_CERTIFICATE_CHAIN_ISSUER_SUBJECT_DN", "issuerSubject",
1512            DN_SYNTAX);
1513
1514
1515
1516  /**
1517   * A field that holds the "notAfter" timestamp for a certificate presented in
1518   * the client certificate chain during security negotiation, which is the time
1519   * that the certificate will (or did) expire.  This field may appear in
1520   * CLIENT-CERTIFICATE access log messages, in the
1521   * {@link #PEER_CERTIFICATE_CHAIN} object.
1522   */
1523  @NotNull public static final LogField PEER_CERTIFICATE_CHAIN_NOT_AFTER =
1524       createField("PEER_CERTIFICATE_CHAIN_NOT_AFTER", "notAfter",
1525            RFC_3339_TIMESTAMP_SYNTAX);
1526
1527
1528
1529  /**
1530   * A field that holds the "notBefore" timestamp for a certificate presented in
1531   * the client certificate chain during security negotiation, which is the time
1532   * that the certificate became (or will become) valid.  This field may appear
1533   * in CLIENT-CERTIFICATE access log messages, in the
1534   * {@link #PEER_CERTIFICATE_CHAIN} object.
1535   */
1536  @NotNull public static final LogField PEER_CERTIFICATE_CHAIN_NOT_BEFORE =
1537       createField("PEER_CERTIFICATE_CHAIN_NOT_BEFORE", "notBefore",
1538            RFC_3339_TIMESTAMP_SYNTAX);
1539
1540
1541
1542  /**
1543   * A field that holds a string representation of the serial number for a
1544   * certificate presented in the client certificate chain during security
1545   * negotiation.  This field may appear in CLIENT-CERTIFICATE access log
1546   * messages, in the {@link #PEER_CERTIFICATE_CHAIN} object.
1547   */
1548  @NotNull public static final LogField PEER_CERTIFICATE_CHAIN_SERIAL_NUMBER =
1549       createField("PEER_CERTIFICATE_CHAIN_SERIAL_NUMBER", "serialNumber",
1550            STRING_SYNTAX);
1551
1552
1553
1554  /**
1555   * A field that holds the name of the algorithm used to generate the signature
1556   * of a certificate presented in the client certificate chain during security
1557   * negotiation.  This field may appear in CLIENT-CERTIFICATE access log
1558   * messages, in the {@link #PEER_CERTIFICATE_CHAIN} object.
1559   */
1560  @NotNull public static final LogField
1561       PEER_CERTIFICATE_CHAIN_SIGNATURE_ALGORITHM = createField(
1562            "PEER_CERTIFICATE_CHAIN_SIGNATURE_ALGORITHM",
1563            "signatureAlgorithm", STRING_SYNTAX);
1564
1565
1566
1567  /**
1568   * A field that holds a hexadecimal string representation of the signature for
1569   * a certificate presented in the client certificate chain during security
1570   * negotiation.  This field may appear in CLIENT-CERTIFICATE access log
1571   * messages, in the {@link #PEER_CERTIFICATE_CHAIN} object.
1572   */
1573  @NotNull public static final LogField PEER_CERTIFICATE_CHAIN_SIGNATURE_BYTES =
1574       createField("PEER_CERTIFICATE_CHAIN_SIGNATURE_BYTES", "signatureBytes",
1575            STRING_SYNTAX);
1576
1577
1578
1579  /**
1580   * A field that holds the subject DN for a certificate presented in the
1581   * client certificate chain during security negotiation.  This field may
1582   * appear in CLIENT-CERTIFICATE access log messages, in the
1583   * {@link #PEER_CERTIFICATE_CHAIN} object.
1584   */
1585  @NotNull public static final LogField PEER_CERTIFICATE_CHAIN_SUBJECT_DN =
1586       createField("PEER_CERTIFICATE_CHAIN_SUBJECT_DN", "subject", DN_SYNTAX);
1587
1588
1589
1590  /**
1591   * A field whose value is a JSON array containing the names of any privileges
1592   * used prior to processing a control that applies an alternative
1593   * authorization identity to the operation.  This field may appear in all
1594   * types of operation result access log messages.
1595   */
1596  @NotNull public static final LogField PRE_AUTHORIZATION_USED_PRIVILEGES =
1597       createField("PRE_AUTHORIZATION_USED_PRIVILEGES",
1598            "preAuthorizationUsedPrivileges", STRING_SYNTAX);
1599
1600
1601
1602  /**
1603   * A field that holds the length of time (in milliseconds) that a worker
1604   * thread spent processing the operation.  This field may appear in all types
1605   * of operation result access log messages.
1606   */
1607  @NotNull public static final LogField PROCESSING_TIME_MILLIS = createField(
1608       "PROCESSING_TIME_MILLIS", "processingTimeMillis", FLOATING_POINT_SYNTAX);
1609
1610
1611
1612  /**
1613   * A field that holds the name of the product that logged the message.  This
1614   * field may appear in all types of access log messages.
1615   */
1616  @NotNull public static final LogField PRODUCT_NAME =
1617       createField("PRODUCT_NAME", "product", STRING_SYNTAX);
1618
1619
1620
1621  /**
1622   * A field that holds the name of the protocol a client is using to
1623   * communicate with the server.  This field may appear in CONNECT and
1624   * SECURITY-NEGOTIATION access log messages.
1625   */
1626  @NotNull public static final LogField PROTOCOL =
1627       createField("PROTOCOL", "protocol", STRING_SYNTAX);
1628
1629
1630
1631  /**
1632   * A field whose value is a JSON array containing the referral URL strings for
1633   * an operation, which indicate that the requested operation should be
1634   * attempted elsewhere.  This field may appear in all types of operation
1635   * result access log messages.
1636   */
1637  @NotNull public static final LogField REFERRAL_URLS =
1638       createField("REFERRAL_URLS", "referralURLs", STRING_SYNTAX);
1639
1640
1641
1642  /**
1643   * A field that indicates whether the requested remote assurance level was
1644   * satisfied in the course of processing the operation.  This field may appear
1645   * in assurance completed access log messages.
1646   */
1647  @NotNull public static final LogField REMOTE_ASSURANCE_SATISFIED =
1648       createField("REMOTE_ASSURANCE_SATISFIED", "remoteAssuranceSatisfied",
1649            BOOLEAN_SYNTAX);
1650
1651
1652
1653  /**
1654   * A field that holds the replication change ID for a replicated operation.
1655   * This field may appear in all types of operation result access log messages.
1656   */
1657  @NotNull public static final LogField REPLICATION_CHANGE_ID =
1658       createField("REPLICATION_CHANGE_ID", "replicationChangeID",
1659            STRING_SYNTAX);
1660
1661
1662
1663  /**
1664   * A field whose value is a JSON array of the OIDs of any controls included
1665   * in the request.  This field may appear in all types of access log messages
1666   * that are associated with operations.
1667   */
1668  @NotNull public static final LogField REQUEST_CONTROL_OIDS =
1669       createField("REQUEST_CONTROL_OIDS", "requestControlOIDs", STRING_SYNTAX);
1670
1671
1672
1673  /**
1674   * A field that holds the DN of the user that requested the associated
1675   * operation.  This field may appear in all types of access log messages that
1676   * are associated with operations.
1677   */
1678  @NotNull public static final LogField REQUESTER_DN =
1679       createField("REQUESTER_DN", "requesterDN", DN_SYNTAX);
1680
1681
1682
1683  /**
1684   * A field that holds the IP address of the client that requested the
1685   * associated operation.  This field may appear in all types of access log
1686   * messages that are associated with operations.
1687   */
1688  @NotNull public static final LogField REQUESTER_IP_ADDRESS =
1689       createField("REQUESTER_IP_ADDRESS", "requesterIP", STRING_SYNTAX);
1690
1691
1692
1693  /**
1694   * A field whose value is a JSON array of the OIDs of any controls included
1695   * in the response.  This field may appear in all types of operation result
1696   * access log messages.
1697   */
1698  @NotNull public static final LogField RESPONSE_CONTROL_OIDS =
1699       createField("RESPONSE_CONTROL_OIDS", "responseControlOIDs",
1700            STRING_SYNTAX);
1701
1702
1703
1704  /**
1705   * A field that holds the name of the result code for the associated
1706   * operation.  This field may appear in all types of operation result access
1707   * log messages.
1708   */
1709  @NotNull public static final LogField RESULT_CODE_NAME =
1710       createField("RESULT_CODE_NAME", "resultCodeName", STRING_SYNTAX);
1711
1712
1713
1714  /**
1715   * A field that holds the numeric value of the result code for the associated
1716   * operation.  This field may appear in all types of operation result access
1717   * log messages.
1718   */
1719  @NotNull public static final LogField RESULT_CODE_VALUE =
1720       createField("RESULT_CODE_VALUE", "resultCode", INTEGER_SYNTAX);
1721
1722
1723
1724  /**
1725   * A field that holds the base DN for a search operation.  This field may
1726   * appear in access log messages for search operations.
1727   */
1728  @NotNull public static final LogField SEARCH_BASE_DN =
1729       createField("SEARCH_BASE_DN", "baseDN", DN_SYNTAX);
1730
1731
1732
1733  /**
1734   * A field that holds the name of the policy to use for dereferencing aliases
1735   * for a search operation.  This field may appear in access log messages for
1736   * search operations.
1737   */
1738  @NotNull public static final LogField SEARCH_DEREF_POLICY =
1739       createField("SEARCH_DEREF_POLICY", "dereferenceAliases", STRING_SYNTAX);
1740
1741
1742
1743  /**
1744   * A field that holds the number of entries returned for a search operation.
1745   * This field may appear in search result access log messages.
1746   */
1747  @NotNull public static final LogField SEARCH_ENTRIES_RETURNED =
1748       createField("SEARCH_ENTRIES_RETURNED", "entriesReturned",
1749            INTEGER_SYNTAX);
1750
1751
1752
1753  /**
1754   * A field that holds a string representation of the filter for a search
1755   * operation.  This field may appear in access log messages for search
1756   * operations.
1757   */
1758  @NotNull public static final LogField SEARCH_FILTER =
1759       createField("SEARCH_FILTER", "filter", FILTER_SYNTAX);
1760
1761
1762
1763  /**
1764   * A field that indicates whether the search operation was considered indexed.
1765   * This field may appear in search result access log messages.
1766   */
1767  @NotNull public static final LogField SEARCH_INDEXED =
1768       createField("SEARCH_INDEXED", "isIndexed", BOOLEAN_SYNTAX);
1769
1770
1771
1772  /**
1773   * A field whose value is a JSON array containing the names of the attributes
1774   * requested to be included in search result entries.  This field may appear
1775   * in access log messages for search operations.
1776   */
1777  @NotNull public static final LogField SEARCH_REQUESTED_ATTRIBUTES =
1778       createField("SEARCH_REQUESTED_ATTRIBUTES", "requestedAttributes",
1779            STRING_SYNTAX);
1780
1781
1782
1783  /**
1784   * A field that holds the DN for a search result entry.  This field may appear
1785   * in access log messages for search result entries.
1786   */
1787  @NotNull public static final LogField SEARCH_RESULT_ENTRY_DN =
1788       createField("SEARCH_RESULT_ENTRY_DN", "dn", DN_SYNTAX);
1789
1790
1791
1792  /**
1793   * A field whose value is a JSON array containing the names of the attributes
1794   * returned to the client in a search result entry.  This field may appear in
1795   * access log messages for search operations.
1796   */
1797  @NotNull public static final LogField SEARCH_RESULT_ENTRY_ATTRIBUTES =
1798       createField("SEARCH_RESULT_ENTRY_ATTRIBUTES", "attributes",
1799            STRING_SYNTAX);
1800
1801
1802
1803  /**
1804   * A field that holds name of the scope for a search operation.  This field
1805   * may appear in access log messages for search operations.
1806   */
1807  @NotNull public static final LogField SEARCH_SCOPE_NAME =
1808       createField("SEARCH_SCOPE_NAME", "scopeName", STRING_SYNTAX);
1809
1810
1811
1812  /**
1813   * A field that holds the numeric value of the scope for a search operation.
1814   * This field may appear in access log messages for search operations.
1815   */
1816  @NotNull public static final LogField SEARCH_SCOPE_VALUE =
1817       createField("SEARCH_SCOPE_VALUE", "scope", INTEGER_SYNTAX);
1818
1819
1820
1821  /**
1822   * A field that holds the requested size limit for a search operation.  This
1823   * field may appear in access log messages for search operations.
1824   */
1825  @NotNull public static final LogField SEARCH_SIZE_LIMIT =
1826       createField("SEARCH_SIZE_LIMIT", "requestedSizeLimit", INTEGER_SYNTAX);
1827
1828
1829
1830  /**
1831   * A field that holds the requested time limit (in seconds) for a search
1832   * operation.  This field may appear in access log messages for search
1833   * operations.
1834   */
1835  @NotNull public static final LogField SEARCH_TIME_LIMIT_SECONDS = createField(
1836       "SEARCH_TIME_LIMIT_SECONDS", "requestedTimeLimitSeconds",
1837       INTEGER_SYNTAX);
1838
1839
1840
1841  /**
1842   * A field that indicates whether search result entries should only include
1843   * attribute types or both types and values.  This field may appear in access
1844   * log messages for search operations.
1845   */
1846  @NotNull public static final LogField SEARCH_TYPES_ONLY =
1847       createField("SEARCH_TYPES_ONLY", "typesOnly", BOOLEAN_SYNTAX);
1848
1849
1850
1851  /**
1852   * A field that holds information about a set of additional properties
1853   * associated with a security negotiation.  This field may appear in
1854   * SECURITY-NEGOTIATION access log messages.
1855   */
1856  @NotNull public static final LogField SECURITY_NEGOTIATION_PROPERTIES =
1857       createField("SECURITY_NEGOTIATION_PROPERTIES", "negotiationProperties",
1858            JSON_SYNTAX);
1859
1860
1861
1862  /**
1863   * A field contained inside a {@link #SECURITY_NEGOTIATION_PROPERTIES} object
1864   * that holds the name of the property.
1865   */
1866  @NotNull public static final LogField SECURITY_NEGOTIATION_PROPERTIES_NAME =
1867       createField("SECURITY_NEGOTIATION_PROPERTIES_NAME", "name",
1868            STRING_SYNTAX);
1869
1870
1871
1872  /**
1873   * A field contained inside a {@link #SECURITY_NEGOTIATION_PROPERTIES} object
1874   * that holds the value of the property.
1875   */
1876  @NotNull public static final LogField SECURITY_NEGOTIATION_PROPERTIES_VALUE =
1877       createField("SECURITY_NEGOTIATION_PROPERTIES_VALUE", "value",
1878            STRING_SYNTAX);
1879
1880
1881
1882  /**
1883   * A field whose value is a JSON array of objects containing the assurance
1884   * results from each of the servers.  This field may appear in assurance
1885   * completed access log messages.
1886   */
1887  @NotNull public static final LogField SERVER_ASSURANCE_RESULTS = createField(
1888       "SERVER_ASSURANCE_RESULTS", "serverAssuranceResults", JSON_SYNTAX);
1889
1890
1891
1892  /**
1893   * A field (appearing inside the {@link #SERVER_ASSURANCE_RESULTS} JSON
1894   * object) that holds the replica ID for the associated replica.  This field
1895   * may appear in assurance completed access log messages.
1896   */
1897  @NotNull public static final LogField SERVER_ASSURANCE_RESULTS_REPLICA_ID =
1898       createField("SERVER_ASSURANCE_RESULTS_REPLICA_ID", "replicaID",
1899            INTEGER_SYNTAX);
1900
1901
1902
1903  /**
1904   * A field (appearing inside the {@link #SERVER_ASSURANCE_RESULTS} JSON
1905   * object) that holds the replication server ID for the associated replication
1906   * server.  This field may appear in assurance completed access log messages.
1907   */
1908  @NotNull public static final LogField
1909       SERVER_ASSURANCE_RESULTS_REPLICATION_SERVER_ID = createField(
1910            "SERVER_ASSURANCE_RESULTS_REPLICATION_SERVER_ID",
1911            "replicationServerID", INTEGER_SYNTAX);
1912
1913
1914
1915  /**
1916   * A field (appearing inside the {@link #SERVER_ASSURANCE_RESULTS} JSON
1917   * object) that holds the name of the result code for the assurance result.
1918   * This field may appear in assurance completed access log messages.
1919   */
1920  @NotNull public static final LogField
1921       SERVER_ASSURANCE_RESULTS_RESULT_CODE = createField(
1922            "SERVER_ASSURANCE_RESULTS_RESULT_CODE", "resultCode",
1923            STRING_SYNTAX);
1924
1925
1926
1927  /**
1928   * A field whose value is a JSON array containing the external servers
1929   * accessed during the course of processing the operation.  Each server in the
1930   * list will consist of the name or IP address, a colon, and the port number.
1931   * This field may appear in all types of operation result access log messages.
1932   */
1933  @NotNull public static final LogField SERVERS_ACCESSED =
1934       createField("SERVERS_ACCESSED", "serversAccessed", STRING_SYNTAX);
1935
1936
1937
1938  /**
1939   * A field that holds a unique value generated when the server started.  This
1940   * can help differentiate messages with the same connection ID and
1941   * operation ID (if applicable) because those values are reset upon a server
1942   * restart.  This field may appear in all types of access log messages.
1943   */
1944  @NotNull public static final LogField STARTUP_ID =
1945       createField("STARTUP_ID", "startupID", STRING_SYNTAX);
1946
1947
1948
1949  /**
1950   * A field that holds the address of a server to which the operation was
1951   * forwarded for processing.  This field may appear in access log messages for
1952   * operations that were forwarded to a remote system.
1953   */
1954  @NotNull public static final LogField TARGET_HOST =
1955       createField("TARGET_HOST", "targetHost", STRING_SYNTAX);
1956
1957
1958
1959  /**
1960   * A field that holds the port of a server to which the operation was
1961   * forwarded for processing.  This field may appear in access log messages for
1962   * operations that were forwarded to a remote system.
1963   */
1964  @NotNull public static final LogField TARGET_PORT =
1965       createField("TARGET_PORT", "targetPort", INTEGER_SYNTAX);
1966
1967
1968
1969  /**
1970   * A field that holds the protocol used to communicate with a remote server
1971   * for an operation that was forwarded for processing.  This field may appear
1972   * in access log messages for operations that were forwarded to a remote
1973   * system.
1974   */
1975  @NotNull public static final LogField TARGET_PROTOCOL =
1976       createField("TARGET_PROTOCOL", "targetProtocol", STRING_SYNTAX);
1977
1978
1979
1980  /**
1981   * A field that holds a numeric identifier for the thread that generated the
1982   * log message, which is also likely the thread that performed the associated
1983   * processing for the connection or operation).  This field may appear in all
1984   * types of access log messages.
1985   */
1986  @NotNull public static final LogField THREAD_ID =
1987       createField("THREAD_ID", "threadID", INTEGER_SYNTAX);
1988
1989
1990
1991  /**
1992   * A field that holds the timestamp for the access log message.  This field
1993   * may appear in all types of access log messages.
1994   */
1995  @NotNull public static final LogField TIMESTAMP =
1996       createField("TIMESTAMP", "timestamp", RFC_3339_TIMESTAMP_SYNTAX);
1997
1998
1999
2000  /**
2001   * A field that holds the connection ID for another operation that triggered
2002   * the associated operation.  This field may appear in all types of access log
2003   * messages that are associated with operations.
2004   */
2005  @NotNull public static final LogField TRIGGERED_BY_CONNECTION_ID =
2006       createField("TRIGGERED_BY_CONNECTION_ID", "triggeredByConnectionID",
2007            INTEGER_SYNTAX);
2008
2009
2010
2011  /**
2012   * A field that holds the operation ID for another operation that triggered
2013   * the associated operation.  This field may appear in all types of access log
2014   * messages that are associated with operations.
2015   */
2016  @NotNull public static final LogField TRIGGERED_BY_OPERATION_ID =
2017       createField("TRIGGERED_BY_OPERATION_ID", "triggeredByOperationID",
2018            INTEGER_SYNTAX);
2019
2020
2021
2022  /**
2023   * A field that indicates whether the server accessed any uncached data in the
2024   * course of processing the operation.  This field may appear in all types of
2025   * operation results access log messages.
2026   */
2027  @NotNull public static final LogField UNCACHED_DATA_ACCESSED =
2028       createField("UNCACHED_DATA_ACCESSED", "uncachedDataAccessed",
2029            BOOLEAN_SYNTAX);
2030
2031
2032
2033  /**
2034   * A field whose value is a JSON array containing the names of any privileges
2035   * used in the course of processing the operation.  This field may appear in
2036   * all types of operation result access log messages.
2037   */
2038  @NotNull public static final LogField USED_PRIVILEGES =
2039       createField("USED_PRIVILEGES", "usedPrivileges", STRING_SYNTAX);
2040
2041
2042
2043  /**
2044   * A field that indicates whether the associated operation is being processed
2045   * using a worker thread from a thread pool dedicated to processing
2046   * administrative operations.  This field may appear in all types of
2047   * access log messages that are associated with operations.
2048   */
2049  @NotNull public static final LogField USING_ADMIN_SESSION_WORKER_THREAD =
2050       createField("USING_ADMIN_SESSION_WORKER_THREAD",
2051            "usingAdminSessionWorkerThread", BOOLEAN_SYNTAX);
2052
2053
2054
2055  /**
2056   * A field that holds the length of time (in milliseconds) that the operation
2057   * had to wait in the work queue before being picked up for processing.  This
2058   * field may appear in all types of operation result access log messages.
2059   */
2060  @NotNull public static final LogField WORK_QUEUE_WAIT_TIME_MILLIS =
2061       createField("WORK_QUEUE_WAIT_TIME_MILLIS", "workQueueWaitTimeMillis",
2062            INTEGER_SYNTAX);
2063
2064
2065
2066  /**
2067   * Prevents this utility class from being instantiated.
2068   */
2069  private JSONFormattedAccessLogFields()
2070  {
2071    // No implementation is required.
2072  }
2073
2074
2075
2076  /**
2077   * Creates a new log field with the provided name and syntax and registers it
2078   * in the {@link #DEFINED_FIELDS} map.
2079   *
2080   * @param  constantName  The name for the constant in which the field is
2081   *                       defined.  It must not be {@code null} or empty.
2082   * @param  fieldName     The name for the field as it appears in log messages.
2083   *                       It must not be {@code null} or empty.
2084   * @param  fieldSyntax   The expected syntax for the field.  It must not be
2085   *                       {@code null} or empty.
2086   *
2087   * @return  The log field that was created.
2088   */
2089  @NotNull()
2090  private static LogField createField(@NotNull final String constantName,
2091               @NotNull final String fieldName,
2092               @NotNull final LogFieldSyntax<?> fieldSyntax)
2093  {
2094    final LogField field = new LogField(fieldName, constantName, fieldSyntax);
2095    DEFINED_FIELDS.put(constantName, field);
2096    return field;
2097  }
2098
2099
2100
2101  /**
2102   * Retrieves a map of all predefined fields, indexed by the name of the
2103   * constant in which the field is defined.
2104   *
2105   * @return  A map of all predefined fields.
2106   */
2107  @NotNull()
2108  public static Map<String,LogField> getDefinedFields()
2109  {
2110    Map<String,LogField> m = READ_ONLY_DEFINED_FIELDS_REF.get();
2111    if (m != null)
2112    {
2113      return m;
2114    }
2115
2116    m = Collections.unmodifiableMap(new TreeMap<>(DEFINED_FIELDS));
2117    if (READ_ONLY_DEFINED_FIELDS_REF.compareAndSet(null, m))
2118    {
2119      return m;
2120    }
2121    else
2122    {
2123      return READ_ONLY_DEFINED_FIELDS_REF.get();
2124    }
2125  }
2126
2127
2128
2129  /**
2130   * Retrieves the predefined log field instance that is defined in the
2131   * specified constants.
2132   *
2133   * @param  constantName  The name of the constant in which the desired field
2134   *                       is defined.  It must not be {@code null}.
2135   *
2136   * @return  The log field instance defined in the specified constant, or
2137   *          {@code null} if there is no such constant.
2138   */
2139  @Nullable()
2140  public static LogField getFieldForConstantName(
2141              @NotNull final String constantName)
2142  {
2143    final String convertedName =
2144         StaticUtils.toUpperCase(constantName).replace('-', '_');
2145    return DEFINED_FIELDS.get(convertedName);
2146  }
2147}