Skip to content

Validation error: unexpected issuer URI #19

@findesgh

Description

@findesgh

When I do

oidc create public test --issuer https://example.com/auth/oauth2/realms/root --client-id foo

on 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 foo

results 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:

  1. oidc-cli
  2. rust-url (which you use to parse the issuer URL provided on the CLI)
  3. openidconnect-rs (since it ultimately raises the above error)
  4. 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 😛.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions