diff --git a/docs/reference/migration/migrate_6_6.asciidoc b/docs/reference/migration/migrate_6_6.asciidoc index b083ab200965c..8b44e09eb1e37 100644 --- a/docs/reference/migration/migrate_6_6.asciidoc +++ b/docs/reference/migration/migrate_6_6.asciidoc @@ -79,3 +79,31 @@ GET /stackoverflow/_search -------------------------------------------------- // CONSOLE // TEST[setup:stackoverflow] + +[float] +=== Settings changes + +[float] +[[watcher-notifications-account-settings]] +==== Watcher notifications account settings + +The following settings have been deprecated and the secure variants should +be used instead. The <> have to be defined +inside each cluster node's keystore, i.e., they are not to be specified via +the cluster settings API. + +- `xpack.notification.email.account..smtp.password`, instead use +`xpack.notification.email.account..smtp.secure_password` +- `xpack.notification.hipchat.account..auth_token`, instead use +`xpack.notification.hipchat.account..secure_auth_token` +- `xpack.notification.jira.account..url`, instead use +`xpack.notification.jira.account..secure_url` +- `xpack.notification.jira.account..user`, instead use +`xpack.notification.jira.account..secure_user` +- `xpack.notification.jira.account..password`, instead use +`xpack.notification.jira.account..secure_password` +- `xpack.notification.pagerduty.account..service_api_key`, instead use +`xpack.notification.pagerduty.account..secure_service_api_key` +- `xpack.notification.slack.account..url`, instead use +`xpack.notification.slack.account..secure_url` + diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/EmailService.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/EmailService.java index cf897a68957b9..49afa25fd450c 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/EmailService.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/EmailService.java @@ -65,7 +65,7 @@ public class EmailService extends NotificationService { private static final Setting.AffixSetting SETTING_SMTP_PASSWORD = Setting.affixKeySetting("xpack.notification.email.account.", "smtp.password", - (key) -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope, Property.Filtered)); + (key) -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope, Property.Filtered, Property.Deprecated)); private static final Setting.AffixSetting SETTING_SECURE_PASSWORD = Setting.affixKeySetting("xpack.notification.email.account.", "smtp.secure_password", diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/hipchat/HipChatService.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/hipchat/HipChatService.java index b7032d7f25967..44f5aba716ca2 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/hipchat/HipChatService.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/hipchat/HipChatService.java @@ -32,9 +32,9 @@ public class HipChatService extends NotificationService { static final Setting SETTING_DEFAULT_PORT = Setting.intSetting("xpack.notification.hipchat.port", 443, Setting.Property.Dynamic, Setting.Property.NodeScope); - private static final Setting.AffixSetting SETTING_AUTH_TOKEN = - Setting.affixKeySetting("xpack.notification.hipchat.account.", "auth_token", - (key) -> Setting.simpleString(key, Setting.Property.Dynamic, Setting.Property.NodeScope, Setting.Property.Filtered)); + private static final Setting.AffixSetting SETTING_AUTH_TOKEN = Setting.affixKeySetting("xpack.notification.hipchat.account.", + "auth_token", (key) -> Setting.simpleString(key, Setting.Property.Dynamic, Setting.Property.NodeScope, + Setting.Property.Filtered, Setting.Property.Deprecated)); private static final Setting.AffixSetting SETTING_AUTH_TOKEN_SECURE = Setting.affixKeySetting("xpack.notification.hipchat.account.", "secure_auth_token", diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/jira/JiraService.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/jira/JiraService.java index efc41fe216364..bc9e096342b67 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/jira/JiraService.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/jira/JiraService.java @@ -34,15 +34,15 @@ public class JiraService extends NotificationService { private static final Setting.AffixSetting SETTING_URL = Setting.affixKeySetting("xpack.notification.jira.account.", "url", - (key) -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope, Property.Filtered)); + (key) -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope, Property.Filtered, Property.Deprecated)); private static final Setting.AffixSetting SETTING_USER = Setting.affixKeySetting("xpack.notification.jira.account.", "user", - (key) -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope, Property.Filtered)); + (key) -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope, Property.Filtered, Property.Deprecated)); private static final Setting.AffixSetting SETTING_PASSWORD = Setting.affixKeySetting("xpack.notification.jira.account.", "password", - (key) -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope, Property.Filtered)); + (key) -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope, Property.Filtered, Property.Deprecated)); private static final Setting.AffixSetting SETTING_SECURE_USER = Setting.affixKeySetting("xpack.notification.jira.account.", "secure_user", diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyService.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyService.java index ff46d0d6184e6..8d117ea11e095 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyService.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyService.java @@ -28,7 +28,7 @@ public class PagerDutyService extends NotificationService { private static final Setting.AffixSetting SETTING_SERVICE_API_KEY = Setting.affixKeySetting("xpack.notification.pagerduty.account.", "service_api_key", - (key) -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope, Property.Filtered)); + (key) -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope, Property.Filtered, Property.Deprecated)); private static final Setting.AffixSetting SETTING_SECURE_SERVICE_API_KEY = Setting.affixKeySetting("xpack.notification.pagerduty.account.", "secure_service_api_key", diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/SlackService.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/SlackService.java index 9a347e50c5298..d4e3f12b7cd38 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/SlackService.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/SlackService.java @@ -28,7 +28,7 @@ public class SlackService extends NotificationService { private static final Setting.AffixSetting SETTING_URL = Setting.affixKeySetting("xpack.notification.slack.account.", "url", - (key) -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope, Property.Filtered)); + (key) -> Setting.simpleString(key, Property.Dynamic, Property.NodeScope, Property.Filtered, Property.Deprecated)); private static final Setting.AffixSetting SETTING_URL_SECURE = Setting.affixKeySetting("xpack.notification.slack.account.", "secure_url", (key) -> SecureSetting.secureString(key, null));