mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-31 03:18:43 -06:00
Fixes a bug where we had expiring certificates and JWTs in the repository and old commits of the repository would stop passing integration tests and some time in the future.
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
tests:
|
|
- name: jwt auth from config
|
|
repos:
|
|
- name: repo1
|
|
with_files:
|
|
- name: chain_key.pem
|
|
source_path: $TESTGENDIR/rsa_key.pem
|
|
- name: chain_cert.pem
|
|
source_path: $TESTGENDIR/rsa_chain.pem
|
|
- name: test_jwks.json
|
|
source_path: $TESTGENDIR/test_jwks.json
|
|
- name: server.yaml
|
|
contents: |
|
|
listener:
|
|
tls_key: chain_key.pem
|
|
tls_cert: chain_cert.pem
|
|
require_secure_transport: true
|
|
jwks:
|
|
- name: jwksname
|
|
location_url: file:///test_jwks.json
|
|
claims:
|
|
alg: RS256
|
|
aud: my_resource
|
|
sub: test_jwt_user
|
|
iss: dolthub.com
|
|
fields_to_log: [on_behalf_of,id]
|
|
server:
|
|
args: ["--config", "server.yaml"]
|
|
connections:
|
|
- on: repo1
|
|
queries:
|
|
- exec: "CREATE USER test_jwt_user@'127.0.0.1' IDENTIFIED WITH authentication_dolt_jwt AS 'jwks=jwksname,sub=test_jwt_user,iss=dolthub.com,aud=my_resource'"
|
|
- exec: "GRANT ALL ON *.* TO test_jwt_user@'127.0.0.1' WITH GRANT OPTION"
|
|
- on: repo1
|
|
user: test_jwt_user
|
|
password_file: $TESTGENDIR/token.jwt
|
|
driver_params:
|
|
allowCleartextPasswords: "true"
|
|
queries:
|
|
- query: "select 2+2 from dual"
|
|
result:
|
|
columns: ["2+2"]
|
|
rows: [["4"]]
|