diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 14:11:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 14:11:00 +0000 |
commit | af754e596a8dbb05ed8580c342e7fe02e08b28e0 (patch) | |
tree | b2f334c2b55ede42081aa6710a72da784547d8ea /src/tests/modules/rest/module.conf | |
parent | Initial commit. (diff) | |
download | freeradius-af754e596a8dbb05ed8580c342e7fe02e08b28e0.tar.xz freeradius-af754e596a8dbb05ed8580c342e7fe02e08b28e0.zip |
Adding upstream version 3.2.3+dfsg.upstream/3.2.3+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tests/modules/rest/module.conf')
-rw-r--r-- | src/tests/modules/rest/module.conf | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/tests/modules/rest/module.conf b/src/tests/modules/rest/module.conf new file mode 100644 index 0000000..ecfaa53 --- /dev/null +++ b/src/tests/modules/rest/module.conf @@ -0,0 +1,46 @@ +#rest unit test config +json { +} + +rest { + tls { + ca_info_file = "$ENV{top_srcdir}raddb/restcerts/ca.pem" + + private_key_password = "whatever" + + random_file = /dev/urandom + + check_cert_cn = no + } + + connect_uri = "http://$ENV{REST_TEST_SERVER}:$ENV{REST_TEST_SERVER_PORT}/" + + xlat { + body_uri_encode = no + timeout = 0.5 + tls = ${..tls} + } + + authorize { + uri = "${..connect_uri}/user/%{User-Name}/mac/%{Called-Station-ID}?section=authorize" + method = "GET" + tls = ${..tls} + } + + authenticate { + uri = "https://$ENV{REST_TEST_SERVER}:$ENV{REST_TEST_SERVER_SSL_PORT}/auth?section=authenticate" + method = "POST" + tls = ${..tls} + body = 'post' + data = 'user=%{User-Name}' + auth = 'basic' + } + + accounting { + uri = "https://$ENV{REST_TEST_SERVER}:$ENV{REST_TEST_SERVER_SSL_PORT}/user/%{User-Name}/mac/%{Called-Station-ID}?action=post-auth§ion=accounting" + method = 'POST' + body = 'json' + data = '{"NAS": "%{NAS-IP-Address}", "Password": "%{User-Password}", "Verify": true}' + tls = ${..tls} + } +} |