Skip to content

Conversation

@nmoskaleva
Copy link
Collaborator

@nmoskaleva nmoskaleva commented Nov 26, 2025

The first iteration of OIDC Visualizer.
https://deploy-preview-251--criipto-docs.netlify.app/verify/guides/oidc-visualizer/

TO DO:

  • Make it possible to trigger code exchange more than once
  • Add FTN flow
  • Add CIBA

@netlify
Copy link

netlify bot commented Nov 26, 2025

Deploy Preview for criipto-docs ready!

Name Link
🔨 Latest commit 5b27c01
🔍 Latest deploy log https://app.netlify.com/projects/criipto-docs/deploys/694a450927f4cb00080c0467
😎 Deploy Preview https://deploy-preview-251--criipto-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nmoskaleva nmoskaleva force-pushed the oidc-visualizer branch 6 times, most recently from e582d06 to ef1ba51 Compare November 26, 2025 12:57
@fkj
Copy link
Collaborator

fkj commented Nov 26, 2025

I just tried this and it's really cool!
I don't think we have a good way to check whether the configuration is correct other than just running an authentication. It would probably require some interaction with the dashboard.

@nmoskaleva
Copy link
Collaborator Author

@fkj thanks a lot for checking it out! I keep asking myself if we need the option to change client configs at all.

@fkj
Copy link
Collaborator

fkj commented Nov 26, 2025

@fkj thanks a lot for checking it out! I keep asking myself if we need the option to change client configs at all.

I think once you're at the point where you need custom configuration, you should probably use the Authorize URL Builder anyway. Or your own implementation.
But I guess it depends on what the intended target audience and use case for this is?

@nmoskaleva
Copy link
Collaborator Author

But I guess it depends on what the intended target audience and use case for this is?

The intention is for developers to better understand OIDC. And as you said, they can always test their own application elsewhere.

@mickhansen
Copy link
Collaborator

Maybe there is a good way to validate input before saving? OR maybe there is no sense to allow custom client configurations at all.

I think we should allow custom configuration, but just let the user see the error messages.

scope: string;
};

const OidcVisualizer = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Very large component, suggest maybe breaking seperate steps into seperate components?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

) : (
<button onClick={proceedToVerifyWT} className={baseBtnStyles}>
Next
</button>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Make it possible to exchange the code again, to trigger the error branch of code replay, this has been requested by @sgryt to show to auditors.

@mickhansen
Copy link
Collaborator

@nmoskaleva Looks really freaking awesome so far!
I think adding PAR and client authentication as well would be great. And option to repeat certain steps (which will of course break the flow)


<p className="mt-4 text-gray-600">
This token is cryptographically signed with the HS256 algorithm. We'll use the
client secret to confirm the signature is valid.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This section is incorrect. If it's a signature from Verify then it's not HS256 and it's assymetrically signed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated in 4c4a2ca

redirectUri: `${typeof window !== 'undefined' ? window.location.origin : 'https://docs.idura.app'}/verify/guides/oidc-visualizer`,
scope: 'openid',
responseType: 'code',
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wonder if we should also support private_key_jwt?
Let the user pick

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added in 84eb278

Copy link
Collaborator

@mickhansen mickhansen left a comment

Choose a reason for hiding this comment

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

Some of the colors, like the primary buttons, seem different than the rest of the docs - Intentional?

image

Some code blocks are also double wrapped:

Image

@nmoskaleva
Copy link
Collaborator Author

@mickhansen thanks for reviewing, I'll address the comments and add more features 👍

Some of the colors, like the primary buttons, seem different than the rest of the docs - Intentional?

I used blue intentionally, yes. We had a discussion about using colors other than our brand colors in some cases. But I'll run the design through Trine once it's done.

Some code blocks are also double wrapped:

We have this double wrapping scattered in the docs, e.g. https://docs.idura.app/verify/getting-started/oidc-intro/#example-authorization-url
Moving away from it actually makes sense, thanks for noticing.

@mickhansen
Copy link
Collaborator

We have this double wrapping scattered in the docs, e.g. https://docs.idura.app/verify/getting-started/oidc-intro/#example-authorization-url
Moving away from it actually makes sense, thanks for noticing.

@nmoskaleva Oh, that's also a bug :D

This allows developers run the OIDC  flow using their own application credentials.
@nmoskaleva nmoskaleva force-pushed the oidc-visualizer branch 2 times, most recently from 195f4ca to 4b85dcd Compare December 20, 2025 13:17
Build was failing on this branch with ENOENT when reading `public/_redirects`. Fixed by initializing `input` to empty string if `_redirects` doesn't exist.
@mickhansen
Copy link
Collaborator

Suggest perhaps allowing people to pick acr_values? Having the mock one would be beneficial in a few use cases.

Now, the authorization code can be exchanged for an access token and an ID token. To
do this, the authorization server sends a POST request to your token endpoint,
including the authorization code and the client credentials. Note that the
authorization code is valid for a single use.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This description is a bit awkward?
"The authorization server", I assume you mean "Your application server sends a POST request to the token endpoint".

Copy link
Collaborator Author

@nmoskaleva nmoskaleva Dec 22, 2025

Choose a reason for hiding this comment

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

Absolutely, fixed in 9ffc46a

@mickhansen
Copy link
Collaborator

image

Be cool if this also showed headers (so one can see the client credentials are used), perhaps visualized more in the standard HTTP visualization format.

</div>

<p className="mt-4 text-gray-600">
The token is cryptographically signed by Idura Verify using the RSA algorithm. To
Copy link
Collaborator

Choose a reason for hiding this comment

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

The use of RSA could change, perhaps either detect from the token header or just say "signed".

Copy link
Collaborator Author

@nmoskaleva nmoskaleva Dec 22, 2025

Choose a reason for hiding this comment

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

Updated (to simply "signed") in 9ffc46a

@nmoskaleva nmoskaleva marked this pull request as ready for review December 23, 2025 07:37
@nmoskaleva
Copy link
Collaborator Author

nmoskaleva commented Dec 23, 2025

acr_values added in 5b27c01

@sgryt
Copy link
Contributor

sgryt commented Dec 23, 2025

@nmoskaleva This is absolutely great! I'm very much looking forward to showing it to our auditors next time around :)

Some ideas for future (post-holiday) unhappy-path options below.
I am not sure if all are possible from JS, though, and I'm sorry if I am re-iterating things that are already on the agenda, please consider this to be a just-before-Christmas braindump.

  1. Being able to modify the id_token in-place, and an option to re-run the signature validation (to see it break)
  2. Offer the option to validate against a "wrong" JWKSet, and also the option to re-run the signature validation (to see it break)
  3. Ability to use http instead of https - and then somehow visualize that automatic redirection from HTTP to HTTPS kicks in
  4. Showing (select) HTTP response headers (cache-control, CSP, ...maybe others...)
  5. For MitID: Tampering with the nonce-cookie to see the flow break (perhaps by replacing it with a correctly encrypted nonce cookie from another flow)
  6. SSO: Show that it is supported, and rate-limited, but also that it can be broken by tampering with the cookies.
  7. Showing the negotiated TLS version (and being able to downgrade to below TLS 1.2 and see it break)

I don't suppose that browsers will let us tamper with the HTTP version for a request (@mickhansen ?) - but would be great to allow for modification to, say, HTTP/1.0 and then see it break.

@nmoskaleva
Copy link
Collaborator Author

Awesome suggestions @sgryt, I don't think any of them were on the agenda 👍
Will look into it first thing after the holidays.

@fkj
Copy link
Collaborator

fkj commented Dec 23, 2025

I don't suppose that browsers will let us tamper with the HTTP version for a request (@mickhansen ?) - but would be great to allow for modification to, say, HTTP/1.0 and then see it break.

@sgryt I'm 99% sure you can't do this in the browser.

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.

5 participants