Skip to content

Package: EncryptionMigrationSettingKeys

EncryptionMigrationSettingKeys

nameinstructionbranchcomplexitylinemethod
EncryptionMigrationSettingKeys(String, int, String)
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
key()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 48 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.extras.migrator.encryption.settings;
14:
15: import org.eclipse.kapua.commons.setting.SettingKey;
16: import org.eclipse.kapua.extras.migrator.encryption.authentication.MfaOptionMigrator;
17: import org.eclipse.kapua.service.authentication.credential.mfa.MfaOption;
18:
19: /**
20: * {@link SettingKey}s for {@link EncryptionMigrationSettings}.
21: *
22: * @since 2.0.0
23: */
24: public enum EncryptionMigrationSettingKeys implements SettingKey {
25:
26: /**
27: * Whether running in dry run mode ot not.
28: *
29: * @since 2.0.0
30: */
31: DRY_RUN("migrator.encryption.dryRun"),
32:
33: /**
34: * The old encryption key.
35: *
36: * @since 2.0.0
37: */
38: OLD_ENCRYPTION_KEY("migrator.encryption.key.old"),
39:
40: /**
41: * The old encryption key used in the {@link MfaOption#getMfaSecretKey()} encryption.
42: * <p>
43: * See {@link MfaOptionMigrator#getMfaSecretKey()}
44: *
45: * @since 2.0.0
46: */
47: MFA_OLD_ENCRYPTION_KEY("migrator.encryption.key.mfa"),
48:
49: /**
50: * The old encryption key.
51: *
52: * @since 2.0.0
53: */
54: NEW_ENCRYPTION_KEY("migrator.encryption.key.new");
55:
56: /**
57: * The key value of the {@link SettingKey}.
58: *
59: * @since 2.0.0
60: */
61: private final String key;
62:
63: /**
64: * Constructor.
65: *
66: * @param key The key value of the {@link SettingKey}.
67: * @since 2.0.0
68: */
69: EncryptionMigrationSettingKeys(String key) {
70: this.key = key;
71: }
72:
73: @Override
74: public String key() {
75: return key;
76: }
77: }