summaryrefslogtreecommitdiffstats
path: root/src/tests/keywords/radiusd.conf
blob: 58cb356c8845aec97a529973a2bba248cea824b2 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#
#  Minimal radiusd.conf for testing keywords
#

raddb		= raddb
keyword		= src/tests/keywords

modconfdir	= ${raddb}/mods-config

correct_escapes	= true

#  Only for testing!
#  Setting this on a production system is a BAD IDEA.
security {
	allow_vulnerable_openssl = yes
}

modules {
	$INCLUDE ${raddb}/mods-enabled/always

	$INCLUDE ${raddb}/mods-enabled/pap

	$INCLUDE ${raddb}/mods-enabled/expr

	$INCLUDE ${raddb}/mods-enabled/unpack

	test {

	}

	unix {
	}

	cache {
		driver = "rlm_cache_rbtree"

		key = "%{Tmp-String-0}"
		ttl = 2

		update {
			&request:Tmp-String-1 := &control:Tmp-String-1
			&request:Tmp-Integer-0 := &control:Tmp-Integer-0
			&control: += &reply:
		}

		add_stats = yes
	}
}

policy {
	#
	#  Outputs the contents of the control list in debugging (-X) mode
	#
	debug_control {
		if("%{debug_attr:control:}" == '') {
			noop
		}
	}

	#
	#  Outputs the contents of the request list in debugging (-X) mode
	#
	debug_request {
		if("%{debug_attr:request:}" == '') {
			noop
		}
	}

	#
	#  Outputs the contents of the reply list in debugging (-X) mode
	#
	debug_reply {
		if("%{debug_attr:reply:}" == '') {
			noop
		}
	}

	#
	#  Outputs the contents of the main lists in debugging (-X) mode
	#
	debug_all {
		debug_control
		debug_request
		debug_reply
	}

	#
	#  Just check that this can be referred to as "virtual_policy.post-auth"
	#
	virtual_policy {
		ok
	}

	with.dots {
		ok
	}
}

instantiate {
	#
	#  Just check that this can be referred to as "virtual_instantiate.post-auth"
	#
	load-balance virtual_instantiate {
		ok
		ok
	}
}

server default {
	authorize {
		update control {
			Cleartext-Password := 'hello'
		}

		#
		# Include the test file specified by the
		# KEYWORD environment variable.
		#
		$INCLUDE ${keyword}/$ENV{KEYWORD}

		pap
	}

	authenticate {
		pap
	}
}