Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
* Highlander doesn't require token refresh at SDB creation etc. Howev… (
Browse files Browse the repository at this point in the history
#168)

* Highlander doesn't require token refresh at SDB creation etc. However it still sends the X-refresh-token=true header and some client that depend on Vault client (Go client) still acknowledge the header and refresh the token. This behavior cause inconvenience when a user is logged into dashboard at the same time.
  • Loading branch information
mayitbeegh authored Jun 27, 2018
1 parent ec860c8 commit ffb442e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
# limitations under the License.
#

version=3.18.0
version=3.18.1
groupId=com.nike.cerberus
artifactId=cms
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private ResponseInfo<Map<String, String>> createSafeDepositBox(final RequestInfo
return ResponseInfo.newBuilder(map)
.withHeaders(new DefaultHttpHeaders()
.set(LOCATION, location)
.set(HEADER_X_REFRESH_TOKEN, Boolean.TRUE.toString()))
.set(HEADER_X_REFRESH_TOKEN, Boolean.FALSE.toString()))
.withHttpStatusCode(HttpResponseStatus.CREATED.code())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private ResponseInfo<SafeDepositBoxV2> createSafeDepositBox(final RequestInfo<Sa
return ResponseInfo.newBuilder(safeDepositBox)
.withHeaders(new DefaultHttpHeaders()
.set(LOCATION, location)
.set(HEADER_X_REFRESH_TOKEN, Boolean.TRUE.toString()))
.set(HEADER_X_REFRESH_TOKEN, Boolean.FALSE.toString()))
.withHttpStatusCode(HttpResponseStatus.CREATED.code())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private ResponseInfo<Void> deleteSafeDepositBox(final RequestInfo<Void> request)

safeDepositBoxService.deleteSafeDepositBox(authPrincipal, sdbId);
return ResponseInfo.<Void>newBuilder().withHttpStatusCode(HttpResponseStatus.OK.code())
.withHeaders(new DefaultHttpHeaders().set(HEADER_X_REFRESH_TOKEN, Boolean.TRUE.toString()))
.withHeaders(new DefaultHttpHeaders().set(HEADER_X_REFRESH_TOKEN, Boolean.FALSE.toString()))
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private ResponseInfo<Void> updateSafeDepositBox(final RequestInfo<SafeDepositBox
authPrincipal,
sdbId);
return ResponseInfo.<Void>newBuilder().withHttpStatusCode(HttpResponseStatus.NO_CONTENT.code())
.withHeaders(new DefaultHttpHeaders().set(HEADER_X_REFRESH_TOKEN, Boolean.TRUE.toString()))
.withHeaders(new DefaultHttpHeaders().set(HEADER_X_REFRESH_TOKEN, Boolean.FALSE.toString()))
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private ResponseInfo<SafeDepositBoxV2> updateSafeDepositBox(final RequestInfo<Sa
authPrincipal,
request.getPathParam("id"));
return ResponseInfo.newBuilder(safeDepositBoxV2)
.withHeaders(new DefaultHttpHeaders().set(HEADER_X_REFRESH_TOKEN, Boolean.TRUE.toString()))
.withHeaders(new DefaultHttpHeaders().set(HEADER_X_REFRESH_TOKEN, Boolean.FALSE.toString()))
.withHttpStatusCode(HttpResponseStatus.OK.code())
.build();
}
Expand Down

0 comments on commit ffb442e

Please sign in to comment.