Use/create new header for Partition service call instead modifying existing headers
Currently, for partition service call from storage, the existing header(AUTHORIZATION) is modified with newly generated partition user token, like
this.headers.put(DpsHeaders.AUTHORIZATION, this.tokenService.getIdToken(this.headers.getPartitionId()));
and this impact on a subsequent service call as AUTHORIZATION header got modified in partition service call mentioned above in code snippet
Proposed changes: During partition service call new headers should be generated instead of modifying existing headers.
Map<String,String> partitionHeadersMap = new HashMap<>();
partitionHeadersMap.put(DpsHeaders.CONTENT_TYPE,headers.getContentType());
partitionHeadersMap.put(DpsHeaders.CORRELATION_ID, headers.getCorrelationId());
partitionHeadersMap.put(DpsHeaders.AUTHORIZATION, this.tokenService.getIdToken(this.headers.getPartitionId()));
DpsHeaders partitionHeaders = DpsHeaders.createFromMap(partitionHeadersMap);
IPartitionProvider serviceClient = this.factory.create(partitionHeaders);