Skip to content

Conversation

@m-mohr
Copy link
Member

@m-mohr m-mohr commented Aug 22, 2025

Closes #558 and #338

Should be fully backward compatible as specified.

@m-mohr m-mohr linked an issue Aug 22, 2025 that may be closed by this pull request
@m-mohr m-mohr added this to the 1.3.0 milestone Aug 22, 2025
@m-mohr m-mohr moved this to In Progress in Next API release Aug 22, 2025
@m-mohr m-mohr self-assigned this Aug 22, 2025
@soxofaan
Copy link
Member

soxofaan commented Aug 29, 2025

One conflict that I'm still pondering on:

The basic auth option does not play nicely with JWT I think. The point of basic auth is to have a very simple, low overhead auth mechanism (a single /credentials/basic endpoint to produce tokens and the generic Authorization header for consumption). This is ideal for sandboxed testing/benchmark use cases, where one doesn't want to spend too much effort on a full auth stack.

To support JWT and the related mechanisms however you need to do quite a bit more: you have to set up an internal issuer service, possibly manage secrets (for signing), support multiple extra endpoints (.well-known/openid-configuration, /token, /userinfo, ...)

I'm not sure we should aim for removal of the openEO token format, as it will make basic auth practically unusable.

I would aim for something like:

  • OIDC:
    • recommend standard JWT
    • deprecate openEO token format, possibly removing support in later openEO API version
  • basic auth:
    • keep openEO token format
    • allow JWT usage, but nobody is probably going to do that

@m-mohr
Copy link
Member Author

m-mohr commented Aug 29, 2025

Is that really the case? Can't you just create a JWT using one of the JWT libraries? JWT is completely independant of OIDC, you certainly don't need the extra endpoints. https://jwt.io

Copy link
Member

@soxofaan soxofaan left a comment

Choose a reason for hiding this comment

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

some additional suggestions to further clarify the subtle differences between access and bearer tokens

@soxofaan
Copy link
Member

soxofaan commented Aug 29, 2025

Is that really the case? Can't you just create a JWT using one of the JWT libraries? JWT is completely independant of OIDC, you certainly don't need the extra endpoints.

Creating JWT tokens is indeed not a problem. The problem is that the backend must decode and verify that the tokens effectively come from the trusted OIDC issuer. So as far as I currently understand, you need one of:

  • get some public pub key of the OIDC issuer (a .well-known mechanism) to use in signature verification
  • send the token to the /userinfo endpoint of the issuer (which also involves discovery from .well-known/...) to let the issuer do the verification

And I even think that the second option is necessary to obtain extra info that is not in the token itself (e.g. user roles or that virtual org membership stuff from EGI)

Using /userinfo to do the verification and enrichment is what we currently do in the VITO implementation FYI

@m-mohr
Copy link
Member Author

m-mohr commented Aug 29, 2025

Well, but if the backend detects that it's from basic (e.g. by including that into the JWT), it can just skip all OIDC stuff and just check whether that token is valid. Whatever that means for the Basic JWT tokens, is up to the provider to decide. I don't really see a big difference to before, except that it's now JWT encoded.

I'll go through the proposed textual changes after next week. :-)

@m-mohr m-mohr requested a review from soxofaan September 8, 2025 16:12
m-mohr and others added 8 commits September 15, 2025 18:45
Co-authored-by: Stefaan Lippens <soxofaan@users.noreply.github.com>
Co-authored-by: Stefaan Lippens <soxofaan@users.noreply.github.com>
Co-authored-by: Stefaan Lippens <soxofaan@users.noreply.github.com>
@m-mohr m-mohr requested a review from soxofaan September 15, 2025 16:54
Copy link
Member

@soxofaan soxofaan left a comment

Choose a reason for hiding this comment

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

did another quick review round

@m-mohr
Copy link
Member Author

m-mohr commented Oct 21, 2025

@soxofaan I think all comments have been resolved. Can you re-review, please?

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

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Eliminate custom bearer token format

2 participants