File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 */
2323public final class KmsHelper {
2424
25- private static final String DEFAULT_LOCALSTACK_ENDPOINT = "http://localhost :5001" ;
25+ private static final String LOCALSTACK_ENDPOINT = "http://localstack :5001" ;
2626 private static final String KMS_KEY_ID = "ff275b92-0def-4dfc-b0f6-87c96b26c6c7" ;
2727 private static final Region REGION = Region .US_EAST_1 ;
2828
2929 private KmsHelper () {
3030 }
3131
32- private static String getLocalstackEndpoint () {
33- String endpoint = EnvUtil .getEnv (Const .Config .Core .LOCALSTACK_URL , false );
34- return (endpoint != null && !endpoint .isBlank ()) ? endpoint : DEFAULT_LOCALSTACK_ENDPOINT ;
35- }
36-
3732 /**
3833 * Fetches the public key from LocalStack KMS for the configured key ID.
3934 *
@@ -81,9 +76,8 @@ public static PublicKey getPublicKeyObjectFromLocalstack() throws Exception {
8176 }
8277
8378 private static KmsClient createLocalstackKmsClient () {
84- String endpoint = getLocalstackEndpoint ();
8579 return KmsClient .builder ()
86- .endpointOverride (URI .create (endpoint ))
80+ .endpointOverride (URI .create (LOCALSTACK_ENDPOINT ))
8781 .region (REGION )
8882 .credentialsProvider (StaticCredentialsProvider .create (
8983 AwsBasicCredentials .create ("test" , "test" )))
You can’t perform that action at this time.
0 commit comments