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

Allow for custom providers hosted on maven repositories #223

Merged

Conversation

hwo-wd
Copy link
Collaborator

@hwo-wd hwo-wd commented May 13, 2024

Extends support for custom providers ("SPIs"): while previously only http downloads were supported, the new provider definition allows for maven downloads (e.g., Apache Maven Central, Github Apache Maven (requires authn via a PAT)).

The new providers definition looks like:

keycloak_quarkus_providers:
  - id: http-client                         # required
    spi: connections                        # required if url is not specified
  - id: http-client                         # required; "{{ id }}.jar" identifies the file name on RHBK
    spi: connections                        # required if neither url, local_path nor maven are specified; required for setting properties
    default: true                           # optional, whether to set default for spi, default false
    restart: true                           # optional, whether to restart, default true
    url: https://.../.../custom_spi.jar     # optional, url for download
    url: https://.../.../custom_spi.jar     # optional, url for download via http
    local_path: my_theme_spi.jar            # optional, path on local controller for SPI to be uploaded
    maven:                                  # optional, for download using maven
      repository_url: https://maven.pkg.github.com/OWNER/REPOSITORY # optional, maven repo url
      group_id:  my.group                   # optional, maven group id
      artifact_id: artifact                 # optional, maven artifact id
      version: 24.0.4                       # optional, defaults to latest
      username:  user                       # optional, cf. https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-to-github-packages
      password: pat                         # optional, provide a PAT for accessing Github's Apache Maven registry
    properties:                             # optional, list of key-values
  • lxml is a new python dependency for this collection (however, it was already present because it is also a dependency of middleware_automation.common

Close #222

@hwo-wd hwo-wd changed the title Feature/222 mvn providers Feature/222 keycloak_quarkus: Add support for custom providers hosted on MVN May 13, 2024
@hwo-wd hwo-wd requested a review from guidograzioli May 13, 2024 15:25
@hwo-wd hwo-wd marked this pull request as draft May 14, 2024 06:45
requirements.yml Outdated Show resolved Hide resolved
@hwo-wd
Copy link
Collaborator Author

hwo-wd commented May 14, 2024

We now support three different kinds of providers:

  • url: http download for SPIs not requiring authentication
  • maven: maven download for SPIs hosted publicly on Apache Maven Central or private Maven repositories like Github Maven requiring authentication
  • local_path: static SPIs to be uploaded

I think this pretty much covers the majority of use cases;
future improvements might be:

  • allow for authn on http (e.g. download from private Github releases), but this opens up the authn topic: basic vs. ...
  • allow for latest urls on Github (since, I guess, we don't follow redirects), but having a statically fixed version is better practice anyway

@hwo-wd hwo-wd force-pushed the feature/222_mvn_providers branch from 8eb6efe to d87c8ca Compare May 14, 2024 08:14
@hwo-wd hwo-wd marked this pull request as ready for review May 14, 2024 09:55
@hwo-wd hwo-wd requested a review from guidograzioli May 14, 2024 09:58
@hwo-wd hwo-wd force-pushed the feature/222_mvn_providers branch from 317c041 to 6ca99c0 Compare May 14, 2024 09:58
@hwo-wd hwo-wd force-pushed the feature/222_mvn_providers branch 2 times, most recently from 4769c48 to f962bde Compare May 14, 2024 18:29
@hwo-wd hwo-wd force-pushed the feature/222_mvn_providers branch from f962bde to d2ece93 Compare May 14, 2024 18:33
Copy link
Member

@guidograzioli guidograzioli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good

@guidograzioli guidograzioli added the major_changes Major changes mean the user can CHOOSE to make a change when they update but do not have to label May 15, 2024
@guidograzioli guidograzioli changed the title Feature/222 keycloak_quarkus: Add support for custom providers hosted on MVN Allow for custom providers hosted on maven repositories May 15, 2024
@guidograzioli guidograzioli merged commit 477ce5e into ansible-middleware:main May 15, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major_changes Major changes mean the user can CHOOSE to make a change when they update but do not have to
Projects
None yet
Development

Successfully merging this pull request may close these issues.

keycloak_quarkus: Add support for custom providers hosted on MVN
2 participants