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

Commit

Permalink
Fix JWT secret file path (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayitbeegh authored Sep 12, 2019
1 parent 305638e commit 567f51b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

group=com.nike
artifactId=cerberus-lifecycle-cli
version=4.11.0
version=4.11.1
2 changes: 1 addition & 1 deletion src/main/java/com/nike/cerberus/ConfigConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class ConfigConstants {
public static final String CERT_PART_PUBKEY = "pubkey.pem";
public static final String CERT_ACME_ACCOUNT_PRIVATE_KEY = "certificates/acme/account-private-key-pkcs1.pem";
public static final String CMS_ENV_CONFIG_PATH = "cms/environment.properties";
public static final String JWT_SECRETS_PATH = "jwt-secrets.json";
public static final String CMS_JWT_SECRETS_PATH = "cms/jwt-secrets.json";
public static final String VERSION_PROPERTY = "cli.version";
public static final String CMS_ADMIN_GROUP_KEY = "cms.admin.group";
public static final String ROOT_USER_ARN_KEY = "root.user.arn";
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/nike/cerberus/store/ConfigStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public Optional<KeyPair> getAcmeAccountKeyPair() {
* @param activationDelayInSecond Delay in second before the secret can be used to sign JWT
*/
public void addJwtKey(long activationDelayInSecond) {
Optional<String> jwtKeysFile = storeServiceMap.get(configRegion).get(JWT_SECRETS_PATH);
Optional<String> jwtKeysFile = storeServiceMap.get(configRegion).get(CMS_JWT_SECRETS_PATH);
JwtSecretData jwtSecretData;
if (jwtKeysFile.isPresent()) {
try {
Expand Down Expand Up @@ -629,7 +629,7 @@ private void saveJwtSecretData(JwtSecretData jwtSecretData) {
EnvironmentData environmentData = getDecryptedEnvironmentData();
try {
String serializedPlainTextEnvironmentData = configObjectMapper.writeValueAsString(jwtSecretData);
encryptAndSaveObject(JWT_SECRETS_PATH, serializedPlainTextEnvironmentData, environmentData);
encryptAndSaveObject(CMS_JWT_SECRETS_PATH, serializedPlainTextEnvironmentData, environmentData);
} catch (JsonProcessingException e) {
throw new RuntimeException("Unable to convert JWT secret data to JSON. Aborting save...", e);
}
Expand Down

0 comments on commit 567f51b

Please sign in to comment.