Illegal User Settings

Hi I am getting an illegal User Settings error while updating user settings.

I am using Elasticsearch 2.4.1 when i have updated user settings and click on Update getting an error saying Illegal User Settings. I am trying to update SMTP settings

Below is the configuration I am trying to update
xpack.notification.email.account:
gmail_account:
profile: gmail
smtp:
auth: true
starttls.enable: true
host: smtp.gmail.com
port: 587
user: username
password: password

Error message is as below:

{
"msg": "Illegal user settings",
"ok": false,
"detail": {
"errors": [
"'xpack.notification.email.account.gmail_account.smtp.starttls.enable': is not allowed",
"'xpack.notification.email.account.gmail_account.smtp.password': is not allowed",
"'xpack.notification.email.account.gmail_account.smtp.port': is not allowed",
"'xpack.notification.email.account.gmail_account.smtp.user': is not allowed",
"'xpack.notification.email.account.gmail_account.profile': is not allowed",
"'xpack.notification.email.account.gmail_account.smtp.host': is not allowed",
"'xpack.notification.email.account.gmail_account.smtp.auth': is not allowed"
]
},
"error": "BadRequest"
}

Can someone please provide me a sample for elasticsearch 2.4.1

Hey,

x-pack configuration settings are supposed to work with Elasticsearch 5.0 and upwards. You need to configure those settings using the watcher prefix. See the docs for an example.

--Alex

Hi Alexander,

Thanks for responding. I have tried with watcher prefix as well. I got the similar Error Response.
watcher.actions.email.service.account:
gmail_account:
profile: gmail
smtp:
auth: true
starttls.enable: true
host: smtp.gmail.com
port: 587
user: username
password: password

{
"msg": "Illegal user settings",
"ok": false,
"detail": {
"errors": [
"'watcher.actions.email.service.account.gmail_account.smtp.host': is not allowed",
"'watcher.actions.email.service.account.gmail_account.profile': is not allowed",
"'watcher.actions.email.service.account.gmail_account.smtp.port': is not allowed",
"'watcher.actions.email.service.account.gmail_account.smtp.user': is not allowed",
"'watcher.actions.email.service.account.gmail_account.smtp.password': is not allowed",
"'watcher.actions.email.service.account.gmail_account.smtp.auth': is not allowed",
"'watcher.actions.email.service.account.gmail_account.smtp.starttls.enable': is not allowed"
]
},
"error": "BadRequest"
}

Hey,

sorry I misread your initial post and was focused on x-pack. The email settings are not dynamic properties, but have to be configured statically in your config file and cannot be updated at run-time.

However I am still confused a bit by this JSON. Which call did you execute to get that response? Was it a cluster udpate settings call? Can you show the exact HTTP call you executed including URL, host and body?

--Alex

Hi Alex,

I am using the hosted cluster. I am trying to update user settings from portal.

URL: https://api.found.no/api/v0/clusters/us-east-1/b0a4ab1f733156e01cb0197bd8761302

PayLoad

{"scripting":{"inline":"sandbox","indexed":"sandbox","file":"sandbox"},"auto_create_index":true,"capacity":"1024","region":"us-east-1","availability_zones":"1","version":"5.0.0","destructive_requires_name":false,"ssd":true,"user_plugins":,"plugins":,"user_id":19283115,"created":"2016-11-10T14:12:10Z","txid":79664045,"cluster_id":"b0a4ab1f733156e01cb0197bd8761302","is_hidden":false,"identifier":null,"data":{"name":"sudhir"},"extra_user_settings_source":"watcher.actions.email.service.account:\n gmail_account:\n profile: gmail\n smtp:\n auth: true\n starttls.enable: true\n host: smtp.gmail.com\n port: 587\n user: username\n password: 'password'"}

Hey,

that was the missing piece of information. When you use Elastic Cloud, you do not need to configure a dedicated email account, see the respective documentation.

Hope this helps!

--Alex

Thanks Alex. This worked

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.