Skip to content

Commit c335c06

Browse files
Increase RSA key length for JWT Token
The example TokenCreator used a too small RSA key size for the JWT token. The key length was increased according to the NIST recommendation.
1 parent 142c70d commit c335c06

File tree

1 file changed

+1
-1
lines changed
  • cf-java-logging-support-servlet/src/main/java/com/sap/hcp/cf/logging/servlet/dynlog

1 file changed

+1
-1
lines changed

cf-java-logging-support-servlet/src/main/java/com/sap/hcp/cf/logging/servlet/dynlog/TokenCreator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static void main(String[] args) throws NoSuchAlgorithmException, NoSuchPr
6262

6363
else {
6464
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
65-
keyGen.initialize(512);
65+
keyGen.initialize(2048);
6666
keyPair = keyGen.generateKeyPair();
6767
// keyPair = KeyPairGenerator.getInstance("RSA").generateKeyPair();
6868
}

0 commit comments

Comments
 (0)