Skip to content

Commit

Permalink
Default to Keycloak 21.0.1 and Use OpenJDK 17 where possible (#283)
Browse files Browse the repository at this point in the history
* Default to Keycloak 21.0.1
Use OpenJDK 17 where possible

* For mappers test download jar from osc-keycloak-scripts release page
  • Loading branch information
treydock authored Apr 5, 2023
1 parent aa42c7a commit b11dad0
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 53 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,15 @@ jobs:
- "puppet6"
- "puppet7"
keycloak_version:
- "19.0.3"
- "21.0.1"
keycloak_full:
- "no"
include:
- set: "el7"
puppet: "puppet6"
keycloak_version: "19.0.3"
keycloak_full: "yes"
- set: "el7"
puppet: "puppet7"
keycloak_version: "19.0.3"
keycloak_full: "yes"
- set: "el7"
- set: "el8"
puppet: "puppet6"
keycloak_version: "21.0.1"
keycloak_full: "yes"
- set: "el7"
- set: "el8"
puppet: "puppet7"
keycloak_version: "21.0.1"
keycloak_full: "yes"
Expand Down
13 changes: 2 additions & 11 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,14 @@ Rakefile:
- puppet6
- puppet7
keycloak_version:
- '19.0.3'
- '21.0.1'
keycloak_full: ['no']
acceptance_includes:
- set: el7
puppet: puppet6
keycloak_version: 19.0.3
keycloak_full: 'yes'
- set: el7
puppet: puppet7
keycloak_version: 19.0.3
keycloak_full: 'yes'
- set: el7
- set: el8
puppet: puppet6
keycloak_version: 21.0.1
keycloak_full: 'yes'
- set: el7
- set: el8
puppet: puppet7
keycloak_version: 21.0.1
keycloak_full: 'yes'
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ This module may work on earlier versions but this is the only version tested.
| 12.x - 16.x | 7.x |
| 18.x | 8.x |
| 19.x - 21.x | 9.x |
| 21.x | 10.x |

## Usage

Expand Down
8 changes: 4 additions & 4 deletions data/os/Debian.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
keycloak::java_declare_method: include
keycloak::java_package: openjdk-11-jdk
keycloak::java_home: /usr/lib/jvm/java-1.11.0-openjdk-amd64/
keycloak::java_alternative_path: /usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java
keycloak::java_alternative: java-1.11.0-openjdk-amd64
keycloak::java_package: openjdk-17-jdk
keycloak::java_home: /usr/lib/jvm/java-1.17.0-openjdk-amd64/
keycloak::java_alternative_path: /usr/lib/jvm/java-1.17.0-openjdk-amd64/bin/java
keycloak::java_alternative: java-1.17.0-openjdk-amd64
keycloak::user_shell: '/usr/sbin/nologin'
keycloak::libunix_dbus_java_build_dependencies:
- 'zlib1g-dev'
Expand Down
4 changes: 4 additions & 0 deletions data/os/Debian/10.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
keycloak::java_package: openjdk-11-jdk
keycloak::java_home: /usr/lib/jvm/java-1.11.0-openjdk-amd64/
keycloak::java_alternative_path: /usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java
keycloak::java_alternative: java-1.11.0-openjdk-amd64
8 changes: 4 additions & 4 deletions data/os/RedHat.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
keycloak::java_package: java-11-openjdk-devel
keycloak::java_home: /usr/lib/jvm/java-11-openjdk/
keycloak::java_alternative_path: /usr/lib/jvm/java-11-openjdk/bin/java
keycloak::java_alternative: /usr/lib/jvm/java-11-openjdk/bin/java
keycloak::java_package: java-17-openjdk-devel
keycloak::java_home: /usr/lib/jvm/java-17-openjdk/
keycloak::java_alternative_path: /usr/lib/jvm/java-17-openjdk/bin/java
keycloak::java_alternative: /usr/lib/jvm/java-17-openjdk/bin/java
keycloak::user_shell: '/sbin/nologin'
keycloak::libunix_dbus_java_build_dependencies:
- 'which'
Expand Down
4 changes: 4 additions & 0 deletions data/os/RedHat/7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
keycloak::java_package: java-11-openjdk-devel
keycloak::java_home: /usr/lib/jvm/java-11-openjdk/
keycloak::java_alternative_path: /usr/lib/jvm/java-11-openjdk/bin/java
keycloak::java_alternative: /usr/lib/jvm/java-11-openjdk/bin/java
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
# Only necessary to set if the URL path to Keycloak is modified
class keycloak (
Boolean $manage_install = true,
String $version = '19.0.3',
String $version = '21.0.1',
Optional[Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]] $package_url= undef,
Optional[Stdlib::Absolutepath] $install_dir = undef,
Enum['include','class'] $java_declare_method = 'class',
Expand Down
6 changes: 3 additions & 3 deletions spec/acceptance/6_protocol_mapper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ class { 'keycloak': }
class { 'keycloak':
features => ['scripts'],
}
keycloak::spi_deployment { 'mappers':
deployed_name => 'mappers.jar',
source => 'file:///tmp/mappers.jar',
keycloak::spi_deployment { 'osc-keycloak-scripts':
deployed_name => 'osc-keycloak-scripts-jar-with-dependencies.jar',
source => 'https://github.com/OSC/osc-keycloak-scripts/releases/download/1.0.0/osc-keycloak-scripts-jar-with-dependencies.jar',
}
keycloak_realm { 'test': ensure => 'present' }
keycloak_client_scope { 'saml on test':
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
let(:facts) do
facts.merge(concat_basedir: '/dne')
end
let(:version) { '19.0.3' }
let(:version) { '21.0.1' }

case facts[:osfamily]
when %r{RedHat}
Expand Down
1 change: 0 additions & 1 deletion spec/defines/freeipa_ldap_mappers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
describe 'keycloak::freeipa_ldap_mappers' do
on_supported_os.each do |os, _facts|
context "on #{os}" do
let(:version) { '12.0.4' }
let(:title) { 'ipa.example.org' }
let(:params) do
{
Expand Down
1 change: 0 additions & 1 deletion spec/defines/freeipa_user_provider_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
describe 'keycloak::freeipa_user_provider' do
on_supported_os.each do |os, _facts|
context "on #{os}" do
let(:version) { '12.0.4' }
let(:title) { 'ipa.example.org' }
let(:default_params) do
{
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/spi_deployment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
let(:facts) do
facts.merge(concat_basedir: '/dne')
end
let(:version) { '19.0.3' }
let(:version) { '21.0.1' }
let(:title) { 'duo-spi' }
let(:params) { { deployed_name: 'keycloak-duo-spi-jar-with-dependencies.jar', source: 'https://example.com/files/keycloak-duo-spi-jar-with-dependencies.jar' } }

Expand Down
Binary file removed spec/fixtures/mappers.jar
Binary file not shown.
12 changes: 0 additions & 12 deletions spec/fixtures/mappers/META-INF/keycloak-scripts.json

This file was deleted.

1 change: 0 additions & 1 deletion spec/fixtures/mappers/x500-displayName.js

This file was deleted.

3 changes: 1 addition & 2 deletions spec/spec_helper_acceptance_setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RSpec.configure do |c|
c.add_setting :keycloak_version
keycloak_version = if ENV['BEAKER_keycloak_version'].nil? || ENV['BEAKER_keycloak_version'].empty?
'19.0.3'
'21.0.1'
else
ENV['BEAKER_keycloak_version']
end
Expand All @@ -14,7 +14,6 @@

proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
scp_to(hosts, File.join(proj_root, 'spec/fixtures/DuoUniversalKeycloakAuthenticator-jar-with-dependencies.jar'), '/tmp/DuoUniversalKeycloakAuthenticator-jar-with-dependencies.jar')
scp_to(hosts, File.join(proj_root, 'spec/fixtures/mappers.jar'), '/tmp/mappers.jar')

hiera_yaml = <<-HIERA_YAML
---
Expand Down

0 comments on commit b11dad0

Please sign in to comment.