Browse Source

Remove deprecated audit settings (#35205)

Removes `.prefix` deprecated settings for the logfile
auditing and also documents it in the migrate asciidoc.
Albert Zaharovits 7 years ago
parent
commit
025a0c82e5

+ 21 - 1
docs/reference/migration/migrate_7_0/settings.asciidoc

@@ -67,6 +67,26 @@ in the cluster state, or set on dynamic settings updates, we will automatically
 upgrade the setting from `search.remote.*` to `cluster.remote.*`. The fallback
 settings will be removed in 8.0.0.
 
+[float]
+[[audit-logfile-local-node-info]]
+==== Audit logfile local node info
+
+The following settings have been removed:
+
+- `xpack.security.audit.logfile.prefix.emit_node_host_address`, instead use
+  `xpack.security.audit.logfile.emit_node_host_address`
+- `xpack.security.audit.logfile.prefix.emit_node_host_name`, instead use
+  `xpack.security.audit.logfile.emit_node_host_name`
+- `xpack.security.audit.logfile.prefix.emit_node_name`, instead use
+  `xpack.security.audit.logfile.emit_node_name`
+
+The new settings have the same meaning as the removed ones, but the `prefix`
+name component is no longer meaningful as logfile audit entries are structured
+JSON documents and are not prefixed by anything.
+Moreover, `xpack.security.audit.logfile.emit_node_name` has changed its default
+from `true` to `false`. All other settings mentioned before, have kept their
+default value of `false`.
+
 [float]
 [[include-realm-type-in-setting]]
 ==== Security realms settings
@@ -84,7 +104,7 @@ xpack.security.authc.realms:
     url: "ldaps://ldap.example.com/"
 --------------------------------------------------
 
-Must be migrated to: 
+Must be migrated to:
 [source,yaml]
 --------------------------------------------------
 xpack.security.authc.realms:

+ 3 - 9
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrail.java

@@ -108,18 +108,12 @@ public class LoggingAuditTrail implements AuditTrail, ClusterStateListener {
     public static final String OPAQUE_ID_FIELD_NAME = "opaque_id";
 
     public static final String NAME = "logfile";
-    public static final Setting<Boolean> DEPRECATED_EMIT_HOST_ADDRESS_SETTING = Setting.boolSetting(
-            setting("audit.logfile.prefix.emit_node_host_address"), false, Property.NodeScope, Property.Dynamic, Property.Deprecated);
     public static final Setting<Boolean> EMIT_HOST_ADDRESS_SETTING = Setting.boolSetting(setting("audit.logfile.emit_node_host_address"),
-            DEPRECATED_EMIT_HOST_ADDRESS_SETTING, Property.NodeScope, Property.Dynamic);
-    public static final Setting<Boolean> DEPRECATED_EMIT_HOST_NAME_SETTING = Setting.boolSetting(
-            setting("audit.logfile.prefix.emit_node_host_name"), false, Property.NodeScope, Property.Dynamic, Property.Deprecated);
+            false, Property.NodeScope, Property.Dynamic);
     public static final Setting<Boolean> EMIT_HOST_NAME_SETTING = Setting.boolSetting(setting("audit.logfile.emit_node_host_name"),
-            DEPRECATED_EMIT_HOST_NAME_SETTING, Property.NodeScope, Property.Dynamic);
-    public static final Setting<Boolean> DEPRECATED_EMIT_NODE_NAME_SETTING = Setting
-            .boolSetting(setting("audit.logfile.prefix.emit_node_name"), false, Property.NodeScope, Property.Dynamic, Property.Deprecated);
+            false, Property.NodeScope, Property.Dynamic);
     public static final Setting<Boolean> EMIT_NODE_NAME_SETTING = Setting.boolSetting(setting("audit.logfile.emit_node_name"),
-            DEPRECATED_EMIT_NODE_NAME_SETTING, Property.NodeScope, Property.Dynamic);
+            false, Property.NodeScope, Property.Dynamic);
     public static final Setting<Boolean> EMIT_NODE_ID_SETTING = Setting.boolSetting(setting("audit.logfile.emit_node_id"), true,
             Property.NodeScope, Property.Dynamic);
     private static final List<String> DEFAULT_EVENT_INCLUDES = Arrays.asList(ACCESS_DENIED.toString(), ACCESS_GRANTED.toString(),