vavan
(vavan)
May 13, 2021, 4:41am
#1
Kibana7.8.1 でシステム構築をしています。
Kibanaで、新たに スペース:spc_a を作成し、そのスペースのみを編集できるユーザ:user_a を作りたいと思っています。
user_a には、spc_a の権限として[all] を与えていますが、スペースを選択してVisualizeを選択すると、下記のようなポップアップエラーが出ます。
-------------------------------------------------
Unable to update UI Setting
Request failed with Status Code:403
-------------------------------------------------
調べると、下記サイトでは、 .kibana にアクセス権限を付与すればよいという回答などがありました。
そこで、.kibana にアクセス権限を付与するロールとして reporting_user を追加してみましたが、エラーは出たままでした。適切なRole、もしくは権限付与方法を教えて頂けないでしょうか。
※user_aには spc_a でVisualizeを編集する以外、他の操作・権限は与えたくない。参照できるIndexPatterhnも制限したい、という条件です。
以上よろしくお願いします。
Hi guys,
I am not sure what I am doing wrong here. I am automatically updating user security roles also for the spaces through the kibana API. And when I login from one of those roles, I keep getting this error.
Unable to update UI setting
Request failed with status code: 403
here's a picture of it,
[image]
Can anyone help me out of it??
Thanks in advance
Cheers,
Balaji
vavan
(vavan)
May 14, 2021, 12:26am
#2
もう少し詳細な状況がわかったので追記します。
(1) スペースの権限によって事象が違う
spc_a に対して、
権限が all の user_a
権限が read のみの user_b
を作った場合、user_a は [Unable to update UI Setting] のエラーポップアップが出ます。
user_b では表示されません。
(2) superuser で一度アクセスするとでなくなる
user_a に対して、一時的に ”superuser" ロールを付与します。それでVisualizeの画面に入り、Visualizeを作成などの操作をしてみます。この状態ではエラーポップアップは出ません。そこで、一時的に付与した "superuser" ロールを削除してみます。元のロール設定に戻ったので、Visualize画面に入って操作をすると、エラーポップアップが出るはずですが、今度は出なくなります。ログインし直しても、ブラウザのキャッシュをクリアしても、エラーポップアップは出ないようになりました。
一応、(2) のような手順を踏むことでエラーが出なくなるのであれば、運用上の回避ができそうなんですが、どなたか原理がわかる方、教えて頂けないでしょうか。
よろしくお願いします。
taku333
(Taku333)
May 26, 2021, 4:33am
#3
こちら、Elasticsaerchではなく、Kibanaに対してのロールは正しく付与されていますでしょうか?
自作されたロールと”superuser" ロールを比較してみるのが良いかと思われます。
vavan
(vavan)
June 6, 2021, 4:55am
#4
すみません、更新見落としていました。
上記説明で記載したユーザとロールは、すべてkibanaのユーザ、ロール設定になります。(elasticsearch のビルトインユーザ superuser を使ってはいますが
superuser は何でもありユーザなので権限系のエラーが出ないのは納得ですが、一度設定したあとロールを外してもエラーが出なくなるのが解せないところです。
エラーメッセージだけで見ると、下記Issueが原因かもしれません。これは7.9.0以降の対策のようなので、残念ですが。
elastic:master
← kertal:kertal-pr-2020-01-07-fix-discover-default-index-readonly-error
opened 02:30PM - 07 Jan 20 UTC
## Summary
Given there's no default index pattern set and a read only user ac… cesses Discover, he'll get the error message: "Unable to update UI setting"

Discover tries to set and persist a new default index pattern. But without permissions, this fails.
This PR extends the `ensureDefaultIndexPattern` function with a `persist` flag, so Discover can get a default index pattern without persisting it.
### Testing
1) Create a readonly role and user for discover.
2) Go to Advanced Settings and remove the default index pattern. 
3) Login with this user and go to discover.
Without this PR you should get the error message.
Fixes #46124
### Checklist
Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.
~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)
~~- [ ] Any text added follows [EUI's writing guidelines]~~(https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~
~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~
~~- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~~
~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~
### For maintainers
~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
~~- [ ] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
system
(system)
closed
July 4, 2021, 4:56am
#5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.