8000 Remove any unnecessary dependency from distribution · Issue #9075 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Remove any unnecessary dependency from distribution #9075

Closed

Description

@pedroigor

Description

Not only to reduce the distribution size but also to reduce the vulnerability surface, we should review the dependencies included in the distribution and keep only those strictly necessary to runtime and re-augmentation.

As the server is a mutable jar, these additional dependencies are a trade-off as part of continuous testing support from Quarkus. However, in theory, these dependencies won't actually be loaded in the runtime application.

Discussion

No response

Motivation

Not only to reduce the distribution size but also to reduce the vulnerability surface, we should review the dependencies included in the distribution and keep only those strictly necessary to runtime and re-augmentation.

Details

Looks like the best approach should be to exclude these dependencies through Maven (instead of using Quarkus properties such as quarkus.class-loading.removed-artifacts).

The proposal is to have a specific profile in the root pom that explicitly excludes the unwanted dependencies. The trade-off here is that we need to make sure the distribution is built using this profile.

Activity

  1. added
    kind/enhancementCategorizes a PR related to an enhancement
    area/dist/quarkusQuarkus distribution — packaging, container images, server config (kc.sh)
    on Dec 10, 2021
  2. self-assigned this
    on Dec 10, 2021
  3. added this to the 17.0.0 milestone on Dec 10, 2021
  4. pedroigor commented on Dec 10, 2021

    @pedroigor
    ContributorAuthor

    Sent #9077. I'm still investigating an issue related to the quarkus-vault extension where testcontainers dependencies can not be be excluded for this one due to compilation errors when running augmentation. Looks like this extension is running (or referencing) dev mode related code when not running dev mode but it shoudln't (similar to other extensions).

  5. pedroigor commented on Dec 10, 2021

    @pedroigor
    ContributorAuthor
  6. modified the milestones: 17.0.0, 16.0.0 on Dec 13, 2021
  7. 15 remaining items

  8. trixpan commented on Jul 21, 2022

    @trixpan
    Contributor

    @DGuhr thanks for the write up. I am 100% in agreement with the approach suggested and glad the concerns of community are being taken care of. ;-)

  9. modified the milestones: 19.0.0, 20.0.0 on Jul 26, 2022
  10. modified the milestones: 20.0.0, 21.0.0 on Oct 13, 2022
  11. vmuzikar commented on Jan 12, 2023

    @vmuzikar
    Contributor

    Will be (partially) resolved by #9144

  12. modified the milestones: 21.0.0, 22.0.0 on Feb 17, 2023
  13. vmuzikar commented on May 17, 2023

    @vmuzikar
    Contributor

    Consider removing:

    ./lib/lib/deployment/org.testcontainers.mariadb-1.17.6.jar
    ./lib/lib/deployment/org.testcontainers.database-commons-1.17.6.jar
    ./lib/lib/deployment/org.testcontainers.oracle-xe-1.17.6.jar
    ./lib/lib/deployment/org.testcontainers.jdbc-1.17.6.jar
    ./lib/lib/deployment/org.testcontainers.postgresql-1.17.6.jar
    ./lib/lib/deployment/org.testcontainers.mysql-1.17.6.jar
    ./lib/lib/deployment/org.testcontainers.testcontainers-1.17.6.jar
    ./lib/lib/deployment/org.testcontainers.mssqlserver-1.17.6.jar
    ./lib/lib/deployment/io.quarkus.quarkus-devservices-postgresql-3.0.2.Final.jar
    ./lib/lib/deployment/io.quarkus.quarkus-devservices-mysql-3.0.2.Final.jar
    ./lib/lib/deployment/io.quarkus.quarkus-devservices-h2-3.0.2.Final.jar
    ./lib/lib/deployment/io.quarkus.quarkus-devservices-mariadb-3.0.2.Final.jar
    ./lib/lib/deployment/io.quarkus.quarkus-devservices-common-3.0.2.Final.jar
    ./lib/lib/deployment/io.quarkus.quarkus-devservices-deployment-3.0.2.Final.jar
    ./lib/lib/deployment/io.quarkus.quarkus-devservices-oracle-3.0.2.Final.jar
    ./lib/lib/deployment/io.quarkus.quarkus-devservices-mssql-3.0.2.Final.jar
    
  14. added a commit that references this issue on Jul 4, 2023
    eb0e23f
  15. added a commit that references this issue on Jan 30, 2024
    3f4d971
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/dist/quarkusQuarkus distribution — packaging, container images, server config (kc.sh)kind/enhancementCategorizes a PR related to an enhancementstatus/needs-discussionPR needs discussion on developer mailing listteam/cloud-native

Type

No type

Fields

No fields configured for issues without a type.

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

0