Skip to content
Snippets Groups Projects
Commit d857d620 authored by Nathan Ward's avatar Nathan Ward
Browse files

Update templates to be based on FreeRADIUS 3.0.21 config files

Fix indent things

Revert
parent c2d1984e
No related branches found
No related tags found
No related merge requests found
Showing
with 2261 additions and 1550 deletions
......@@ -14,7 +14,8 @@ describe 'freeradius::krb5' do
it do
is_expected.to contain_file('/etc/raddb/mods-available/test')
.with_content(%r{^krb5 test \{\n\s+keytab = test_keytab\n\s+service_principal = test_principal\n})
.with_content(%r{^\s+keytab = test_keytab$})
.with_content(%r{^\s+service_principal = test_principal$})
.with_ensure('present')
.with_group('radiusd')
.with_mode('0640')
......
# -*- text -*-
#
# $Id$
# $Id: 1caff077b2429c948a04777fcd619be901ac83dc $
#
# This file defines a number of instances of the "attr_filter" module.
......
# File managed by puppet
##############################################################
# -*- text -*-
#
# $Id: e91e12d0b4de8f3cb084c179b321924d0248cfbb $
# Write a detailed log of all accounting records received.
#
detail <%= @name %> {
detail {
# Note that we do NOT use NAS-IP-Address here, as
# that attribute MAY BE from the originating NAS, and
# NOT from the proxy which actually sent us the
......@@ -15,8 +16,8 @@ detail <%= @name %> {
# day, so that the detail file doesn't have to go
# through a 'log rotation'
#
# If your detail files are large, you may also want
# to add a ':%H' (see doc/variables.txt) to the end
# If your detail files are large, you may also want to add
# a ':%H' (see doc/configuration/variables.rst) to the end
# of it, to create a new detail file every hour, e.g.:
#
# ..../detail-%Y%m%d:%H
......@@ -30,8 +31,10 @@ detail <%= @name %> {
# be ONE "listen" section reading detail files from a
# particular directory.
#
# filename = ${radacctdir}/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d
filename = <%= @filename %>
#
# If you are using radrelay, delete the above line for "file",
# and use this one instead:
......@@ -43,6 +46,7 @@ detail <%= @name %> {
# characters. Ones that can deal with a limited range should
# set this to "yes".
#
# escape_filenames = no
escape_filenames = <%= @escape_filenames %>
#
......@@ -52,14 +56,16 @@ detail <%= @name %> {
# information about users. So by keeping the file
# permissions restrictive, we can prevent unwanted
# people from seeing that information.
# permissions = 0600
permissions = <%= @permissions %>
<%- if @group -%>
# The Unix group of the log file.
#
# The user that the server runs as must be in the specified
# system group otherwise this will fail to work.
#
# group = ${security.group}
<%- if @group -%>
group = <%= @group %>
<%- end -%>
......@@ -69,28 +75,30 @@ detail <%= @name %> {
# format (see "man ctime" for details).
#
# The header can be customised by editing this
# string. See "doc/variables.txt" for a description
# of what can be put here.
# string. See "doc/configuration/variables.rst" for a
# description of what can be put here.
#
# header = "%t"
header = "<%= @header %>"
<%- if @locking -%>
#
# Uncomment this line if the detail file reader will be
# reading this detail file.
#
# locking = yes
<%- if @locking -%>
locking = <%= @locking == true %>
<%- end -%>
<%- if @log_packet_header -%>
#
# Log the Packet src/dst IP/port. This is disabled by
# default, as that information isn't used by many people.
#
# log_packet_header = yes
<%- if @log_packet_header -%>
log_packet_header = <%= @log_packet_header == true %>
<%- end -%>
<%- if !@suppress.empty? -%>
#
# Certain attributes such as User-Password may be
# "sensitive", so they should not be printed in the
......@@ -99,8 +107,13 @@ detail <%= @name %> {
#
# The attributes should be listed one to a line.
#
#suppress {
# User-Password
#}
<%- if !@suppress.empty? -%>
suppress {
<%= @suppress.join("\n ") %>
<%= @suppress.join("\n\t\t") %>
}
<%- end -%>
}
#
# This is the master dictionary file, which references the
# pre-defined dictionary files included with the server.
# This is the local dictionary file which can be
# edited by local administrators. It will be loaded
# AFTER the main dictionary files are loaded.
#
# Any new/changed attributes MUST be placed in this file, as
# the pre-defined dictionaries SHOULD NOT be edited.
# As of version 3.0.2, FreeRADIUS will automatically
# load the main dictionary files from
#
# $Id$
# ${prefix}/share/freeradius/dictionary
#
# It is no longer necessary for this file to $INCLUDE
# the main dictionaries. However, if the $INCLUDE
# line is here, nothing bad will happen.
#
# The filename given here should be an absolute path.
# Any new/changed attributes MUST be placed in this file.
# The pre-defined dictionaries SHOULD NOT be edited.
#
$INCLUDE /usr/share/freeradius/dictionary
$INCLUDE <%= @fr_basepath %>/dictionary.custom
# See "man dictionary" for documentation on its format.
#
# Place additional attributes or $INCLUDEs here. They will
# over-ride the definitions in the pre-defined dictionaries.
# $Id: eed5d70f41b314f9ed3f006a22d9f9a2be2c9516 $
#
# See the 'man' page for 'dictionary' for information on
# the format of the dictionary files.
#
# All local attributes and $INCLUDE's should go into
# this file.
#
$INCLUDE <%= @fr_basepath %>/dictionary.custom
# If you want to add entries to the dictionary file,
# which are NOT going to be placed in a RADIUS packet,
# add them here. The numbers you pick should be between
# 3000 and 4000.
# add them to the 'dictionary.local' file.
#
# The numbers you pick should be between 3000 and 4000.
# These attributes will NOT go into a RADIUS packet.
#
# If you want that, you will need to use VSAs. This means
# requesting allocation of a Private Enterprise Code from
# http://iana.org. We STRONGLY suggest doing that only if
# you are a vendor of RADIUS equipment.
#
# See RFC 6158 for more details.
# http://ietf.org/rfc/rfc6158.txt
#
#
# These attributes are examples
#
#ATTRIBUTE My-Local-String 3000 string
#ATTRIBUTE My-Local-IPAddr 3001 ipaddr
#ATTRIBUTE My-Local-Integer 3002 integer
This diff is collapsed.
# This file is managed by Puppet. DO NOT EDIT.
# -*- text -*-
#
# $Id: e3f3bf568d92eba8eb17bbad590f846f2d9e1ac8 $
# Livingston-style 'users' file
#
......@@ -14,24 +15,29 @@ files <%= @name %> {
# matches this instance of the files module.
moddir = <%= @moddir %>
<%- if @key -%>
# The default key attribute to use for matches. The content
# of this attribute is used to match the "name" of the
# entry.
#key = "%{%{Stripped-User-Name}:-%{User-Name}}"
<%- if @key -%>
key = "<%= @key %>"
<%- end -%>
# The old "users" style file is now located here.
# filename = ${moddir}/authorize
filename = <%= @filename %>
<%- if @usersfile -%>
# This is accepted for backwards compatibility
# It will be removed in a future release.
# usersfile = ${moddir}/authorize
<%- if @usersfile -%>
usersfile = <%= @usersfile %>
<%- end -%>
# These are accepted for backwards compatibility.
# They will be renamed in a future release.
# acctusersfile = ${moddir}/accounting
# preproxy_usersfile = ${moddir}/pre-proxy
<%- if @acctusersfile -%>
acctusersfile = ${moddir}/accounting
<%- end -%>
......
<%- require 'ipaddr' -%>
# -*- text -*-
#
# $Id: 1d3305ba45ec71336f55f8f1db05f183772e1b82 $
# Do server side ip pool management. Should be added in
# post-auth and accounting sections.
#
......@@ -38,6 +43,7 @@ ippool <%= @name %> {
cache_size = <%= @real_cache_size %>
# Helper db index file used in multilink
# ip_index = ${db_dir}/db.ipindex
<%- if @ip_index -%>
ip_index = <%= @ip_index %>
<%- else -%>
......@@ -54,7 +60,6 @@ ippool <%= @name %> {
# "no timeout". The default value is 0
maximum_timeout = <%= @maximum_timeout %>
<%- if @key -%>
# The key to use for the session database (which
# holds the allocated ip's) normally it should
# just be the nas ip/port (which is the default).
......@@ -63,6 +68,8 @@ ippool <%= @name %> {
# all requests, the key should be based on some
# other attribute that is in ALL requests, AND
# is unique to each machine needing an IP address.
# key = "%{NAS-IP-Address} %{NAS-Port}"
<%- if @key -%>
key = "<%= @key %>"
<%- end -%>
}
# -*- text -*-
#
# $Id: 29a92b9c099a8238fbff0dec60bef00cfb89010a $
# $Id: c88b5fbb4b35cc4e61bfb93a616d891fb79ebc0c $
#
# Kerberos. See doc/modules/rlm_krb5 for minimal docs.
#
krb5 <%= @name %> {
#
# The keytab file MUST be owned by the UID/GID used by the server.
# The keytab file MUST be writable by the server.
# The keytab file MUST NOT be readable by other users on the system.
# The keytab file MUST exist before the server is started.
#
# keytab = ${localstatedir}/lib/radiusd/keytab
# service_principal = name_of_principle
keytab = <%= @keytab %>
service_principal = <%= @principal %>
......@@ -18,10 +26,16 @@ krb5 <%= @name %> {
# that it was thread safe at compile time.
#
pool {
# Number of connections to start
# Connections to create during module instantiation.
# If the server cannot create specified number of
# connections during instantiation it will exit.
# Set to 0 to allow the server to start without the
# KDC being available.
# start = ${thread[pool].start_servers}
start = <%= @start %>
# Minimum number of connections to keep open
# min = ${thread[pool].min_spare_servers}
min = <%= @min %>
# Maximum number of connections
......@@ -29,18 +43,25 @@ krb5 <%= @name %> {
# If these connections are all in use and a new one
# is requested, the request will NOT get a connection.
#
# NOTE: This should be greater than or equal to "min" above.
# Setting 'max' to LESS than the number of threads means
# that some threads may starve, and you will see errors
# like 'No connections available and at max connection limit'
#
# Setting 'max' to MORE than the number of threads means
# that there are more connections than necessary.
# max = ${thread[pool].max_servers}
max = <%= @max %>
# Spare connections to be left idle
#
# NOTE: Idle connections WILL be closed if "idle_timeout"
# is set. This should be less than or equal to "max" above.
# spare = ${thread[pool].max_spare_servers}
spare = <%= @spare %>
# Number of uses before the connection is closed
#
# NOTE: A setting of 0 means infinite (no limit).
# 0 means "infinite"
uses = 0
# The lifetime (in seconds) of the connection
......
This diff is collapsed.
# This file is managed by Puppet. DO NOT EDIT.
# -*- text -*-
#
# $Id: dc2a8195b3c1c2251fc37651ea4a598898c33d12 $
#
# The "linelog" module will log one line of text to a file.
......@@ -35,17 +36,15 @@ linelog <%= @name %> {
# restrictive as possible.
permissions = <%= @permissions %>
<%- if @group -%>
#
# The Unix group which owns the log file.
#
# The user that freeradius runs as must be in the specified
# group, otherwise it will not be possible to set the group.
#
# group = ${security.group}
<%- if @group -%>
group = <%= @group %>
<%- end -%>
<%- if @syslog_facility -%>
# Syslog facility (if logging via syslog).
# Defaults to the syslog_facility config item in radiusd.conf.
# Standard facilities are:
......@@ -69,10 +68,11 @@ linelog <%= @name %> {
# - ftp The file transfer protocol daemons: ftpd(8),
# tftpd(8).
# - local[0-7] Reserved for local use.
# syslog_facility = daemon
<%- if @syslog_facility -%>
syslog_facility = <%= @syslog_facility %>
<%- end -%>
<%- if @syslog_severity -%>
# Syslog severity (if logging via syslog). Defaults to info.
# Possible values are:
# - emergency A panic condition. This is normally broadcast
......@@ -87,11 +87,16 @@ linelog <%= @name %> {
# - info Informational messages.
# - debug Messages that contain information normally of use
# only when debugging a program.
# syslog_severity = info
<%- if @syslog_severity -%>
syslog_severity = <%= @syslog_severity %>
<%- end -%>
# If logging via syslog, the severity can be set here.
# Defaults to info.
#
# The default format string.
# format = "This is a log message for %{User-Name}"
format = "<%= @format %>"
#
......@@ -112,8 +117,15 @@ linelog <%= @name %> {
# needed to configure one "linelog" module for each log message.
#
# Reference the Packet-Type (Access-Request, etc.) If it doesn't
# exist, reference the "format" entry, above.
# Reference the Packet-Type (Access-Accept, etc.) If it doesn't
# exist, reference the "default" entry.
#
# This is for "linelog" being used in the post-auth section
# If you want to use it in "authorize", you need to change
# the reference to "messages.%{%{Packet-Type}:-default}",
# and then add the appropriate messages.
#
# reference = "messages.%{%{reply:Packet-Type}:-default}"
reference = "<%= @reference %>"
#
......@@ -123,20 +135,42 @@ linelog <%= @name %> {
# messages {
# default = "Unknown packet type %{Packet-Type}"
#
# Access-Request = "Requested access: %{User-Name}"
# Access-Reject = "Rejected access: %{User-Name}"
# Access-Accept = "Accepted user: %{User-Name}"
# Access-Reject = "Rejected user: %{User-Name}"
# Access-Challenge = "Sent challenge: %{User-Name}"
# }
<%- if !@messages.empty? -%>
messages {
<%= @messages.join("\n ") %>
<%= @messages.join("\n\t\t") %>
}
<%- end -%>
<%- if !@accounting_request.empty? -%>
Accounting-Request {
<%= @accounting_request.join("\n\t\t")%>
}
<%- end -%>
}
#
# Another example, for accounting packets.
#
# linelog log_accounting {
# #
# # Used if the expansion of "reference" fails.
# #
# format = ""
#
# filename = ${logdir}/linelog-accounting
#
# Another example:
# permissions = 0600
#
# reference = "Accounting-Request.%{%{Acct-Status-Type}:-unknown}"
#
# #
# # Another example:
# #
# #
# Accounting-Request {
# Start = "Connect: [%{User-Name}] (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} ip %{Framed-IP-Address})"
# Stop = "Disconnect: [%{User-Name}] (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} ip %{Framed-IP-Address}) %{Acct-Session-Time} seconds"
......@@ -150,9 +184,4 @@ linelog <%= @name %> {
# # don't log anything for other Acct-Status-Types.
# unknown = "NAS %{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}} (%{%{NAS-IP-Address}:-%{NAS-IPv6-Address}}) sent unknown Acct-Status-Type %{Acct-Status-Type}"
# }
<%- if !@accounting_request.empty? -%>
Accounting-Request {
<%= @accounting_request.join("\n ")%>
}
<%- end -%>
}
# }
......@@ -28,20 +28,45 @@ listen {
# source IP address for packets sent to a home server, the
# proxy listeners are automatically created.
# IP address on which to listen.
# Allowed values are:
# dotted quad (1.2.3.4)
# hostname (radius.example.com)
# wildcard (*)
# ipaddr/ipv4addr/ipv6addr - IP address on which to listen.
# If multiple ones are listed, only the first one will
# be used, and the others will be ignored.
#
# The configuration options accept the following syntax:
#
# ipv4addr - IPv4 address (e.g.192.0.2.3)
# - wildcard (i.e. *)
# - hostname (radius.example.com)
# Only the A record for the host name is used.
# If there is no A record, an error is returned,
# and the server fails to start.
#
# ipv6addr - IPv6 address (e.g. 2001:db8::1)
# - wildcard (i.e. *)
# - hostname (radius.example.com)
# Only the AAAA record for the host name is used.
# If there is no AAAA record, an error is returned,
# and the server fails to start.
#
# ipaddr - IPv4 address as above
# - IPv6 address as above
# - wildcard (i.e. *), which means IPv4 wildcard.
# - hostname
# If there is only one A or AAAA record returned
# for the host name, it is used.
# If multiple A or AAAA records are returned
# for the host name, only the first one is used.
# If both A and AAAA records are returned
# for the host name, only the A record is used.
#
# ipv4addr = *
# ipv6addr = *
<%- if !@ip6 and @ip -%>
ipaddr = <%= @ip %>
<%- elsif !@ip6 -%>
ipaddr = *
<%- end -%>
# OR, you can use an IPv6 address, but not both
# at the same time.
# ipv6addr = :: # any. ::1 == localhost
<%- if !@ip and @ip6 -%>
ipv6addr = <%= @ip6 %>
<%- end -%>
......@@ -52,7 +77,6 @@ listen {
# 0 means "use /etc/services for the proper port"
port = <%= @port %>
<%- if @interface -%>
# Some systems support binding to an interface, in addition
# to the IP address. This feature isn't strictly necessary,
# but for sites with many IP addresses on one interface,
......@@ -61,10 +85,11 @@ listen {
# If your system does not support this feature, you will
# get an error if you try to use it.
#
# interface = eth0
<%- if @interface -%>
interface = <%= @interface %>
<%- end -%>
<%- if !@clients.empty? -%>
# Per-socket lists of clients. This is a very useful feature.
#
# The name here is a reference to a section elsewhere in
......@@ -79,9 +104,22 @@ listen {
#
# See clients.conf for the configuration of "per_socket_clients".
#
# clients = per_socket_clients
<%- if !@clients.empty? -%>
clients = <%= @clients.join(',') %>
<%- end -%>
#
# Set the default UDP receive buffer size. In most cases,
# the default values set by the kernel are fine. However, in
# some cases the NASes will send large packets, and many of
# them at a time. It is then possible to overflow the
# buffer, causing the kernel to drop packets before they
# reach FreeRADIUS. Increasing the size of the buffer will
# avoid these packet drops.
#
# recv_buff = 65536
#
# Connection limiting for sockets with "proto = tcp".
#
......
# File managed by puppet
##############################################################
# -*- text -*-
#
# $Id: fa04cdabb71767050aaa0664da792fd6086adb19 $
# Persistent, embedded Perl interpreter.
#
......@@ -10,8 +11,20 @@ perl {
# 'rlm_exec' module, but it is persistent, and therefore
# faster.
#
# filename = ${modconfdir}/${.:instance}/example.pl
filename = ${modconfdir}/${.:instance}/<%= @perl_filename %>
#
# Options which are passed to the Perl interpreter.
# These are (mostly) the same options as are passed
# to the "perl" command line.
#
# The most useful flag is "-T". This sets tainting on. And
# as of 3.0.18, makes it impossible to leverage bad
# User-Names into local command execution.
#
perl_flags = "-T"
#
# The following hashes are given to the module and
# filled with value-pairs (Attribute names and values)
......@@ -58,11 +71,6 @@ perl {
# Uncomment and change if you want to use function
# names other than the defaults.
#
<% if defined?(@function_names) %>
<% @function_names.each_pair do |default, function| %>
<%=default%> = <%= function %>
<% end -%>
<% end %>
#func_authenticate = authenticate
#func_authorize = authorize
#func_preacct = preacct
......@@ -75,6 +83,11 @@ perl {
#func_send_coa = send_coa
#func_xlat = xlat
#func_detach = detach
<% if defined?(@function_names) %>
<% @function_names.each_pair do |default, function| %>
<%=default%> = <%= function %>
<% end -%>
<% end %>
#
# Uncomment the following lines if you wish
......@@ -85,4 +98,3 @@ perl {
#func_start_accounting = accounting_start
#func_stop_accounting = accounting_stop
}
......@@ -13,8 +13,11 @@
preprocess {
# Search for files in a subdirectory of mods-config which
# matches this instance of the preprocess module.
# moddir = ${modconfdir}/${.:instance}
moddir = <%= @moddir %>
# huntgroups = ${moddir}/huntgroups
# hints = ${moddir}/hints
huntgroups = <%= @huntgroups %>
hints = <%= @hints %>
......
# -*- text -*-
##
## radiusd.conf -- FreeRADIUS server configuration file - 3.0.4
## radiusd.conf -- FreeRADIUS server configuration file - @RADIUSD_VERSION_STRING@
##
## http://www.freeradius.org/
## $Id: 307ae108f579b9c339e6ba819387ff7ad8baff87 $
## $Id: e8aee3c00193127177cd65e31156c1d0f4b124d3 $
##
######################################################################
#
# Read "man radiusd" before editing this file. See the section
# titled DEBUGGING. It outlines a method where you can quickly
# obtain the configuration you want, without running into
# trouble.
# The format of this (and other) configuration file is
# documented in "man unlang". There are also READMEs in many
# subdirectories:
#
# raddb/README.rst
# How to upgrade from v2.
#
# raddb/mods-available/README.rst
# How to use mods-available / mods-enabled.
# All of the modules are in individual files,
# along with configuration items and full documentation.
#
# raddb/sites-available/README
# virtual servers, "listen" sections, clients, etc.
# The "sites-available" directory contains many
# worked examples of common configurations.
#
# raddb/certs/README
# How to create certificates for EAP or RadSec.
#
# Every configuration item in the server is documented
# extensively in the comments in the example configuration
# files.
#
# Before editing this (or any other) configuration file, PLEASE
# read "man radiusd". See the section titled DEBUGGING. It
# outlines a method where you can quickly create the
# configuration you want, with minimal effort.
#
# Run the server in debugging mode, and READ the output.
#
......@@ -26,29 +50,35 @@
# "warning", "error", "reject", or "failure". The messages there
# will usually be enough to guide you to a solution.
#
# More documentation on "radiusd -X" is available on the wiki:
# https://wiki.freeradius.org/radiusd-X
#
# If you are going to ask a question on the mailing list, then
# explain what you are trying to do, and include the output from
# debugging mode (radiusd -X). Failure to do so means that all
# of the responses to your question will be people telling you
# to "post the output of radiusd -X".
######################################################################
#
# The location of other config files and logfiles are declared
# in this file.
# Guidelines for posting to the mailing list are on the wiki:
# https://wiki.freeradius.org/list-help
#
# Also general configuration for modules can be done in this
# file, it is exported through the API to modules that ask for
# it.
# Please read those guidelines before posting to the list.
#
# See "man radiusd.conf" for documentation on the format of this
# file. Note that the individual configuration items are NOT
# documented in that "man" page. They are only documented here,
# in the comments.
# Further documentation is available in the "doc" directory
# of the server distribution, or on the wiki at:
# https://wiki.freeradius.org/
#
# The "unlang" policy language can be used to create complex
# if / else policies. See "man unlang" for details.
# New users to RADIUS should read the Technical Guide. That guide
# explains how RADIUS works, how FreeRADIUS works, and what each
# part of a RADIUS system does. It is not just "configure FreeRADIUS"!
# https://networkradius.com/doc/FreeRADIUS-Technical-Guide.pdf
#
# More documentation on dictionaries, modules, unlang, etc. is also
# available on the Network RADIUS web site:
# https://networkradius.com/freeradius-documentation/
#
######################################################################
prefix = /usr
exec_prefix = /usr
......@@ -70,6 +100,7 @@ certdir = ${confdir}/certs
cadir = ${confdir}/certs
run_dir = ${localstatedir}/run/${name}
# Should likely be ${localstatedir}/lib/radiusd
db_dir = <%= @fr_db_dir %>
#
......@@ -207,7 +238,7 @@ max_request_time = <%= @max_request_time %>
# If this value is set too high, then the server will cache too many
# requests, and some new requests may get blocked. (See 'max_requests'.)
#
# Useful range of values: 2 to 10
# Useful range of values: 2 to 30
#
cleanup_delay = 5
......@@ -283,44 +314,6 @@ log {
#
file = ${logdir}/radius.log
#
# If this configuration parameter is set, then log messages for
# a *request* go to this file, rather than to radius.log.
#
# i.e. This is a log file per request, once the server has accepted
# the request as being from a valid client. Messages that are
# not associated with a request still go to radius.log.
#
# Not all log messages in the server core have been updated to use
# this new internal API. As a result, some messages will still
# go to radius.log. Please submit patches to fix this behavior.
#
# The file name is expanded dynamically. You should ONLY user
# server-side attributes for the filename (e.g. things you control).
# Using this feature MAY also slow down the server substantially,
# especially if you do thinks like SQL calls as part of the
# expansion of the filename.
#
# The name of the log file should use attributes that don't change
# over the lifetime of a request, such as User-Name,
# Virtual-Server or Packet-Src-IP-Address. Otherwise, the log
# messages will be distributed over multiple files.
#
# Logging can be enabled for an individual request by a special
# dynamic expansion macro: %{debug: 1}, where the debug level
# for this request is set to '1' (or 2, 3, etc.). e.g.
#
# ...
# update control {
# Tmp-String-0 = "%{debug:1}"
# }
# ...
#
# The attribute that the value is assigned to is unimportant,
# and should be a "throw-away" attribute with no side effects.
#
#requests = ${logdir}/radiusd-%{%{Virtual-Server}:-DEFAULT}-%Y%m%d.log
#
# Which syslog facility to use, if ${destination} == "syslog"
#
......@@ -335,12 +328,31 @@ log {
#
stripped_names = no
# Log authentication requests to the log file.
# Log all (accept and reject) authentication results to the log file.
#
# This is the same as setting "auth_accept = yes" and
# "auth_reject = yes"
#
# allowed values: {no, yes}
#
auth = <%= @log_auth %>
# Log Access-Accept results to the log file.
#
# This is only used if "auth = no"
#
# allowed values: {no, yes}
#
# auth_accept = no
# Log Access-Reject results to the log file.
#
# This is only used if "auth = no"
#
# allowed values: {no, yes}
#
# auth_reject = no
# Log passwords with the authentication requests.
# auth_badpass - logs password if it's rejected
# auth_goodpass - logs password if it's correct
......@@ -370,6 +382,60 @@ log {
# The program to execute to do concurrency checks.
checkrad = ${sbindir}/checkrad
#
# ENVIRONMENT VARIABLES
#
# You can reference environment variables using an expansion like
# `$ENV{PATH}`. However it is sometimes useful to be able to also set
# environment variables. This section lets you do that.
#
# The main purpose of this section is to allow administrators to keep
# RADIUS-specific configuration in the RADIUS configuration files.
# For example, if you need to set an environment variable which is
# used by a module. You could put that variable into a shell script,
# but that's awkward. Instead, just list it here.
#
# Note that these environment variables are set AFTER the
# configuration file is loaded. So you cannot set FOO here, and
# expect to reference it via `$ENV{FOO}` in another configuration file.
# You should instead just use a normal configuration variable for
# that.
#
ENV {
#
# Set environment varable `FOO` to value '/bar/baz'.
#
# NOTE: Note that you MUST use '='. You CANNOT use '+=' to append
# values.
#
# FOO = '/bar/baz'
#
# Delete environment variable `BAR`.
#
# BAR
#
# `LD_PRELOAD` is special. It is normally set before the
# application runs, and is interpreted by the dynamic linker.
# Which means you cannot set it inside of an application, and
# expect it to load libraries.
#
# Since this functionality is useful, we extend it here.
#
# You can set
#
# LD_PRELOAD = /path/to/library.so
#
# and the server will load the named libraries. Multiple
# libraries can be loaded by specificing multiple individual
# `LD_PRELOAD` entries.
#
#
# LD_PRELOAD = /path/to/library1.so
# LD_PRELOAD = /path/to/library2.so
}
# SECURITY CONFIGURATION
#
# There may be multiple methods of attacking on the server. This
......@@ -435,6 +501,8 @@ security {
# member. This can allow for some finer-grained access
# controls.
#
# user = radius
# group = radius
user = <%= @fr_user%>
group = <%= @fr_group%>
......@@ -472,6 +540,9 @@ security {
# rejects will be sent at 'cleanup_delay' time, when the request
# is deleted from the internal cache of requests.
#
# As of Version 3.0.5, "reject_delay" has sub-second resolution.
# e.g. "reject_delay = 1.4" seconds is possible.
#
# Useful ranges: 1 to 5
reject_delay = 1
......@@ -495,6 +566,7 @@ security {
#
status_server = yes
#
# allow_vulnerable_openssl: Allow the server to start with
# versions of OpenSSL known to have critical vulnerabilities.
#
......@@ -538,9 +610,9 @@ $INCLUDE proxy.conf
# Anything listed in 'clients.conf' will take precedence over the
# information from the old-style configuration files.
#
#$INCLUDE clients.conf
$INCLUDE ${confdir}/clients.d/
# THREAD POOL CONFIGURATION
#
# The thread pool is a long-lived group of threads which
......@@ -617,12 +689,8 @@ thread pool {
#
# max_queue_size = 65536
# There may be memory leaks or resource allocation problems with
# the server. If so, set this value to 300 or so, so that the
# resources will be cleaned up periodically.
#
# This should only be necessary if there are serious bugs in the
# server which have not yet been fixed.
# Clean up old threads periodically. For no reason other than
# it might be useful.
#
# '0' is a special value meaning 'infinity', or 'the servers never
# exit'
......@@ -688,6 +756,21 @@ modules {
# for an example.
#
#
# Some modules have ordering issues. e.g. "sqlippool" uses
# the configuration from "sql". In that case, the "sql"
# module must be read off of disk before the "sqlippool".
# However, the directory inclusion below just reads the
# directory from start to finish. Which means that the
# modules are read off of disk randomly.
#
# As of 3.0.18, you can list individual modules *before* the
# directory inclusion. Those modules will be loaded first.
# Then, when the directory is read, those modules will be
# skipped and not read twice.
#
# $INCLUDE mods-enabled/sql
#
# As of 3.0, modules are in mods-enabled/. Files matching
# the regex /[a-zA-Z0-9_.]+/ are loaded. The modules are
......@@ -695,19 +778,20 @@ modules {
# section, such as authorize, authenticate, accounting,
# pre/post-proxy, etc.
#
# $INCLUDE mods-enabled/
$INCLUDE <%= @fr_moduledir %>/
}
# Instantiation
#
# This section orders the loading of the modules. Modules
# listed here will get loaded BEFORE the later sections like
# authorize, authenticate, etc. get examined.
# This section sets the instantiation order of the modules. listed
# here will get started up BEFORE the sections like authorize,
# authenticate, etc. get examined.
#
# This section is not strictly needed. When a section like
# authorize refers to a module, it's automatically loaded and
# initialized. However, some modules may not be listed in any
# of the following sections, so they can be listed here.
# This section is not strictly needed. When a section like authorize
# refers to a module, the module is automatically loaded and
# initialized. However, some modules may not be listed in any of the
# processing sections, so they should be listed here.
#
# Also, listing modules here ensures that you have control over
# the order in which they are initialized. If one module needs
......@@ -735,16 +819,48 @@ instantiate {
# lines, and list "redundant_sql" in the authorize and
# accounting sections.
#
# The "virtual" module defined here can also be used with
# dynamic expansions, under a few conditions:
#
# * The section is "redundant", or "load-balance", or
# "redundant-load-balance"
# * The section contains modules ONLY, and no sub-sections
# * all modules in the section are using the same rlm_
# driver, e.g. They are all sql, or all ldap, etc.
#
# When those conditions are satisfied, the server will
# automatically register a dynamic expansion, using the
# name of the "virtual" module. In the example below,
# it will be "redundant_sql". You can then use this expansion
# just like any other:
#
# update reply {
# Filter-Id := "%{redundant_sql: ... }"
# }
#
# In this example, the expansion is done via module "sql1",
# and if that expansion fails, using module "sql2".
#
# For best results, configure the "pool" subsection of the
# module so that "retry_delay" is non-zero. That will allow
# the redundant block to quickly ignore all "down" SQL
# databases. If instead we have "retry_delay = 0", then
# every time the redundant block is used, the server will try
# to open a connection to every "down" database, causing
# problems.
#
#redundant redundant_sql {
# sql1
# sql2
#}
$INCLUDE instantiate/
}
######################################################################
#
# Enable support for templates
# Enable support for templates - this is added by the FreeRADIUS
# puppet module.
#
$INCLUDE templates.conf
......@@ -775,6 +891,8 @@ policy {
#
$INCLUDE listen.d/
### WHAT
######################################################################
#
# Load virtual servers.
......
# This file is managed by Puppet. DO NOT EDIT.
#
######################################################################
#
# As of 2.0.0, FreeRADIUS supports virtual hosts using the
......@@ -13,7 +11,7 @@
# the "inner-tunnel" virtual server. You will likely have to edit
# that, too, for authentication to work.
#
# $Id: cf7fe5ed3804e566c1569e96ae350804054ebcdd $
# $Id: c60c0ba4c8728fac10b190dbb3b752f9df317c07 $
#
######################################################################
#
......
......@@ -17,7 +17,7 @@
# See also the "radmin" program, which is used to communicate
# with the server over the control socket.
#
# $Id$
# $Id: 97ba9ef972539af80dcaf84090b55d991095a93e $
#
######################################################################
listen {
......@@ -36,6 +36,25 @@ listen {
#
socket = ${run_dir}/${name}.sock
#
# Peercred auth
#
# By default the server users the peercred feature of unix
# sockets to get the UID and GID of the user connecting to
# the socket. You may choose to disable this functionality
# and rely on the file system for enforcing permissions.
#
# On most Unix systems, the permissions set on the socket
# are not enforced, but the ones on the directory containing
# the socket are.
#
# To use filesystem permissions you should create a new
# directory just to house the socket file, and set
# appropriate permissions on that.
#
# peercred = no
# socket = ${run_dir}/control/${name}.sock
#
# The following two parameters perform authentication and
# authorization of connections to the control socket.
......
######################################################################
######################################################################
## THIS FILE IS MANAGED BY PUPPET. DO NOT MAKE LOCAL EDITS! ##
######################################################################
######################################################################
# -*- text -*-
######################################################################
#
......@@ -24,18 +17,20 @@
# "status" port.
#
# The server statistics are available ONLY on socket of type
# "status". Qeuries for statistics sent to any other port
# "status". Queries for statistics sent to any other port
# are ignored.
#
# Similarly, a socket of type "status" will not process
# authentication or accounting packets. This is for security.
#
# $Id$
# $Id: e7d4346310b837d56bffe4c991b4e5680742ebc0 $
#
######################################################################
server status {
listen {
# ONLY Status-Server is allowed to this port.
# ALL other packets are ignored.
type = status
ipaddr = <%= @listen %>
port = <%= @port %>
......@@ -55,6 +50,11 @@ server status {
# of what your RADIUS server is doing?
#
# client admin {
# ipaddr = 127.0.0.1
# secret = adminsecret
# }
$INCLUDE ${confdir}/statusclients.d/
#
......@@ -86,11 +86,11 @@ server status {
#
# All packets for a particular client (globally defined)
# FreeRADIUS-Statistics-Type = 35
# FreeRADIUS-Stats-Client-IP-Address = 192.168.1.1
# FreeRADIUS-Stats-Client-IP-Address = 192.0.2.1
#
# All packets for a client attached to a "listen" ip/port
# FreeRADIUS-Statistics-Type = 35
# FreeRADIUS-Stats-Client-IP-Address = 192.168.1.1
# FreeRADIUS-Stats-Client-IP-Address = 192.0.2.1
# FreeRADIUS-Stats-Server-IP-Address = 127.0.0.1
# FreeRADIUS-Stats-Server-Port = 1812
#
......@@ -101,7 +101,7 @@ server status {
#
# All packets for a home server IP / port
# FreeRADIUS-Statistics-Type = 131
# FreeRADIUS-Stats-Server-IP-Address = 192.168.1.2
# FreeRADIUS-Stats-Server-IP-Address = 192.0.2.2
# FreeRADIUS-Stats-Server-Port = 1812
#
......
# -*- text -*-
##
## mods-available/sql -- SQL modules
##
## $Id: 7e9eee03c58bab67206ec10249db79ebbc0baa3c $
######################################################################
#
# Configuration for the SQL module
#
# The database schemas and queries are located in subdirectories:
#
# sql/<driver>/main/schema.sql Schema
# sql/<driver>/main/queries.conf Authorisation and Accounting queries
# sql/<DB>/main/schema.sql Schema
# sql/<DB>/main/queries.conf Authorisation and Accounting queries
#
# Driver specific configuration options are located in sql prefix config files
# Where "DB" is mysql, mssql, oracle, or postgresql.
#
# mods-available/sql_<driver>
# The name used to query SQL is sql_user_name, which is set in the file
#
# Where "driver" is cassandra, db2, firebird, freetds, iodbc, null, mysql
# oracle, postgresql, sqlite, unixodbc.
# raddb/mods-config/sql/main/${dialect}/queries.conf
#
# $Id$
# If you are using realms, that configuration should be changed to use
# the Stripped-User-Name attribute. See the comments around sql_user_name
# for more information.
#
sql <%= @name %> {
# The dialect of SQL you want to use
#
# If you're using rlm_sql_null, then it should be the type of
# database the logged queries are going to be executed against.
# The dialect of SQL being used.
#
# Allowed dialects are:
#
# mssql
# mysql
# oracle
# postgresql
# sqlite
# mongo
#
# dialect = "sqlite"
dialect = "<%= @database %>"
# The sub-module to use to execute queries. This should match
# the database you're attempting to connect to.
#
# * rlm_sql_cassandra
# * rlm_sql_db2
# * rlm_sql_firedbird
# * rlm_sql_freetds (mssql)
# * rlm_sql_iodbc
# * rlm_sql_null (log queries to disk)
# * rlm_sql_mysql
# * rlm_sql_oracle
# * rlm_sql_postgresql
# * rlm_sql_sqlite
# * rlm_sql_unixodbc
#
# The driver module used to execute the queries. Since we
# don't know which SQL drivers are being used, the default is
# "rlm_sql_null", which just logs the queries to disk via the
# "logfile" directive, below.
#
# In order to talk to a real database, delete the next line,
# and uncomment the one after it.
#
# If the dialect is "mssql", then the driver should be set to
# one of the following values, depending on your system:
#
# rlm_sql_db2
# rlm_sql_firebird
# rlm_sql_freetds
# rlm_sql_iodbc
# rlm_sql_unixodbc
#
# driver = "rlm_sql_null"
driver = "rlm_sql_${dialect}"
# Uncomment to include driver specific configuration file
# (if one exists)
# These config files contain driver specific options.
# $INCLUDE ${modenableddir}/${.:name}_${dialect}
#
# Driver-specific subsections. They will only be loaded and
# used if "driver" is something other than "rlm_sql_null".
# When a real driver is used, the relevant driver
# configuration section is loaded, and all other driver
# configuration sections are ignored.
#
sqlite {
# Path to the sqlite database
filename = "/tmp/freeradius.db"
# How long to wait for write locks on the database to be
# released (in ms) before giving up.
busy_timeout = 200
# If the file above does not exist and bootstrap is set
# a new database file will be created, and the SQL statements
# contained within the bootstrap file will be executed.
bootstrap = "${modconfdir}/${..:name}/main/sqlite/schema.sql"
}
mysql {
# If any of the files below are set, TLS encryption is enabled
tls {
ca_file = "/etc/ssl/certs/my_ca.crt"
ca_path = "/etc/ssl/certs/"
certificate_file = "/etc/ssl/certs/private/client.crt"
private_key_file = "/etc/ssl/certs/private/client.key"
cipher = "DHE-RSA-AES256-SHA:AES128-SHA"
tls_required = yes
tls_check_cert = no
tls_check_cert_cn = no
}
# If yes, (or auto and libmysqlclient reports warnings are
# available), will retrieve and log additional warnings from
# the server if an error has occured. Defaults to 'auto'
warnings = auto
}
postgresql {
# unlike MySQL, which has a tls{} connection configuration, postgresql
# uses its connection parameters - see the radius_db option below in
# this file
# Send application_name to the postgres server
# Only supported in PG 9.0 and greater. Defaults to no.
send_application_name = yes
}
#
# Configuration for Mongo.
#
# Note that the Mongo driver is experimental. The FreeRADIUS developers
# are unable to help with the syntax of the Mongo queries. Please see
# the Mongo documentation for that syntax.
#
# The Mongo driver supports only the following methods:
#
# aggregate
# findAndModify
# findOne
# insert
#
# For examples, see the query files:
#
# raddb/mods-config/sql/main/mongo/queries.conf
# raddb/mods-config/sql/main/ippool/queries.conf
#
mongo {
#
# The application name to use.
#
appname = "freeradius"
#
# The TLS parameters here map directly to the Mongo TLS configuration
#
tls {
certificate_file = /path/to/file
certificate_password = "password"
ca_file = /path/to/file
ca_dir = /path/to/directory
crl_file = /path/to/file
weak_cert_validation = false
allow_invalid_hostname = false
}
}
# Connection info:
#
# server = "localhost"
# port = 3306
# login = "radius"
# password = "radpass"
server = "<%= @server %>"
port = "<%= @port %>"
login = "<%= @login %>"
password = "<%= @password %>"
# Connection info for Mongo
# Authentication Without SSL
# server = "mongodb://USER:PASSWORD@192.16.0.2:PORT/DATABASE?authSource=admin&ssl=false"
# Authentication With SSL
# server = "mongodb://USER:PASSWORD@192.16.0.2:PORT/DATABASE?authSource=admin&ssl=true"
# Authentication with Certificate
# Use this command for retrieve Derived username:
# openssl x509 -in mycert.pem -inform PEM -subject -nameopt RFC2253
# server = mongodb://<DERIVED USERNAME>@192.168.0.2:PORT/DATABASE?authSource=$external&ssl=true&authMechanism=MONGODB-X509
# Database table configuration for everything except Oracle
radius_db = "<%= @radius_db %>"
# radius_db = "radius"
# If you are using Oracle then use this instead
# radius_db = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=your_sid)))"
# If you're using postgresql this can also be used instead of the connection info parameters
# radius_db = "dbname=radius host=localhost user=radius password=raddpass"
# If you're using postgresql this can also be used instead of the connection info parameters
# radius_db = "dbname=radius host=localhost user=radius password=raddpass"
......@@ -64,29 +188,40 @@ sql <%= @name %> {
# use SSL connections then use this form of connection info parameter
# radius_db = "host=localhost port=5432 dbname=radius user=radius password=raddpass sslmode=verify-full sslcert=/etc/ssl/client.crt sslkey=/etc/ssl/client.key sslrootcert=/etc/ssl/ca.crt"
radius_db = "<%= @radius_db %>"
# If you want both stop and start records logged to the
# same SQL table, leave this as is. If you want them in
# different tables, put the start table in acct_table1
# and stop table in acct_table2
# acct_table1 = "radacct"
# acct_table2 = "radacct"
acct_table1 = "<%= @acct_table1 %>"
acct_table2 = "<%= @acct_table2 %>"
# Allow for storing data after authentication
# postauth_table = "radpostauth"
postauth_table = "<%= @postauth_table %>"
# Tables containing 'check' items
# authcheck_table = "radcheck"
# groupcheck_table = "radgroupcheck"
authcheck_table = "<%= @authcheck_table %>"
groupcheck_table = "<%= @groupcheck_table %>"
# Tables containing 'reply' items
# authreply_table = "radreply"
# groupreply_table = "radgroupreply"
authreply_table = "<%= @authreply_table %>"
groupreply_table = "<%= @groupreply_table %>"
# Table to keep group info
# usergroup_table = "radusergroup"
usergroup_table = "<%= @usergroup_table %>"
# If set to 'yes' (default) we read the group tables unless Fall-Through = no in the reply table.
# If set to 'no' we do not read the group tables unless Fall-Through = yes in the reply table.
# read_groups = yes
read_groups = <%= @read_groups %>
# If set to 'yes' (default) we read profiles unless Fall-Through = no in the groupreply table.
......@@ -94,6 +229,7 @@ sql <%= @name %> {
# read_profiles = yes
# Remove stale session if checkrad does not see a double login
# delete_stale_sessions = yes
delete_stale_sessions = <%= @deletestalesessions %>
# Write SQL queries to a logfile. This is potentially useful for tracing
......@@ -102,14 +238,23 @@ sql <%= @name %> {
# by enabling "logfile" there, or global logging by enabling "logfile" here.
#
# Per-section logging can be disabled by setting "logfile = ''"
# logfile = ${logdir}/sqllog.sql
<% if @sqltrace == "yes" -%>
logfile = <%= @sqltracefile %>
<% end -%>
# Set the maximum query duration for rlm_sql_mysql and
# rlm_sql_cassandra.
# Set the maximum query duration and connection timeout
# for rlm_sql_mysql.
# query_timeout = 5
# As of version 3.0, the "pool" section has replaced the
# following configuration items:
#
# num_sql_socks
# connect_failure_retry_delay
# lifetime
# max_queries
#
# The connection pool is new for 3.0, and will be used in many
# modules, for all kinds of connection-related activity.
......@@ -121,7 +266,7 @@ sql <%= @name %> {
# connection pool, use "pool = name" instead of a "pool"
# section. e.g.
#
# sql1 {
# sql sql1 {
# ...
# pool {
# ...
......@@ -129,7 +274,7 @@ sql <%= @name %> {
# }
#
# # sql2 will use the connection pool from sql1
# sql2 {
# sql sql2 {
# ...
# pool = sql1
# }
......@@ -140,9 +285,11 @@ sql <%= @name %> {
# connections during instantiation it will exit.
# Set to 0 to allow the server to start without the
# database being available.
# start = ${thread[pool].start_servers}
start = <%= @pool_start %>
# Minimum number of connections to keep open
# min = ${thread[pool].min_spare_servers}
min = <%= @pool_min %>
# Maximum number of connections
......@@ -156,29 +303,35 @@ sql <%= @name %> {
#
# Setting 'max' to MORE than the number of threads means
# that there are more connections than necessary.
# max = ${thread[pool].max_servers}
max = <%= @num_sql_socks %>
# Spare connections to be left idle
#
# NOTE: Idle connections WILL be closed if "idle_timeout"
# is set. This should be less than or equal to "max" above.
# spare = ${thread[pool].max_spare_servers}
spare = <%= @pool_spare %>
# Number of uses before the connection is closed
#
# 0 means "infinite"
# uses = 0
uses = <%= @max_queries %>
# The number of seconds to wait after the server tries
# to open a connection, and fails. During this time,
# no new connections will be opened.
# retry_delay = 30
retry_delay = <%= @connect_failure_retry_delay %>
# The lifetime (in seconds) of the connection
# lifetime = 0
lifetime = <%= @lifetime %>
# idle timeout (in seconds). A connection which is
# unused for this length of time will be closed.
# idle_timeout = 60
idle_timeout = <%= @pool_idle_timeout %>
# Connection timeout (in seconds). The maximum amount of
......@@ -203,18 +356,27 @@ sql <%= @name %> {
# Set to 'yes' to read radius clients from the database ('nas' table)
# Clients will ONLY be read on server startup.
# read_clients = yes
read_clients = <%= @readclients %>
# Table to keep radius client info
# client_table = "nas"
client_table = <%= @nas_table %>
#
# The group attribute specific to this instance of rlm_sql
#
# This entry should be used for additional instances (sql foo {})
# of the SQL module.
# group_attribute = "${.:instance}-SQL-Group"
group_attribute = "${.:instance}-${.:name}-Group"
# This entry should be used for the default instance (sql {})
# of the SQL module.
# group_attribute = "SQL-Group"
# Read database-specific queries
#
# Not all drivers ship with query.conf or schema.sql files.
# For those which don't, please create them and contribute
# them back to the project.
# $INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
$INCLUDE <% if @custom_query_file_path %><%= @custom_query_file_path %><% else %><%= @query_file %><% end %>
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment