Matthew Newton [Fri, 4 Oct 2019 10:14:35 +0000 (11:14 +0100)]
Don't jump over group and profile checks
It means we're inconsistent in warning messages depending on
whether radreply entry was found or not. rlm_sql_process_groups()
already checks group_membership_query.
Alan T. DeKok [Mon, 16 Sep 2019 11:32:50 +0000 (07:32 -0400)]
remove chown.
It's not needed according to the Systemd documentation
---
RuntimeDirectory=foo/bar baz
the service manager creates /run/foo (if it does not exist), /run/foo/bar, and /run/baz. The directories /run/foo/bar and /run/baz except /run/foo are owned by the user and group specified in User= and Group=, and removed when the service is stopped.
---
Stefan Winter [Mon, 9 Sep 2019 12:51:36 +0000 (14:51 +0200)]
create an initial, empty CRL in DER encoding
If a user wants to deploy his CA, the URL in crlDistributionPoints should actually contain a DER-encoded CRL file. We create it here; the admin still needs to actually deploy the file at the URL chosen.
ObjectId() and Date() commands are not accepted by the low-level
mongo JSON engine.
For the field 'date' it's needed to use $date command.
For replacing ObjectId() it is possible to use sha256 or any others
hashing command.
Terry Burton [Wed, 28 Aug 2019 23:33:23 +0000 (00:33 +0100)]
PostgreSQL: Don't require a lease to have expired if we reallocate it to the previous client
The current default allocate_find query causes per-client IP allocation
instability that starts when allocate_clear rate limiting comes into effect.
With initial pool conditions the default alloc_find query selects from the pool
of all *expired* leases. It selects the least recently used IP address (i.e.
the one with the oldest expiry_time) unless a matching username and/or
callingstationid exists in the table in which case these are prioritised in
order to issue the client with their previous lease. Normally picking the least
recently used address helps to avoid issuing the address to a different client,
maximising the chance of stickiness, which is desirable.
However, if a user makes successive authentication attempts whilst
allocate_clear rate limiting is active they are always allocated a different IP
address because their existing address is unavailable (has not yet expired and
has not been explicitly expired by allocate_clear), with the effect that there
are now multiple rows in the table containing the same pool_key, username and
callingstationid.
The normal ordering then has the undesirable effect of ensuring that successive
future IP address selections for the client will flip-flop between addresses
because username + callingstationid are first prioritied then the *oldest
expiry_time* is chosen (rather than the most recent expiry relating to the most
recent lease). This behaviour persists once allocate_clear rate limiting is no
longer in effect.
We can avoid getting having multiple rows with the same client details by
amending the allocate_find query to include an existing row matching
nasipaddress and pool_key in the available set of IP addreses regardless of
whether the lease has expired or not (i.e. re-allocation of a current lease to
the same client).
Terry Burton [Fri, 30 Aug 2019 14:58:12 +0000 (15:58 +0100)]
MySQL: Don't require a lease to have expired if we reallocate it to the previous client
The current default allocate_find query causes per-client IP allocation
instability that starts when allocate_clear rate limiting comes into
effect.
With initial pool conditions the default alloc_find query selects from
the pool of all *expired* leases. It selects the least recently used IP
address (i.e. the one with the oldest expiry_time) unless a matching
username and/or callingstationid exists in the table in which case these
are prioritised in order to issue the client with their previous lease.
Normally picking the least recently used address helps to avoid issuing
the address to a different client, maximising the chance of stickiness,
which is desirable.
However, if a user makes successive authentication attempts whilst
allocate_clear rate limiting is active they are always allocated a
different IP address because their existing address is unavailable (has
not yet expired and has not been explicitly expired by allocate_clear),
with the effect that there are now multiple rows in the table containing
the same pool_key, username and callingstationid.
The normal ordering then has the undesirable effect of ensuring that
successive future IP address selections for the client will flip-flop
between addresses because username + callingstationid are first
prioritied then the *oldest expiry_time* is chosen (rather than the most
recent expiry relating to the most recent lease). This behaviour
persists once allocate_clear rate limiting is no longer in effect.
We can avoid getting having multiple rows with the same client details
by amending the allocate_find query to include an existing row matching
nasipaddress and pool_key in the available set of IP addreses regardless
of whether the lease has expired or not (i.e. re-allocation of a current
lease to the same client).
Terry Burton [Fri, 30 Aug 2019 14:58:48 +0000 (15:58 +0100)]
Oracle: Don't require a lease to have expired if we reallocate it to the previous client
The current default allocate_find query causes per-client IP allocation
instability that starts when allocate_clear rate limiting comes into
effect.
With initial pool conditions the default alloc_find query selects from
the pool of all *expired* leases. It selects the least recently used IP
address (i.e. the one with the oldest expiry_time) unless a matching
username and/or callingstationid exists in the table in which case these
are prioritised in order to issue the client with their previous lease.
Normally picking the least recently used address helps to avoid issuing
the address to a different client, maximising the chance of stickiness,
which is desirable.
However, if a user makes successive authentication attempts whilst
allocate_clear rate limiting is active they are always allocated a
different IP address because their existing address is unavailable (has
not yet expired and has not been explicitly expired by allocate_clear),
with the effect that there are now multiple rows in the table containing
the same pool_key, username and callingstationid.
The normal ordering then has the undesirable effect of ensuring that
successive future IP address selections for the client will flip-flop
between addresses because username + callingstationid are first
prioritied then the *oldest expiry_time* is chosen (rather than the most
recent expiry relating to the most recent lease). This behaviour
persists once allocate_clear rate limiting is no longer in effect.
We can avoid getting having multiple rows with the same client details
by amending the allocate_find query to include an existing row matching
nasipaddress and pool_key in the available set of IP addreses regardless
of whether the lease has expired or not (i.e. re-allocation of a current
lease to the same client).
Terry Burton [Fri, 30 Aug 2019 14:59:16 +0000 (15:59 +0100)]
SQLite: Don't require a lease to have expired if we reallocate it to the previous client
The current default allocate_find query causes per-client IP allocation
instability that starts when allocate_clear rate limiting comes into
effect.
With initial pool conditions the default alloc_find query selects from
the pool of all *expired* leases. It selects the least recently used IP
address (i.e. the one with the oldest expiry_time) unless a matching
username and/or callingstationid exists in the table in which case these
are prioritised in order to issue the client with their previous lease.
Normally picking the least recently used address helps to avoid issuing
the address to a different client, maximising the chance of stickiness,
which is desirable.
However, if a user makes successive authentication attempts whilst
allocate_clear rate limiting is active they are always allocated a
different IP address because their existing address is unavailable (has
not yet expired and has not been explicitly expired by allocate_clear),
with the effect that there are now multiple rows in the table containing
the same pool_key, username and callingstationid.
The normal ordering then has the undesirable effect of ensuring that
successive future IP address selections for the client will flip-flop
between addresses because username + callingstationid are first
prioritied then the *oldest expiry_time* is chosen (rather than the most
recent expiry relating to the most recent lease). This behaviour
persists once allocate_clear rate limiting is no longer in effect.
We can avoid getting having multiple rows with the same client details
by amending the allocate_find query to include an existing row matching
nasipaddress and pool_key in the available set of IP addreses regardless
of whether the lease has expired or not (i.e. re-allocation of a current
lease to the same client).