@@ -201,7 +201,7 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
201201 private static final String SANITIZATION_REGEX = "[\n \r ]" ;
202202
203203 private static boolean encodeApiResponse = false ;
204- private boolean isEnforcePostRequestsAndTimestamps = false ;
204+ private boolean isPostRequestsAndTimestampsEnforced = false ;
205205
206206 /**
207207 * Non-printable ASCII characters - numbers 0 to 31 and 127 decimal
@@ -287,9 +287,9 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
287287 , ConfigKey .Scope .Global );
288288 static final ConfigKey <Boolean > EnforcePostRequestsAndTimestamps = new ConfigKey <>(ConfigKey .CATEGORY_ADVANCED
289289 , Boolean .class
290- , "enable. enforce.post.requests.and.timestamps"
290+ , "enforce.post.requests.and.timestamps"
291291 , "false"
292- , "enables/disables whether the ApiServer only accepts state-changing POST requests and requests with timestamps."
292+ , "Enable/Disable whether the ApiServer should only accept POST requests for state-changing APIs and requests with timestamps."
293293 , false
294294 , ConfigKey .Scope .Global );
295295 private static final ConfigKey <String > JSONDefaultContentType = new ConfigKey <> (ConfigKey .CATEGORY_ADVANCED
@@ -449,7 +449,7 @@ protected void setupIntegrationPortListener(Integer apiPort) {
449449 public boolean start () {
450450 Security .addProvider (new BouncyCastleProvider ());
451451 Integer apiPort = IntegrationAPIPort .value (); // api port, null by default
452- isEnforcePostRequestsAndTimestamps = EnforcePostRequestsAndTimestamps .value ();
452+ isPostRequestsAndTimestampsEnforced = EnforcePostRequestsAndTimestamps .value ();
453453
454454 final Long snapshotLimit = ConcurrentSnapshotsThresholdPerHost .value ();
455455 if (snapshotLimit == null || snapshotLimit <= 0 ) {
@@ -730,8 +730,8 @@ public String handleRequest(final Map params, final String responseType, final S
730730 }
731731
732732 @ Override
733- public boolean isEnforcePostRequestsAndTimestamps () {
734- return isEnforcePostRequestsAndTimestamps ;
733+ public boolean isPostRequestsAndTimestampsEnforced () {
734+ return isPostRequestsAndTimestampsEnforced ;
735735 }
736736
737737 private String getBaseAsyncResponse (final long jobId , final BaseAsyncCmd cmd ) {
@@ -1038,13 +1038,13 @@ public boolean verifyRequest(final Map<String, Object[]> requestParameters, fina
10381038 apiKey = apiKey .replaceAll (SANITIZATION_REGEX , "_" );
10391039 logger .debug ("Request expired -- ignoring ...sig [{}], apiKey [{}]." , signature , apiKey );
10401040 return false ;
1041- } else if (isEnforcePostRequestsAndTimestamps && expiresTS .after (thresholdTime )) {
1041+ } else if (isPostRequestsAndTimestampsEnforced && expiresTS .after (thresholdTime )) {
10421042 signature = signature .replaceAll (SANITIZATION_REGEX , "_" );
10431043 apiKey = apiKey .replaceAll (SANITIZATION_REGEX , "_" );
10441044 logger .debug (String .format ("Expiration parameter is set for too long -- ignoring ...sig [%s], apiKey [%s]." , signature , apiKey ));
10451045 return false ;
10461046 }
1047- } else if (isEnforcePostRequestsAndTimestamps ) {
1047+ } else if (isPostRequestsAndTimestampsEnforced ) {
10481048 // Force expiration parameter
10491049 logger .debug ("Signature Version must be 3, and should be along with the Expires parameter -- ignoring request." );
10501050 return false ;
0 commit comments