-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation Updates for API usage #38107
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
jenkins, test this |
Pinging @elastic/kibana-security |
Pinging @elastic/kibana-docs |
💔 Build Failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @dcode, thank you for this PR! Would you be able to re-point this to the master
branch? Once we approve and merge it into master
, we will take care of back-porting your work into the 7.x branches.
Will do.
…On Fri, Jun 7, 2019, 05:19 Larry Gregory ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Hey @dcode <https://github.com/dcode>, thank you for this PR! Would you
be able to re-point this to the master branch? Once we approve and merge
it into master, we will take care of back-porting your work into the 7.x
branches.
------------------------------
In docs/api.asciidoc
<#38107 (comment)>:
> @@ -26,6 +26,18 @@ entirely.
NOTE: You cannot access these APIs via the Console in Kibana.
+== Request Headers
+
+The following headers must be set on all non-whitelisted API endpoints
+(See https://www.elastic.co/guide/en/kibana/current/kibana-authentication.html#saml[SAML Authentication]
I think it'd be worthwhile to document server.xsrf.whitelist in the main
settings page, and link there instead, with something like:
See `server.xsrf.whitelist` in <<settings>> for instructions on whitelisting API endpoints.
As an aside, we try to use AsciiDoc's linking mechanism (the <<link-name>>
syntax in my example above) to cross-reference pages, that way the links
automatically point to the correct version of the docs (current wouldn't
be the correct version to link to when referencing a different version of
the stack docs).
------------------------------
In docs/api.asciidoc
<#38107 (comment)>:
> @@ -26,6 +26,18 @@ entirely.
NOTE: You cannot access these APIs via the Console in Kibana.
+== Request Headers
+
+The following headers must be set on all non-whitelisted API endpoints
+(See https://www.elastic.co/guide/en/kibana/current/kibana-authentication.html#saml[SAML Authentication]
+documentation for example whitelisting).
+
+`kbn-xsrf: true`:: By default, Kibana requires the `kbn-xsrf` header set to true
nit: Kibana *technically* doesn't care what the header value is set to.
It only cares that the header is present and set to some value.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#38107?email_source=notifications&email_token=AABJ4NRRWV3ZVAWPFEVXAODPZIY3JA5CNFSM4HTYBDM2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB24SZEA#pullrequestreview-247016592>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABJ4NX6O3K3HJYFVN4YVGLPZIY3JANCNFSM4HTYBDMQ>
.
|
This fell off my radar. I'll make the requested changes and repush soon. |
💔 Build Failed |
@dcode any updates on this one? I can help with the merge conflicts. Just let me know! |
Replaced with #51989. Closing. |
Summary
While trying to use the Kibana API for programmatically creating Spaces, I ran across an issue when using the examples and specifying the color that I pulled from the Kibana UI to manage spaces. Namely, the UI presents hex color codes in all caps, while the API only accepts lower case hex. Secondly, there's no documentation (that I could find) that specified that both the
kbn-xsrf
andContent-Type
headers are required.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] This was checked for cross-browser compatibility, including a check against IE11- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)- [ ] Unit or functional tests were updated or added to match the most common scenarios- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers