Support OIDC hybrid application type #12320
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #12297
This PR introduces a
hybrid
application type. Effectively it allows the users to optimize the configuration, collapse 2 nearly identical tenant configuration into one, see the test,tenant-hybrid-webapp
+tenant-hybrid-service
vs a singletenant-hybrid-webapp-service
in the situations where a user wants to drive the authentication based on the presence of theAuthorization
header. If it is set - it is Bearer auth, if not - code flow.This is a visible optimization and to be honest I'd not be too keen on it because one can just avoid this static configuration duplication with
TenantConfigResolver
but the main saving comes from sharing a single Keycloak connection.When we have 2 tenants then per every tenant there will be its own Vert.X OAuth connection - which is fine when one has different realms, but in this case, one would also have a duplicate local JWT set copy, which is sub-optimal.
So,
hybrid
does not introduce any new flow, it simply allows to optimize the way the 2 tenants which differ only by its type (service
vsweb-app
) can be configured