Skip to content
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

[7.11] Fix embedding docs #94371

Merged
merged 2 commits into from
Mar 11, 2021
Merged

[7.11] Fix embedding docs #94371

merged 2 commits into from
Mar 11, 2021

Conversation

jportner
Copy link
Contributor

@jportner jportner commented Mar 10, 2021

See #90409 (comment):

It looks like we backported these docs to 7.11, even though the Public URL switch (from the linked PR) is only available in 7.12+ 🙈

I'll push a PR to update the 7.11 docs accordingly.

Docs preview: https://kibana_94371.docs-preview.app.elstc.co/guide/en/kibana/7.11/kibana-authentication.html

The docs that were backported to 7.11 described the Public URL feature, which is not available until 7.12.
This commit simply reverts this section back to what it was before.
@jportner jportner requested a review from a team March 10, 2021 21:46
@jportner jportner added the release_note:skip Skip the PR/issue when compiling release notes label Mar 10, 2021
Comment on lines 386 to 402
If you have multiple authentication providers enabled, and you want to automatically log in anonymous users when embedding dashboards and visualizations, then toggle *Public URL* in the *Share > Embed code* menu in *Dashboard* or *Visualize*.
If you have multiple authentication providers enabled, and you want to automatically log in anonymous users when embedding, then you will need to add the `auth_provider_hint=<anonymous-provider-name>` query string parameter to the {kib} URL that you're embedding.

You can also use the *Public URL* toggle when you're generating permanent links to dashboards, visualizations, and saved searches.
For example, if you generate the iframe code to embed {kib}, it will look like this:

NOTE: The *Public URL* toggle is only available if anonymous access is properly configured and your anonymous service account has privileges to access what you want to embed or share.
```html
<iframe src="https://localhost:5601/app/dashboards#/view/722b74f0-b882-11e8-a6d9-e546fe2bba5f?embed=true&_g=(....)" height="600" width="800"></iframe>
```

To make this iframe leverage anonymous access automatically, you will need to modify a link to {kib} in the `src` iframe attribute to look like this:

```html
<iframe src="https://localhost:5601/app/dashboards?auth_provider_hint=anonymous1#/view/722b74f0-b882-11e8-a6d9-e546fe2bba5f?embed=true&_g=(....)" height="600" width="800"></iframe>
```

Note that `auth_provider_hint` query string parameter goes *before* the hash URL fragment.

For more information, refer to <<embedding, Embed {kib} content in a web page>>.
Copy link
Contributor Author

@jportner jportner Mar 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This basically duplicates the content that the aforementioned PR moved to the linked embedding page.

Alternatively, we could change this to just say:

If you have multiple authentication providers enabled, and you want to automatically log in anonymous users when embedding, then you will need to manually modify the {kib} URL in the iframe code. For more information, refer to <<embedding, Embed {kib} content in a web page>>.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the shorter version.

Copy link
Contributor

@gchaps gchaps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either way LGTM.

Comment on lines 386 to 402
If you have multiple authentication providers enabled, and you want to automatically log in anonymous users when embedding dashboards and visualizations, then toggle *Public URL* in the *Share > Embed code* menu in *Dashboard* or *Visualize*.
If you have multiple authentication providers enabled, and you want to automatically log in anonymous users when embedding, then you will need to add the `auth_provider_hint=<anonymous-provider-name>` query string parameter to the {kib} URL that you're embedding.

You can also use the *Public URL* toggle when you're generating permanent links to dashboards, visualizations, and saved searches.
For example, if you generate the iframe code to embed {kib}, it will look like this:

NOTE: The *Public URL* toggle is only available if anonymous access is properly configured and your anonymous service account has privileges to access what you want to embed or share.
```html
<iframe src="https://localhost:5601/app/dashboards#/view/722b74f0-b882-11e8-a6d9-e546fe2bba5f?embed=true&_g=(....)" height="600" width="800"></iframe>
```

To make this iframe leverage anonymous access automatically, you will need to modify a link to {kib} in the `src` iframe attribute to look like this:

```html
<iframe src="https://localhost:5601/app/dashboards?auth_provider_hint=anonymous1#/view/722b74f0-b882-11e8-a6d9-e546fe2bba5f?embed=true&_g=(....)" height="600" width="800"></iframe>
```

Note that `auth_provider_hint` query string parameter goes *before* the hash URL fragment.

For more information, refer to <<embedding, Embed {kib} content in a web page>>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the shorter version.

@jportner jportner merged commit 83bfa60 into 7.11 Mar 11, 2021
@jportner jportner deleted the fix-7.11-embedding-docs branch March 11, 2021 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes v7.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants