@@ -198,7 +198,7 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
198198 private static final String SANITIZATION_REGEX = "[\n \r ]" ;
199199
200200 private static boolean encodeApiResponse = false ;
201- private boolean isEnforcePostRequestsAndTimestamps = false ;
201+ private boolean isPostRequestsAndTimestampsEnforced = false ;
202202
203203 /**
204204 * Non-printable ASCII characters - numbers 0 to 31 and 127 decimal
@@ -282,9 +282,9 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
282282 , ConfigKey .Scope .Global );
283283 static final ConfigKey <Boolean > EnforcePostRequestsAndTimestamps = new ConfigKey <>(ConfigKey .CATEGORY_ADVANCED
284284 , Boolean .class
285- , "enable. enforce.post.requests.and.timestamps"
285+ , "enforce.post.requests.and.timestamps"
286286 , "false"
287- , "enables/disables whether the ApiServer only accepts state-changing POST requests and requests with timestamps."
287+ , "Enable/Disable whether the ApiServer should only accept POST requests for state-changing APIs and requests with timestamps."
288288 , false
289289 , ConfigKey .Scope .Global );
290290 private static final ConfigKey <String > JSONDefaultContentType = new ConfigKey <> (ConfigKey .CATEGORY_ADVANCED
@@ -444,7 +444,7 @@ protected void setupIntegrationPortListener(Integer apiPort) {
444444 public boolean start () {
445445 Security .addProvider (new BouncyCastleProvider ());
446446 Integer apiPort = IntegrationAPIPort .value (); // api port, null by default
447- isEnforcePostRequestsAndTimestamps = EnforcePostRequestsAndTimestamps .value ();
447+ isPostRequestsAndTimestampsEnforced = EnforcePostRequestsAndTimestamps .value ();
448448
449449 final Long snapshotLimit = ConcurrentSnapshotsThresholdPerHost .value ();
450450 if (snapshotLimit == null || snapshotLimit <= 0 ) {
@@ -726,8 +726,8 @@ public String handleRequest(final Map params, final String responseType, final S
726726 }
727727
728728 @ Override
729- public boolean isEnforcePostRequestsAndTimestamps () {
730- return isEnforcePostRequestsAndTimestamps ;
729+ public boolean isPostRequestsAndTimestampsEnforced () {
730+ return isPostRequestsAndTimestampsEnforced ;
731731 }
732732
733733 private String getBaseAsyncResponse (final long jobId , final BaseAsyncCmd cmd ) {
@@ -1029,13 +1029,13 @@ public boolean verifyRequest(final Map<String, Object[]> requestParameters, fina
10291029 apiKey = apiKey .replaceAll (SANITIZATION_REGEX , "_" );
10301030 logger .debug ("Request expired -- ignoring ...sig [{}], apiKey [{}]." , signature , apiKey );
10311031 return false ;
1032- } else if (isEnforcePostRequestsAndTimestamps && expiresTS .after (thresholdTime )) {
1032+ } else if (isPostRequestsAndTimestampsEnforced && expiresTS .after (thresholdTime )) {
10331033 signature = signature .replaceAll (SANITIZATION_REGEX , "_" );
10341034 apiKey = apiKey .replaceAll (SANITIZATION_REGEX , "_" );
10351035 logger .debug (String .format ("Expiration parameter is set for too long -- ignoring ...sig [%s], apiKey [%s]." , signature , apiKey ));
10361036 return false ;
10371037 }
1038- } else if (isEnforcePostRequestsAndTimestamps ) {
1038+ } else if (isPostRequestsAndTimestampsEnforced ) {
10391039 // Force expiration parameter
10401040 logger .debug ("Signature Version must be 3, and should be along with the Expires parameter -- ignoring request." );
10411041 return false ;
0 commit comments