Skip to content

Conversation

@dealloc
Copy link

@dealloc dealloc commented Dec 1, 2025

Closes #1015

Adds host support for Zitadel to Aspire.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

Currently in draft since I haven't figured out everything.

  • HTTPS would be great if I could set this up by default, but I couldn't figure out how to get Aspire to share it's SSL
  • Zitadel requires the hostname to be known, if you access from service discovery it would be <name> but if you open from the dashboard it's localhost:<port>. Currently it uses a semi-hardcoded <name>.dev.localhost as a middle ground.

I played around with something similar to Keycloak's WithRealmImport to "seed" the instance but AFAIK Zitadel doesn't support such things.

I need to update some of the docs that are missing and write the tests, not sure if the example I've included is sufficient for now

@dealloc
Copy link
Author

dealloc commented Dec 1, 2025

@dotnet-policy-service agree

Copy link
Member

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

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

You mentioned a problem with hostnames, can you tag the line(s) where that's surfacing?

@dealloc
Copy link
Author

dealloc commented Dec 3, 2025

You mentioned a problem with hostnames, can you tag the line(s) where that's surfacing?

Currently that would be https://github.com/CommunityToolkit/Aspire/pull/1021/files/677452ebe38d7be79caf11268057182f5594136d#diff-427aa76f92a729429b7b134c3be02f0a722e8ab12d85a50a2bc822d9819cda33R35

Zitadel requires a "stable" external hostname or it'll return a 404 if the Host header does not match what's configured.

This means that if I configure the external hostname as localhost and I would call it from Aspire's service discovery (e.g zitadel:<port>) it would return a 404 as it can't "match" to an instance. On the other hand setting it to the resource name would mean you can't open it in the browser from Aspire's dashboard.

Currently I'm setting it to <name>.dev.localhost which seemed a good middle ground but I can't seem to override the URL shown in the dashboard, and I'm not sure if this is the "idiomatic" way to handle this in Aspire either

@dealloc
Copy link
Author

dealloc commented Dec 3, 2025

rebased changes on main

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.

Hosting integration for Zitadel

2 participants