Skip to content

Migrate from openEO-specific tokens to JWT #558#567

Merged
m-mohr merged 13 commits into
draftfrom
jwt-support
Oct 28, 2025
Merged

Migrate from openEO-specific tokens to JWT #558#567
m-mohr merged 13 commits into
draftfrom
jwt-support

Conversation

@m-mohr

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

Copy link
Copy Markdown
Member

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
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
@soxofaan

soxofaan commented Aug 29, 2025

Copy link
Copy Markdown
Member

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

m-mohr commented Aug 29, 2025

Copy link
Copy Markdown
Member Author

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

@soxofaan soxofaan left a comment

Copy link
Copy Markdown
Member

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

Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
@soxofaan

soxofaan commented Aug 29, 2025

Copy link
Copy Markdown
Member

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

m-mohr commented Aug 29, 2025

Copy link
Copy Markdown
Member Author

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
Comment thread openapi.yaml
Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
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

@soxofaan soxofaan left a comment

Copy link
Copy Markdown
Member

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

Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
@m-mohr

m-mohr commented Oct 21, 2025

Copy link
Copy Markdown
Member Author

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

@soxofaan soxofaan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

some more suggestions/minor questions

Comment thread openapi.yaml Outdated
Comment thread openapi.yaml Outdated
Comment thread openapi.yaml
Comment thread openapi.yaml Outdated
Co-authored-by: Stefaan Lippens <soxofaan@users.noreply.github.com>
@m-mohr
m-mohr requested a review from soxofaan October 28, 2025 17:05
@m-mohr

m-mohr commented Oct 28, 2025

Copy link
Copy Markdown
Member Author

Thanks, updated.

@soxofaan soxofaan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 ready to merge I think

@m-mohr
m-mohr merged commit 5f6aab6 into draft Oct 28, 2025
2 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Next API release Oct 28, 2025
@m-mohr
m-mohr deleted the jwt-support branch October 28, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Eliminate custom bearer token format

2 participants