Skip to content

0.6.0: Demo site rewrite (MVP) - #558

Draft
micolous wants to merge 65 commits into
kanidm:6.0-dev-drop-opensslfrom
micolous:555-6.0-demo-rewrite
Draft

micolous wants to merge 65 commits into
kanidm:6.0-dev-drop-opensslfrom
micolous:555-6.0-demo-rewrite

Conversation

@micolous

@micolous micolous commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Change summary

Work in progress, do not merge!

This targets the 0.6 branch (#499 / #504) for convenience.

  • Rewrite the demo site in Leptos. Design doc in New demo site design (#555) #563.
  • Use the rust Docker image to build webauthn-rs-demo. While this is an "officially Docker" image, it is managed by rust-lang (unlike some other languages' "officially Docker" images).
  • Use Debian Docker image at runtime (to match the build environment).
  • The demo Docker image now publishes on HTTP port 3000. This is the Leptos default, but can be reconfigured.

This also:

  • Work around a CI build issue on Windows with very long command line arguments (due to web-sys)
  • Remove some obsolete package names
  • Re-enable generating docs for the demo site
  • Moves clippy lints for the tutorials to the tutorial CI job (added in Bugs2 #482)

This also fixes some issues with CI where web-sys can not be built on Windows in some circumstances, and moves checks for the tutorials to the tutorials job (#482).

Depends on:

Fixes #555

TODO

  • Fix CI configuration
  • Button to automatically generate a username
  • Resolve difference between "account creation time" vs. "passkey enrolment time"
  • Credential labelling
  • Explain how this site is insecure (anyone can enroll a credential for any account, no "sessions", etc.)
  • Container builds
  • Test the site on iOS
  • Test the site on Android

Dropped features for MVP

  • Implement automatic deletion of accounts and credentials. In the container environment, if the /data volume is lost, that'll clear everything out.
  • End-to-end testing with WebDriver authenticator. This is more complicated, it can happen later.
  • Compatibility test suite.
  • Conditional UI.

Checklist

  • This PR contains no AI generated code
  • cargo test has been run and passes
  • documentation has been updated with relevant examples (if relevant)

@micolous
micolous force-pushed the 555-6.0-demo-rewrite branch from 2709cd6 to 62a3429 Compare May 16, 2026 10:34
@micolous
micolous force-pushed the 555-6.0-demo-rewrite branch 2 times, most recently from c08b9fd to 3b57f9c Compare May 28, 2026 01:40
@micolous micolous mentioned this pull request May 28, 2026
3 tasks
@micolous micolous linked an issue May 28, 2026 that may be closed by this pull request
5 tasks
@micolous
micolous force-pushed the 555-6.0-demo-rewrite branch from 3b57f9c to a48c5ba Compare May 28, 2026 02:06
@micolous micolous mentioned this pull request Jun 2, 2026
5 tasks
@micolous

micolous commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator Author

FWIW, the new demo site isn't intended to be a tutorial. There will be strange things that aren't applicable to a real app, and things that are missing. We have tutorials for axum and actix, and they're built in CI, but I (personally) haven't reviewed those in the 0.6 branch to see if they're still actually working correctly.

0.6 will be marked as a "stable" release when it's ready, and plenty of others have expressed significant interest in it... and I don't need a reminder. 😉 I've got quite a few things I want to look at still, that part will take time.

@micolous micolous added this to the v0.6 milestone Jun 12, 2026
* show the actual `DomException` for `nav.cred.get()` errors
* show an error when `nav.cred.create()` returns an unexpected error type
* use `<ShowLet>` for views
* encode credential ID as base64 for consistency with API
* show JSON form of registration and authentication challenges
@micolous
micolous force-pushed the 555-6.0-demo-rewrite branch from 116758c to 375b1bc Compare September 21, 2026 02:02
@micolous micolous changed the title WIP: 6.0 demo rewrite 0.6.0: Demo site rewrite (MVP) Sep 21, 2026
@micolous

Copy link
Copy Markdown
Collaborator Author

The demo site is now near completion.

I've tested this on mobile with the iOS Simulator (Device Hub), and it looks fine there.

I still need to test this on Android, and I'll need to set up local HTTPS serving for that (due to networking differences). I anticipate some issues there due to Android's fragmented WebAuthn stack.

@Firstyear Firstyear left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, ran it locally and it "just worked" which is always nice :)

Comment thread demo/src/server/cookie.rs
//! [`SessionCookie`] then stored in a [`Jwe`], which is encrypted with a key-wrapped key before
//! being sent to the client. This avoids the need to persist this data elsewhere in the server.
//!
//! While [`cookie`] has its own way to encrypt data, we discovered a security issue with its

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's no longer considered a security issue for the record, but this jwe usage is probably still better long term.

Comment thread demo/src/server/state.rs
Ok(passkey)
}

// TODO: memory management; removing excessive entries.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's a big TODO :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port demos away from tide

2 participants