-
Notifications
You must be signed in to change notification settings - Fork 6
Description
When I do
oidc create public test --issuer https://example.com/auth/oauth2/realms/root --client-id fooon an internal corporate issuer I'm working with, I get (cf. the additional port 443):
Validation error: unexpected issuer URI `https://example.com:443/auth/oauth2/realms/root` (expected `https://example.com/auth/oauth2/realms/root`)
Doing
oidc create public test --issuer https://example.com:443/auth/oauth2/realms/root --client-id fooresults in the same error.
I'm not overly familiar with Rust nor with OIDC, but I've looked into this a little bit and AFAICT, there's four places I could raise this issue with:
- oidc-cli
- rust-url (which you use to parse the issuer URL provided on the CLI)
- openidconnect-rs (since it ultimately raises the above error)
- the corporate issuer (they've included the superfluous port in their config)
I hope you don't mind that I'm starting with you 😛.
From a user perspective I feel like I should be able to specify the superfluous port in my issuer URL and have oidc-cdi consider it. AFAICT this information is lost as soon as rust-url parses the URL because it never keeps default ports. I can't tell if there's a reasonable way for you to work around that.
rust-url implements the URL standard, which says that default ports are to be set to null. So it does what it's supposed to do.
I can't tell, if openidconnect-rs should ignore default ports when comparing URLs. Happy to raise the issue there, however, if you think that's the right place.
I'll definitely try 4., but I don't expect too much there, even if what they do is in violation of some standard (which I haven't been able to verify up until this point). God knows what might break if they change that so they'll probably not do it without a very good reason and I fear my discomfort in not being able to use oidc-cli is not good enough of a reason 😛.