mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-17 08:20:12 +00:00
fix: show the external JWT embed URL for members apps (#12377)
* fix: show the external JWT embed URL for members apps Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: hide the external JWT embed on cloud and name its key Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: show the JWT embed section on CE with an EE notice Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
This commit is contained in:
co-authored by
Claude Opus 5.5
Ruben Fiszel
parent
6ba400239b
commit
78ca4263ee
@@ -6,6 +6,7 @@
|
||||
import Label from '$lib/components/Label.svelte'
|
||||
import Description from '$lib/components/Description.svelte'
|
||||
import Tooltip from '$lib/components/Tooltip.svelte'
|
||||
import CollapseLink from '$lib/components/CollapseLink.svelte'
|
||||
import TextInput from '$lib/components/text_input/TextInput.svelte'
|
||||
import ClipboardPanel from '$lib/components/details/ClipboardPanel.svelte'
|
||||
import { Loader2, Pen, Plus, Trash } from 'lucide-svelte'
|
||||
@@ -261,6 +262,40 @@
|
||||
{/snippet}
|
||||
{#if mode == 'publisher'}
|
||||
<ClipboardPanel content={appUrl} size="md" />
|
||||
<!-- The link above only takes a Windmill login. Embedders that sign their own users in
|
||||
append an external JWT to the secret URL instead (`/public/<ws>/<secret>/<jwt>`),
|
||||
which only self-hosted enterprise instances verify, against their own issuer. CE gets
|
||||
the section with an EE notice in place of the snippet; cloud cannot set an issuer. -->
|
||||
{#if !isCloudHosted()}
|
||||
<CollapseLink text="Embed with a JWT from your own product">
|
||||
<div class="flex flex-col gap-2">
|
||||
{#if !$enterpriseLicense}
|
||||
<Description
|
||||
link="https://www.windmill.dev/docs/advanced/external_auth_with_jwt"
|
||||
class="text-2xs text-hint"
|
||||
>
|
||||
Opening the app with a JWT your backend signs, without a Windmill login, is an
|
||||
Enterprise Edition feature.
|
||||
</Description>
|
||||
{:else}
|
||||
{#if secretUrlHref}
|
||||
<ClipboardPanel content={toEmbedSnippet(`${secretUrlHref}/YOUR_JWT`)} size="md" />
|
||||
{:else}
|
||||
<Loader2 size={16} class="animate-spin" />
|
||||
{/if}
|
||||
<Description
|
||||
link="https://www.windmill.dev/docs/advanced/external_auth_with_jwt"
|
||||
class="text-2xs text-hint"
|
||||
>
|
||||
Open the app without a Windmill login: replace <code>YOUR_JWT</code> with a JWT
|
||||
your backend signs with the instance's external JWT key (<code
|
||||
>JWT_EXT_JWKS_URL</code
|
||||
>). Its user needs read access to this app.
|
||||
</Description>
|
||||
{/if}
|
||||
</div>
|
||||
</CollapseLink>
|
||||
{/if}
|
||||
{:else if secretUrlHref}
|
||||
<ClipboardPanel
|
||||
content={embedMode ? toEmbedSnippet(secretUrlHref) : secretUrlHref}
|
||||
|
||||
Reference in New Issue
Block a user