My spring boot maven application connects to the schema registry in order to download the schema files as below
pom.xml
<plugin>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-maven-plugin</artifactId>
<version>${confluent.version}</version>
<configuration>
<schemaRegistryUrls>
<param>${schemaRegistryUrl}</param>
</schemaRegistryUrls>
<userInfoConfig>dummyid:dummyPassword</userInfoConfig>
<subjects>
<transactions-value>src/main/resources/avro/io/confluent/examples/clients/basicavro/Payment2a.avsc</transactions-value>
</subjects>
</configuration>
<goals>
<goal>test-compatibility</goal>
</goals>
</plugin>
I would like my <userInfoConfig>dummyid:dummyPassword</userInfoConfig>
to be encrypted.
I understand that maven allows encrypting the passwords and storing them in settings.xml (ref: https://dev.to/scottshipp/how-to-encrypt-your-maven-password-408d)
However, unlike the sql-maven-plugin
example below, the kafka-schema-registry-maven-plugin
doesn't seem to allow <settingsKey></settingsKey>
parameter to read the encrypted password from servers settings.xml
settings.xml
<settings>
...
<servers>
...
<server>
<id>test.server</id>
<username><!-- your database username --></username>
<password><!-- the encrypted password --></password>
</server>
...
</servers>
...
</settings>
pom.xml
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<version>3.0.0-SNAPSHOT</version> <!-- 3.0.0-SNAPSHOT required -->
<configuration>
<settingsKey>test.server</settingsKey> <!-- id of server here -->
<driver>oracle.jdbc.driver.OracleDriver</driver>
<url>jdbc:oracle:thin:@ip.com:1521:SID</url>
<!-- username and password are not mentioned anymore -->
</configuration>
</plugin>
Any thoughts on how this can be approached?