Skip to content

Commit 37353d5

Browse files
committed
Merge branch 'main' of github.com:Altinity/clickhouse-regression
2 parents 04e28f2 + 59a0924 commit 37353d5

File tree

5 files changed

+306
-279
lines changed

5 files changed

+306
-279
lines changed

docker-compose/keeper-service.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
- KEEPER_SERVER_ID=1
2020
healthcheck:
2121
test: ["CMD-SHELL",
22-
"if echo $CLICKHOUSE_TESTS_KEEPER_DOCKER_IMAGE | grep -Eq '22\\.8|23\\.3|23\\.8' ; \
22+
"if echo $CLICKHOUSE_TESTS_KEEPER_BIN_PATH | grep -Eq '22\\.8|23\\.3|23\\.8' ; \
2323
then ps aux | grep '[c]lickhouse-keeper' >/dev/null 2>&1 ; \
2424
else curl -f http://localhost:9182/ready ; fi || exit 1"]
2525
interval: 10s

oauth/envs/keycloak/keycloak_env/configs/clickhouse/users.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929

3030
<!-- Users and ACL. -->
3131
<users>
32+
<jwt_user>
33+
<jwt>
34+
</jwt>
35+
<profile>default</profile>
36+
<quota>default</quota>
37+
</jwt_user>
3238
<!-- If user name was not specified, 'default' user is used. -->
3339
<default>
3440
<!-- Password could be specified in plaintext or in SHA256 (in hex format).

oauth/tests/steps/jwt.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from cryptography.hazmat.backends import default_backend
2+
from cryptography.hazmat.primitives.asymmetric import rsa
3+
from cryptography.hazmat.primitives import serialization
4+
5+
6+
def generate_private_key(public_exponent=65537, key_size=2048, file_name="new_private_key"):
7+
private_key = rsa.generate_private_key(
8+
public_exponent=public_exponent,
9+
key_size=key_size,
10+
backend=default_backend()
11+
)
12+
13+
pem_private_key = private_key.private_bytes(
14+
encoding=serialization.Encoding.PEM,
15+
format=serialization.PrivateFormat.TraditionalOpenSSL,
16+
encryption_algorithm=serialization.NoEncryption()
17+
)
18+
19+
with open(file_name, "wb") as pem_file:
20+
pem_file.write(pem_private_key)

0 commit comments

Comments
 (0)