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

Fix #824 - Introduce a separated OIDC module to hold security dependencies #872

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

ricardozanini
Copy link
Member

@ricardozanini ricardozanini commented Nov 25, 2024

Fix #824

In this PR:

  • Removed references of OIDC libraries from the main runtime module
  • I created a separate quarkus-openapi-generator-oidc component to hold OIDC use cases; users now MUST add this new dependency to their project in case OIDC is required.
  • Review the integration-tests module to remove OIDC from every module; just add to security where it's really required.
  • Updated documentation.

Many thanks for submitting your Pull Request ❤️!

Please make sure that your PR meets the following requirements:

  • You have read the contributors guide
  • Your code is properly formatted according to our code style
  • Pull Request title contains the target branch if not targeting main: [0.9.x] Subject
  • Pull Request contains link to the issue
  • Pull Request contains link to any dependent or related Pull Request
  • Pull Request contains description of the issue
  • Pull Request does not include fixes for issues other than the main ticket
How to backport a pull request to a different branch?

In order to automatically create a backporting pull request please add one or more labels having the following format backport-<branch-name>, where <branch-name> is the name of the branch where the pull request must be backported to (e.g., backport-quarkus2 to backport the original PR to the quarkus2 branch).

NOTE: backporting is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.

Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.

If something goes wrong, the author will be notified and at this point a manual backporting is needed.

NOTE: this automated backporting is triggered whenever a pull request on main branch is labeled or closed, but both conditions must be satisfied to get the new PR created.

Signed-off-by: Ricardo Zanini <[email protected]>
@Postremus
Copy link
Contributor

works for me, quarkus starts now with quarkus-hibernate-validator.

@ricardozanini
Copy link
Member Author

@gastaldi do I have to do anything else to release the new module?

@gastaldi
Copy link
Member

gastaldi commented Nov 26, 2024

@ricardozanini you can use conditional dependencies to have your module added automatically when quarkus-oidc is available: https://quarkus.io/guides/conditional-extension-dependencies

@gastaldi
Copy link
Member

@gastaldi do I have to do anything else to release the new module?

No, it should work as usual

@ricardozanini
Copy link
Member Author

@ricardozanini you can use conditional dependencies to have your module added automatically when quarkus-oidc is available: https://quarkus.io/guides/conditional-extension-dependencies

oh nice! I'll do that then :D

@ricardozanini
Copy link
Member Author

After reviewing the code base to add these conditionals, I'd have to create a new oidc extension and two additional modules, auth and config, to support this use case. Then, move all the authentication-related generation codes to auth and the OIDC to oidc. We would end up with five additional modules.

It's unnecessary to add all this complexity to the code base at this moment. OIDC support will work if users can add the new module we introduced today to their dependencies.

This new way of generating authentication classes did more harm than good. This rework should have been done in the original PR, but I don't have time to implement it now. If someone from the community is interested, please let me know.

@ricardozanini ricardozanini merged commit e5993bf into quarkiverse:main Nov 27, 2024
9 checks passed
@ricardozanini ricardozanini deleted the issue-824 branch November 27, 2024 20:12
github-actions bot pushed a commit that referenced this pull request Nov 27, 2024
…ncies (#872)

* Fix #824 - Introduce a separated OIDC module to hold security dependencies

Signed-off-by: Ricardo Zanini <[email protected]>

* Fix  parent module

Signed-off-by: Ricardo Zanini <[email protected]>

---------

Signed-off-by: Ricardo Zanini <[email protected]>
ricardozanini added a commit that referenced this pull request Dec 2, 2024
…ncies (#872) (#874)

* Fix #824 - Introduce a separated OIDC module to hold security dependencies



* Fix  parent module



---------

Signed-off-by: Ricardo Zanini <[email protected]>
Co-authored-by: Ricardo Zanini <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build fails if quarkus-oidc-client is not in the classpath
6 participants