Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discourage obtaining the KeycloakSession by means other than when creating a provider #29107

Open
pedroigor opened this issue Apr 26, 2024 · 2 comments
Labels
area/core kind/enhancement Categorizes a PR related to an enhancement priority/important Must be worked on very soon team/cloud-native team/core-shared

Comments

@pedroigor
Copy link
Contributor

Description

In order to avoid coupling extensions with technologies from the underlying stack used by the server and not fully-supported we need a consistent and supported mechanism to obtain the KeycloakSession when developing custom extensions.

Extensions should favor obtaining the session whenever they are creating Provider instances from their corresponding ProviderFactory and any other mechanism to do that should not be supported or exposed.

As an example, the fact we currently support CDI does not mean that Keycloak supports CDI so using its APIs should be discouraged. A similar approach was taken when removing JAX-RS injection points from our REST layer for JAX-RS specific beans such as the request and response objects.

The main goal here is long-term maintainability and backward compatibility.

Discussion

#28182

Motivation

The main goal here is long-term maintainability and backward compatibility.

Details

No response

@pedroigor pedroigor added kind/enhancement Categorizes a PR related to an enhancement status/triage labels Apr 26, 2024
@pedroigor
Copy link
Contributor Author

pedroigor commented Apr 26, 2024

We probably want to make more explicit in our docs the technologies we support too:

  • JAX-RS and how much of its API we support. For instance, mapping annotations.
  • Hibernate. For instance, mapping annotations, ÈntityManager (or parts of it)
  • ?

@shawkins
Copy link
Contributor

shawkins commented May 6, 2024

JAX-RS and how much of its API we support. For instance, mapping annotations.

This is the existing doc note:

NOTE: While it is possible to install other JAX-RS components via the providers extension mechanism, such as filters and interceptors, these are not officially supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core kind/enhancement Categorizes a PR related to an enhancement priority/important Must be worked on very soon team/cloud-native team/core-shared
Projects
None yet
Development

No branches or pull requests

2 participants