Bug P2
Status Update
Comments
ap...@google.com <ap...@google.com> #3
Project: plugins/replication
Branch: master
commit d1ad7d504171c8f68d2cf956bb3422fa84a8194f
Author: Luca Milanesio <luca.milanesio@gmail.com>
Date: Thu Jun 13 17:56:43 2024
Use SecureStore to access replication credentials
Gerrit introduced the SecureStore in Ibbb15ad2aa over 10 years
ago, however, the replication plugin was never adapted and then
unable to access the remote endpoint credentials when Gerrit
has a custom secure provider installed that would provide
data encryption at rest.
Replace the direct reading of the secure.config with the abstract
implementation of the Gerrit SecureStore, so that it can still
be working as expected with encrypted credentials.
Existing installations may have used a mix of encrypted and clear text
credentials in secure.config, leveraging the replication plugin bug
that was not accessing it using the correct API. Introduce a legacy
feature flag 'gerrit.useLegacyCredentials' that allow the Gerrit
admin to still use the legacy mode.
Whenever the replication plugin detects the legacy mode, it displays
a warning explaining what is happening and how to adjust the
configuration and enable full encryption in secure.config.
Release-Notes: Use SecureStore for reading username/password credentials
Bug: Issue 320715545
Change-Id: Ie5b6339d65d144536416cf070d52f11342b39fe6
M src/main/java/com/googlesource/gerrit/plugins/replication/AutoReloadConfigDecorator.java
M src/main/java/com/googlesource/gerrit/plugins/replication/AutoReloadSecureCredentialsFactoryDecorator.java
A src/main/java/com/googlesource/gerrit/plugins/replication/LegacyCredentialsFactory.java
M src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationConfigImpl.java
M src/main/java/com/googlesource/gerrit/plugins/replication/SecureCredentialsFactory.java
M src/main/java/com/googlesource/gerrit/plugins/replication/api/ReplicationConfig.java
M src/main/resources/Documentation/config.md
M src/test/java/com/googlesource/gerrit/plugins/replication/AbstractConfigTest.java
A src/test/java/com/googlesource/gerrit/plugins/replication/AutoReloadSecureCredentialsFactoryDecoratorTest.java
https://gerrit-review.googlesource.com/429897
Branch: master
commit d1ad7d504171c8f68d2cf956bb3422fa84a8194f
Author: Luca Milanesio <luca.milanesio@gmail.com>
Date: Thu Jun 13 17:56:43 2024
Use SecureStore to access replication credentials
Gerrit introduced the SecureStore in Ibbb15ad2aa over 10 years
ago, however, the replication plugin was never adapted and then
unable to access the remote endpoint credentials when Gerrit
has a custom secure provider installed that would provide
data encryption at rest.
Replace the direct reading of the secure.config with the abstract
implementation of the Gerrit SecureStore, so that it can still
be working as expected with encrypted credentials.
Existing installations may have used a mix of encrypted and clear text
credentials in secure.config, leveraging the replication plugin bug
that was not accessing it using the correct API. Introduce a legacy
feature flag 'gerrit.useLegacyCredentials' that allow the Gerrit
admin to still use the legacy mode.
Whenever the replication plugin detects the legacy mode, it displays
a warning explaining what is happening and how to adjust the
configuration and enable full encryption in secure.config.
Release-Notes: Use SecureStore for reading username/password credentials
Bug:
Change-Id: Ie5b6339d65d144536416cf070d52f11342b39fe6
M src/main/java/com/googlesource/gerrit/plugins/replication/AutoReloadConfigDecorator.java
M src/main/java/com/googlesource/gerrit/plugins/replication/AutoReloadSecureCredentialsFactoryDecorator.java
A src/main/java/com/googlesource/gerrit/plugins/replication/LegacyCredentialsFactory.java
M src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationConfigImpl.java
M src/main/java/com/googlesource/gerrit/plugins/replication/SecureCredentialsFactory.java
M src/main/java/com/googlesource/gerrit/plugins/replication/api/ReplicationConfig.java
M src/main/resources/Documentation/config.md
M src/test/java/com/googlesource/gerrit/plugins/replication/AbstractConfigTest.java
A src/test/java/com/googlesource/gerrit/plugins/replication/AutoReloadSecureCredentialsFactoryDecoratorTest.java
Description
Currently the information on the secure config is being read without encryption and there should be support for it being encrypted