-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ANCHOR-801] Add Kafka SASL-SSL authentication support (#1498)
### Description - Support Kafka SASL-SSL authentication - Add `docker-compose-kafka-sasl-ssl.yaml.yaml` to run Kafka in SASL_SSL mode for testing. ### Context - Answer the requests to support SASL-SSL ### Testing - `./gradlew test` ### Documentation N/A ### Known limitations N/A
- Loading branch information
Showing
25 changed files
with
318 additions
and
42 deletions.
There are no files selected for viewing
11 changes: 10 additions & 1 deletion
11
.run/Docker - Run Dev Stack - Kafka, Postgres, SEP24 Reference UI.run.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Test Profile: kafka-sasl-ssl" type="JetRunConfigurationType" folderName="Run Test Profile"> | ||
<envs> | ||
<env name="app.enableTest" value="true" /> | ||
<env name="KT_REFERENCE_SERVER_CONFIG" value="service-runner/src/main/resources/config/reference-config.yaml" /> | ||
<env name="TEST_PROFILE_NAME" value="kafka-sasl-ssl" /> | ||
</envs> | ||
<option name="MAIN_CLASS_NAME" value="org.stellar.anchor.platform.run_profiles.RunTestProfile" /> | ||
<module name="java-stellar-anchor-sdk.service-runner.main" /> | ||
<shortenClasspath name="ARGS_FILE" /> | ||
<extension name="net.ashald.envfile"> | ||
<option name="IS_ENABLED" value="false" /> | ||
<option name="IS_SUBST" value="false" /> | ||
<option name="IS_PATH_MACRO_SUPPORTED" value="false" /> | ||
<option name="IS_IGNORE_MISSING_FILES" value="false" /> | ||
<option name="IS_ENABLE_EXPERIMENTAL_INTEGRATIONS" value="false" /> | ||
<ENTRIES> | ||
<ENTRY IS_ENABLED="true" PARSER="runconfig" IS_EXECUTABLE="false" /> | ||
</ENTRIES> | ||
</extension> | ||
<method v="2"> | ||
<option name="Make" enabled="true" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
platform/src/main/java/org/stellar/anchor/platform/utils/ResourceHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.stellar.anchor.platform.utils; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import org.springframework.core.io.DefaultResourceLoader; | ||
import org.springframework.core.io.Resource; | ||
import org.springframework.core.io.ResourceLoader; | ||
|
||
public class ResourceHelper { | ||
static final ResourceLoader resourceLoader = new DefaultResourceLoader(); | ||
|
||
public static Resource resource(String resource) { | ||
return resourceLoader.getResource(resource); | ||
} | ||
|
||
public static File findResourceFile(Resource resource) throws IOException { | ||
if (resource.exists()) { | ||
return resource.getFile(); | ||
} | ||
throw new IOException("Resource not found: " + resource.getFilename()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.