summaryrefslogtreecommitdiffstats
path: root/src/tests/modules/rest/module.conf
blob: ecfaa53c8fe5da8d5c524a87aa13bbcf43e62d91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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&section=accounting"
		method = 'POST'
		body = 'json'
		data = '{"NAS": "%{NAS-IP-Address}", "Password": "%{User-Password}", "Verify": true}'
		tls = ${..tls}
	}
}