Skip to content

Commit 7645558

Browse files
committed
refactor initialization of setting for user attribute serialization to SecuritySetting
Signed-off-by: Mark Boyd <[email protected]>
1 parent 44ffe8c commit 7645558

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/main/java/org/opensearch/security/OpenSearchSecurityPlugin.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,14 +2267,7 @@ public List<Setting<?>> getSettings() {
22672267
)
22682268
);
22692269

2270-
settings.add(
2271-
Setting.boolSetting(
2272-
ConfigConstants.USER_ATTRIBUTE_SERIALIZATION_ENABLED,
2273-
ConfigConstants.USER_ATTRIBUTE_SERIALIZATION_ENABLED_DEFAULT,
2274-
Property.NodeScope,
2275-
Property.Dynamic
2276-
)
2277-
);
2270+
settings.add(SecuritySettings.USER_ATTRIBUTE_SERIALIZATION_ENABLED_SETTING);
22782271
}
22792272

22802273
return settings;

src/main/java/org/opensearch/security/support/SecuritySettings.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,10 @@ public class SecuritySettings {
3636
Setting.Property.Dynamic
3737
); // Not filtered
3838

39+
public static final Setting<Boolean> USER_ATTRIBUTE_SERIALIZATION_ENABLED_SETTING = Setting.boolSetting(
40+
ConfigConstants.USER_ATTRIBUTE_SERIALIZATION_ENABLED,
41+
ConfigConstants.USER_ATTRIBUTE_SERIALIZATION_ENABLED_DEFAULT,
42+
Setting.Property.NodeScope,
43+
Setting.Property.Dynamic
44+
); // Not filtered
3945
}

0 commit comments

Comments
 (0)