testcontainers / testcontainers/testcontainers-python
Bug: Keycloak container fails with 'HTTPS required'
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 2.3k
- フォーク
- 386
- 平均マージ
- 4時間 40分
- マージ済み PR(30日)
- 1
説明
Describe the bug
The basic example from Keycloak does not run.
There is actually another "solvable" bug that the library python-keycloak does not work on version 5.7.1 due to a missing import (KeycloakClient), and must be downgraded to 5.6.0
To Reproduce
I have used the exact example provided in the source code here:
from testcontainers.keycloak import KeycloakContainer
def test_keycloak_setup():
with KeycloakContainer(f"quay.io/keycloak/keycloak:25.0.4") as keycloak:
counts = keycloak.get_client().users_count()
print(counts)
I have also tried the example on the repo example_basic.py, and this one also does not run, but fails early since the API for the library has changed.
I understand that keycloak is sometimes a pain to setup with insecure options, and probably it needs extra options, but it's unclear from the docs that that is the case. Docs here:
https://testcontainers-python.readthedocs.io/en/latest/modules/keycloak/README.html
I could offer my help to tackle the issue for a working solution, the question is if the change is for documentation (keycloak is not expected to work out of the box) or configuration. It's also possible that it needs a realm import.
Runtime environment
# Get the operating system information (on a unix os).
$ uname -a
Darwin
# Get the python version.
$ python --version
3.10.11
# Get the docker version and other docker information.
$ docker info
Client:
Version: 28.3.2
Context: desktop-linux
Debug Mode: false
# Get all python packages.
$ pip freeze
testcontainers==4.12.0
python-keycloak==5.6.0
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
modules/keycloak/testcontainers/keycloak/init.py と modules/keycloak/example_basic.py から始め、Keycloak 25.0.4 と python-keycloak 5.6.0 を使って失敗を再現してください。issue にリンクされている Keycloak README を確認し、動作するセットアップに設定またはドキュメントの変更が必要かどうかを判断してください。基本的な例が正常に実行され、必要なセットアップが明確になれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- docker, python
- 領域
- authentication, testing
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100