Rename sandbox to staging environment

To match the upstream name
This commit is contained in:
AsamK 2022-01-05 23:41:17 +01:00
parent 8a5f98dac6
commit 3587d1c397
7 changed files with 21 additions and 10 deletions

View file

@ -74,10 +74,10 @@ public class ServiceConfig {
LiveConfig.getUnidentifiedSenderTrustRoot(), LiveConfig.getUnidentifiedSenderTrustRoot(),
LiveConfig.createKeyBackupConfig(), LiveConfig.createKeyBackupConfig(),
LiveConfig.getCdsMrenclave()); LiveConfig.getCdsMrenclave());
case SANDBOX -> new ServiceEnvironmentConfig(SandboxConfig.createDefaultServiceConfiguration(interceptors), case STAGING -> new ServiceEnvironmentConfig(StagingConfig.createDefaultServiceConfiguration(interceptors),
SandboxConfig.getUnidentifiedSenderTrustRoot(), StagingConfig.getUnidentifiedSenderTrustRoot(),
SandboxConfig.createKeyBackupConfig(), StagingConfig.createKeyBackupConfig(),
SandboxConfig.getCdsMrenclave()); StagingConfig.getCdsMrenclave());
}; };
} }
} }

View file

@ -2,5 +2,5 @@ package org.asamk.signal.manager.config;
public enum ServiceEnvironment { public enum ServiceEnvironment {
LIVE, LIVE,
SANDBOX, STAGING,
} }

View file

@ -22,7 +22,7 @@ import java.util.Map;
import okhttp3.Dns; import okhttp3.Dns;
import okhttp3.Interceptor; import okhttp3.Interceptor;
class SandboxConfig { class StagingConfig {
private final static byte[] UNIDENTIFIED_SENDER_TRUST_ROOT = Base64.getDecoder() private final static byte[] UNIDENTIFIED_SENDER_TRUST_ROOT = Base64.getDecoder()
.decode("BbqY1DzohE4NUZoVF+L18oUPrK3kILllLEJh2UnPSsEx"); .decode("BbqY1DzohE4NUZoVF+L18oUPrK3kILllLEJh2UnPSsEx");
@ -83,6 +83,6 @@ class SandboxConfig {
return CDS_MRENCLAVE; return CDS_MRENCLAVE;
} }
private SandboxConfig() { private StagingConfig() {
} }
} }

View file

@ -50,6 +50,11 @@ This flag must not be given for the `link` command.
It is optional for the `daemon` command. It is optional for the `daemon` command.
For all other commands it is only optional if there is exactly one local user in the config directory. For all other commands it is only optional if there is exactly one local user in the config directory.
*--service-environment* ENVIRONMENT
Choose the server environment to use:
- `live` (default)
- `staging`
*--dbus*:: *--dbus*::
Make request via user dbus. Make request via user dbus.

View file

@ -30,7 +30,7 @@ fi
run() { run() {
set -x set -x
"$SIGNAL_CLI" --service-environment="sandbox" $@ "$SIGNAL_CLI" --service-environment="staging" $@
set +x set +x
} }

View file

@ -155,7 +155,7 @@ public class App {
final var serviceEnvironmentCli = ns.<ServiceEnvironmentCli>get("service-environment"); final var serviceEnvironmentCli = ns.<ServiceEnvironmentCli>get("service-environment");
final var serviceEnvironment = serviceEnvironmentCli == ServiceEnvironmentCli.LIVE final var serviceEnvironment = serviceEnvironmentCli == ServiceEnvironmentCli.LIVE
? ServiceEnvironment.LIVE ? ServiceEnvironment.LIVE
: ServiceEnvironment.SANDBOX; : ServiceEnvironment.STAGING;
final var trustNewIdentityCli = ns.<TrustNewIdentityCli>get("trust-new-identities"); final var trustNewIdentityCli = ns.<TrustNewIdentityCli>get("trust-new-identities");
final var trustNewIdentity = trustNewIdentityCli == TrustNewIdentityCli.ON_FIRST_USE final var trustNewIdentity = trustNewIdentityCli == TrustNewIdentityCli.ON_FIRST_USE

View file

@ -7,7 +7,13 @@ public enum ServiceEnvironmentCli {
return "live"; return "live";
} }
}, },
SANDBOX { STAGING {
@Override
public String toString() {
return "staging";
}
},
@Deprecated SANDBOX {
@Override @Override
public String toString() { public String toString() {
return "sandbox"; return "sandbox";