Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/keycloak_authz_custom_policy/readme.adoc

raw
1 // Copyright (c) Ansible Project
2 // GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
3 // SPDX-License-Identifier: GPL-3.0-or-later
4
5 To be able to run these integration tests a keycloak server must be
6 reachable under a specific url with a specific admin user and password.
7 The exact values expected for these parameters can be found in
8 'vars/main.yml' file. A vanilla Keycloak server will not be sufficient:
9 you will need to deploy a custom JAR file with two policies:
10
11 * _MyPolicy1:_ policy-1.js
12 * _MyPolicy2:_ policy-2.js
13
14 To create a customized Keycloak test instance running on Podman first
15 install the "zip" command, go to the policy subdirectory and then do
16
17 [source,shell]
18 ----
19 ./build-policy.sh
20 podman build --tag keycloak_authz_custom_policy_test:1.0.0 .
21 podman rm mykeycloak && podman run --name mykeycloak -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=password -e KC_HTTP_RELATIVE_PATH=/auth localhost/keycloak_authz_custom_policy_test:1.0.0 start-dev
22 ----
23
24 This process probably also work with Docker just by replacing _podman_ with
25 _docker_. Modify the FROM argument in Containerfile to change Keycloak version
26 to test against. Quarkus versions of Keycloak should work - older versions
27 will not.