-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Rename OIDC Tenant annotation to TenantFeature #34862
Conversation
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it also make sense to add a note to the Javadoc of the 3.2 branch warning that the annotation is experimental?
That way any people that start using it from now on (likely very few) will at least have an expectation that things can change?
Let's merge this one. |
@geoand Sounds good, can you approve please :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💪🏼
@michalvavrik Please pick this change up in your PR :-) |
quarkus.oidc.Tenant
annotation was introduced in3.2.0
after we discussed with @geoand how we can let users associate some OIDC features with individual OIDC tenants without having to introduce new properties and rely on named beans.At the moment
@Tenant
can only be recognized if it is added to a customTokenCustomizer
interface implementation. As it happens, the only real case we've had so far is related to usingTokenCustomizer
to support preprocessing some Azure tokens - but we shipAzureTokenCustomizer
which is a named bean which can be wired in with specific tenants using a configuration property.It is very unlikely that, since 3.2.0 was released, that there was any other, non Azure related case requiring the token customization in a multi-tenant setup. It can become more realistic with more features supported by custom beans will be introduced.
The reason I've been clarifying all of the above is that we have an enhancement request to be able to bind tenant configurations to JAX-RS classes or methods, and @michalvavrik opened a nice PR, #34833, where using
@Tenant
annotation makes perfect sense.However, now we have a dual application of
@Tenant
:@Tenant
to some feature interface implementing bean, likeCustomTokenCustomizer
@Tenant
application toMethod
- which does not make sense for the original case where it can only be a class level annotation.We've discussed it with @michalvavrik in #34833.
It does seem that this is the right time to rename originally misnamed
@Tenant
to@TenantFeature
- with nearly 0% of breaking any user code at this point of time (see some reasoning above), and have@TenantFeature
used for doing the feature binding to specific tenant configurations which is what@Tenant
was originally meant for, while continuing using@Tenant
but for new, better scoped purposes - apply specific tenant configuration to JAX-RS methods.I'll add a migration note - but as I said, I'm fairly confident this technically breaking change won't affect 3.2.x users.
@geoand Can you please comment/review since we worked together on the original
@Tenant
?