Skip to content

Commit 05a6e6d

Browse files
committed
UPDATE Looking Glass references with deep-link URLs
Signed-off-by: ParleSec <mason@masonparle.com>
1 parent 25cec9e commit 05a6e6d

7 files changed

Lines changed: 58 additions & 17 deletions

File tree

docs/starlight/src/content/docs/using/flow-walkthroughs.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Use this method to evaluate any flow with consistent evidence.
99

1010
1. **Choose a flow** from the [Protocol Catalog](/using/protocol-catalog/) and define the expected outcome.
1111
2. **Check prerequisites** -- some flows need an existing token (refresh, introspection), a prior credential (OID4VP), or SPIFFE mode enabled.
12-
3. **Execute** the flow in Looking Glass.
12+
3. **Execute** the flow in [Looking Glass](https://protocolsoup.com/looking-glass)
1313
4. **Inspect** the event timeline -- click each step to see full payloads.
1414
5. **Interpret** validation outcomes and security annotations.
1515
6. **Rerun** with one changed variable to confirm control behavior.
@@ -18,14 +18,14 @@ Use this method to evaluate any flow with consistent evidence.
1818

1919
| Protocol | Flow | Why Start Here |
2020
|----------|------|---------------|
21-
| OAuth 2.0 | Authorization Code + PKCE | Core delegated authorization with modern security |
22-
| OIDC | Authorization Code + UserInfo | Identity layer on OAuth, ID token claims |
23-
| SAML 2.0 | SP-Initiated SSO | Enterprise SSO entry pattern, assertion inspection |
24-
| SCIM 2.0 | User Lifecycle | Full CRUD cycle with PATCH semantics |
25-
| SPIFFE | X.509-SVID Issuance | Workload identity fundamentals |
26-
| SSF | CAEP Session Revoked | Real-time security event stream with receiver response |
27-
| OID4VCI | Pre-Authorized Code | Credential issuance (SD-JWT VC, JWT VC, LDP VC) |
28-
| OID4VP | DCQL + direct_post | Verifier request and wallet submission |
21+
| OAuth 2.0 | [Authorization Code + PKCE](https://protocolsoup.com/looking-glass?protocol=oauth2&flow=authorization_code_pkce) | Core delegated authorization with modern security |
22+
| OIDC | [Authorization Code + UserInfo](https://protocolsoup.com/looking-glass?protocol=oidc&flow=oidc_authorization_code) | Identity layer on OAuth, ID token claims |
23+
| SAML 2.0 | [SP-Initiated SSO](https://protocolsoup.com/looking-glass?protocol=saml&flow=sp_initiated_sso) | Enterprise SSO entry pattern, assertion inspection |
24+
| SCIM 2.0 | [User Lifecycle](https://protocolsoup.com/looking-glass?protocol=scim&flow=user-lifecycle) | Full CRUD cycle with PATCH semantics |
25+
| SPIFFE | [X.509-SVID Issuance](https://protocolsoup.com/looking-glass?protocol=spiffe&flow=x509-svid-issuance) | Workload identity fundamentals |
26+
| SSF | [CAEP Session Revoked](https://protocolsoup.com/ssf-sandbox) | Real-time security event stream with receiver response |
27+
| OID4VCI | [Pre-Authorized Code](https://protocolsoup.com/looking-glass?protocol=oid4vci&flow=oid4vci-pre-authorized) | Credential issuance (SD-JWT VC, JWT VC, LDP VC) |
28+
| OID4VP | [DCQL + direct_post](https://protocolsoup.com/looking-glass?protocol=oid4vp&flow=oid4vp-direct-post) | Verifier request and wallet submission |
2929

3030
## Interpreting Outcomes
3131

docs/starlight/src/content/docs/using/looking-glass.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Every event includes an annotation with RFC references (for example "RFC 6749 Se
3333

3434
## Deep-Links and URL State
3535

36-
Looking Glass supports shareable deep-links in the format `/looking-glass?protocol=X&flow=Y`. These links are generated by the palette search (cmd+K) and the **Share** button in the flow toolbar.
36+
Looking Glass supports shareable deep-links in the format `/looking-glass?protocol=X&flow=Y`. These links are generated by the palette search (cmd+K), the **Share** button in the flow toolbar, and flow detail pages ("Try in Looking Glass").
3737

3838
URL query parameters follow a consume-and-clear lifecycle:
3939

docs/starlight/src/content/docs/using/what-you-can-do.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ Use the same workflow across every protocol to compare:
5151

5252
1. Browse the [Protocol Catalog](/using/protocol-catalog/).
5353
2. Pick one flow from [Flow Walkthroughs](/using/flow-walkthroughs/).
54-
3. Execute it in Looking Glass.
54+
3. Execute it in [Looking Glass](https://protocolsoup.com/looking-glass)
5555
4. Change one input and rerun to observe control behavior.

frontend/src/components/palette/runDispatch.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,15 @@ export function resolveFlowHandoff(result: PaletteResult): FlowRunHandoff | null
8383
export function buildLookingGlassPath({ protocolId, flowId }: FlowDeepLink): string {
8484
return `/looking-glass?protocol=${encodeURIComponent(protocolId)}&flow=${encodeURIComponent(flowId)}`
8585
}
86+
87+
/**
88+
* buildFlowExecutionPath returns the URL that opens a runnable flow in the
89+
* correct execution surface. SSF flows use the dedicated sandbox; all other
90+
* protocols deep-link into Looking Glass with the flow pre-selected.
91+
*/
92+
export function buildFlowExecutionPath({ protocolId, flowId }: FlowDeepLink): string {
93+
if (protocolId === 'ssf') {
94+
return '/ssf-sandbox'
95+
}
96+
return buildLookingGlassPath({ protocolId, flowId })
97+
}

frontend/src/views/Callback.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import { useEffect, useState } from 'react'
1414
import Link from 'next/link'
1515
import { CheckCircle, XCircle, Loader2, ArrowLeft, AlertTriangle } from 'lucide-react'
16+
import { buildLookingGlassPath } from '@/components/palette/runDispatch'
1617

1718
type CallbackType = 'authorization_code' | 'implicit' | 'hybrid' | 'error' | 'unknown'
1819

@@ -68,6 +69,10 @@ export function Callback() {
6869
}
6970
}, [])
7071

72+
const lookingGlassReturnPath = callbackData
73+
? lookingGlassPathForCallback(callbackData)
74+
: buildLookingGlassPath({ protocolId: 'oauth2', flowId: 'authorization_code_pkce' })
75+
7176
return (
7277
<div className="min-h-[80vh] flex items-center justify-center">
7378
<div className="glass rounded-xl p-8 max-w-lg w-full">
@@ -96,7 +101,7 @@ export function Callback() {
96101

97102
{!window.opener && (
98103
<Link
99-
href="/looking-glass"
104+
href={lookingGlassReturnPath}
100105
className="inline-flex items-center gap-2 mt-6 px-4 py-2 rounded-lg bg-accent-cyan/10 border border-accent-cyan/20 text-accent-cyan hover:bg-accent-cyan/20 transition-colors"
101106
>
102107
<ArrowLeft className="w-4 h-4" />
@@ -134,7 +139,7 @@ export function Callback() {
134139
)}
135140

136141
<Link
137-
href="/looking-glass"
142+
href={lookingGlassReturnPath}
138143
className="inline-flex items-center gap-2 mt-6 px-4 py-2 rounded-lg bg-surface-800 border border-white/10 text-surface-300 hover:text-white hover:bg-surface-700 transition-colors"
139144
>
140145
<ArrowLeft className="w-4 h-4" />
@@ -239,6 +244,19 @@ function extractCallbackData(
239244
return { type: 'unknown' }
240245
}
241246

247+
function lookingGlassPathForCallback(data: CallbackData): string {
248+
switch (data.type) {
249+
case 'implicit':
250+
return buildLookingGlassPath({ protocolId: 'oidc', flowId: 'oidc_implicit' })
251+
case 'hybrid':
252+
return buildLookingGlassPath({ protocolId: 'oidc', flowId: 'oidc_hybrid' })
253+
case 'authorization_code':
254+
return buildLookingGlassPath({ protocolId: 'oauth2', flowId: 'authorization_code_pkce' })
255+
default:
256+
return buildLookingGlassPath({ protocolId: 'oauth2', flowId: 'authorization_code_pkce' })
257+
}
258+
}
259+
242260
/**
243261
* Send callback data to parent window
244262
*/

frontend/src/views/FlowDetail.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { FlowDefinition, FlowStep } from '../protocols/registry'
1515
import { CODE_EXAMPLES } from '../protocols/examples'
1616
import { ParameterExplainer } from '../components/ParameterExplainer'
1717
import { ProtocolReferences } from '../components/ProtocolReferences'
18+
import { buildFlowExecutionPath } from '@/components/palette/runDispatch'
1819
import { getCatalogFlow, getFlowRouteId } from '../protocols/presentation/protocol-catalog-data'
1920

2021
interface FlowDetailProps {
@@ -181,6 +182,10 @@ export function FlowDetail({
181182
}
182183

183184
const badges = getBadges()
185+
const flowExecutionPath = buildFlowExecutionPath({
186+
protocolId,
187+
flowId: currentFlowId,
188+
})
184189

185190
return (
186191
<div className="max-w-4xl mx-auto space-y-4 sm:space-y-6 px-1 sm:px-0">
@@ -214,7 +219,7 @@ export function FlowDetail({
214219
</div>
215220

216221
<Link
217-
href={protocolId === 'ssf' ? '/ssf-sandbox' : '/looking-glass'}
222+
href={flowExecutionPath}
218223
className={`inline-flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg bg-gradient-to-r ${
219224
protocolId === 'ssf'
220225
? 'from-amber-500/20 to-orange-500/20 border-amber-500/30 text-amber-400 hover:from-amber-500/30 hover:to-orange-500/30'
@@ -234,7 +239,7 @@ export function FlowDetail({
234239
</div>
235240

236241
<Link
237-
href={protocolId === 'ssf' ? '/ssf-sandbox' : '/looking-glass'}
242+
href={flowExecutionPath}
238243
className={`flex items-center gap-2 px-4 py-2 rounded-lg bg-gradient-to-r ${
239244
protocolId === 'ssf'
240245
? 'from-amber-500/20 to-orange-500/20 border-amber-500/30 text-amber-400 hover:from-amber-500/30 hover:to-orange-500/30'
@@ -388,7 +393,7 @@ export function FlowDetail({
388393
<span className="sm:hidden">Back</span>
389394
</Link>
390395
<Link
391-
href={protocolId === 'ssf' ? '/ssf-sandbox' : '/looking-glass'}
396+
href={flowExecutionPath}
392397
className="flex items-center gap-1.5 sm:gap-2 text-xs sm:text-sm text-surface-400 hover:text-white transition-colors"
393398
>
394399
<span className="hidden sm:inline">{protocolId === 'ssf' ? 'Open SSF Sandbox' : 'Open Looking Glass'}</span>

frontend/src/views/ProtocolDemo.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
} from 'lucide-react'
1010
import type { FlowDefinition, Protocol } from '../protocols/registry'
1111
import { protocolMeta } from '../protocols/registry'
12+
import { buildFlowExecutionPath } from '@/components/palette/runDispatch'
1213
import { FLOW_PRESENTATION_META, getFeatureDescription } from '../protocols/presentation/flow-meta'
1314
import { getCatalogProtocol, getFlowRouteId } from '../protocols/presentation/protocol-catalog-data'
1415
import { ProtocolReferences } from '../components/ProtocolReferences'
@@ -44,6 +45,11 @@ export function ProtocolDemo({
4445
const recommendedFlow = flows.find(f => FLOW_PRESENTATION_META[f.id]?.recommended) || flows[0]
4546

4647
const catalogEntry = getCatalogProtocol(protocolId)
48+
const executionPath = recommendedFlow
49+
? buildFlowExecutionPath({ protocolId, flowId: recommendedFlow.id })
50+
: protocolId === 'ssf'
51+
? '/ssf-sandbox'
52+
: '/looking-glass'
4753

4854
return (
4955
<div className="space-y-6 sm:space-y-8 px-1 sm:px-0">
@@ -77,7 +83,7 @@ export function ProtocolDemo({
7783
</Link>
7884
)}
7985
<Link
80-
href={protocolId === 'ssf' ? '/ssf-sandbox' : '/looking-glass'}
86+
href={executionPath}
8187
className="inline-flex items-center justify-center gap-2 px-4 sm:px-5 py-2.5 rounded-xl bg-white/5 border border-white/10 text-white text-sm sm:text-base font-medium hover:bg-white/10 transition-colors"
8288
>
8389
{protocolId === 'ssf' ? <Radio className="w-4 h-4" /> : <Eye className="w-4 h-4" />}

0 commit comments

Comments
 (0)