ES 7.4.2 - RoR 1.18.9 entreprise - issue when refreshing kibana pattern index

Hi,

this reproductible :
each time I refresh an existing kibana pattern index, and if there is no more index matching in elasticsearch, i get a quick message about a fetch error, then i get kicked out of kibana ( to login page.)

no forbidden log in readonlyrest_audit log

and here the log in kibana.log

{"type":"log","@timestamp":"2019-12-10T13:53:21Z","tags":["error","readonlyrest_kbn:onPreResponse"],"pid":13688,"message":"got an error [undefined] Not Found for path /api/index_patterns/_fields_for_wildcard"}
{"type":"log","@timestamp":"2019-12-10T13:53:21Z","tags":["error","readonlyrest_kbn:onPreResponse"],"pid":13688,"message":"{\"data\":null,\"isBoom\":true,\"isServer\":false,\"output\":{\"statusCode\":404,\"payload\":{\"statusCode\":404,\"error\":\"Not Found\",\"message\":\"No indices match pattern \\\"log_lu_ec_2000*\\\"\",\"code\":\"no_matching_indices\"},\"headers\":{\"kbn-name\":\"kibana\",\"kbn-xpack-sig\":\"f7ec80a5c6f05ea023ead6e4e4b21821\"}}}"}
{"type":"response","@timestamp":"2019-12-10T13:53:21Z","tags":[],"pid":13688,"method":"get","statusCode":302,"req":{"url":"/api/index_patterns/_fields_for_wildcard?pattern=log_lu_ec_2000*&meta_fields=_source&meta_fields=_id&meta_fields=_type&meta_fields=_index&meta_fields=_score","method":"get","headers":{"host":"x.x.x.x:x","connection":"keep-alive","kbn-version":"7.4.2","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36","content-type":"application/json","accept":"*/*","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","referer":"https://x.x.x.x:x/app/kibana","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9","x-ror-kibana-request-path":"/api/index_patterns/_fields_for_wildcard","x-ror-kibana-request-method":"get"},"remoteAddress":"127.0.0.1","userAgent":"127.0.0.1","referer":"https://x.x.x.x:x/app/kibana"},"res":{"statusCode":302,"responseTime":56,"contentLength":9},"message":"GET /api/index_patterns/_fields_for_wildcard?pattern=log_lu_ec_2000*&meta_fields=_source&meta_fields=_id&meta_fields=_type&meta_fields=_index&meta_fields=_score 302 56ms - 9.0B"}
{"type":"log","@timestamp":"2019-12-10T13:53:21Z","tags":["error","readonlyrest_kbn:onPreResponse"],"pid":13688,"message":"got an error [undefined] Internal Server Error for path /login"}
{"type":"log","@timestamp":"2019-12-10T13:53:21Z","tags":["error","readonlyrest_kbn:onPreResponse"],"pid":13688,"message":"{\"stack\":\"TypeError: Cannot read property 'username' of null\\n    at username (D:\\\\ELKG\\\\kibana\\\\plugins\\\\readonlyrest_kbn\\\\server\\\\routes\\\\lib/auth.js:123:44)\\n    at module.exports.internals.Manager.execute (D:\\\\ELKG\\\\kibana\\\\node_modules\\\\hapi\\\\lib\\\\toolkit.js:35:106)\\n    at Object.internals.handler (D:\\\\ELKG\\\\kibana\\\\node_modules\\\\hapi\\\\lib\\\\handler.js:50:48)\\n    at exports.execute (D:\\\\ELKG\\\\kibana\\\\node_modules\\\\hapi\\\\lib\\\\handler.js:35:36)\\n    at Request._lifecycle (D:\\\\ELKG\\\\kibana\\\\node_modules\\\\hapi\\\\lib\\\\request.js:263:62)\",\"message\":\"Cannot read property 'username' of null\",\"isBoom\":true,\"isServer\":true,\"data\":null,\"output\":{\"statusCode\":500,\"payload\":{\"statusCode\":500,\"error\":\"Internal Server Error\",\"message\":\"An internal server error occurred\"},\"headers\":{\"kbn-name\":\"kibana\",\"kbn-xpack-sig\":\"f7ec80a5c6f05ea023ead6e4e4b21821\"}},\"isDeveloperError\":true}"}

Please test this with the 1.18.10-pre1 Enterprise plugin I sent you.

I confirm this is fixed with the 1.18.10-pre1 version.