=== rlm_eap
-All certificate attributes are available in the `&session-state:`
+All certificate attributes are available in the `&session-state.`
list, immediately after they are parsed from their ASN1 form.
The certificates are no longer added to the `&request.` list. Instead,
any references during the upgrade to 4.0:
```
-s/TLS-Cert-/session-state:TLS-Cert-/
+s/TLS-Cert-/session-state.TLS-Cert-/
```
The `rlm_eap_ikev2` module was removed. It does not follow RFC 5106,
key = &Session-Id
ttl = 3600 # 60 mins
update {
- &session-state:Session-Data := &session-state:Session-Data
+ &session-state.Session-Data := &session-state.Session-Data
# &session-state: += &session-state:
}
}
cache cache_ocsp {
driver = "rlm_cache_rbtree"
- key = &session-state:TLS-Client-Cert-Serial
+ key = &session-state.TLS-Client-Cert-Serial
update {
&control.TLS-OCSP-Cert-Valid := &TLS-OCSP-Cert-Valid
&control.TLS-OCSP-Response := &TLS-OCSP-Response
If using the default `tls-cache` virtual server and
cache module config, policy attributes may be stored in the
-`&session-state:` list.
+`&session-state.` list.
virtual_server::
else {
update control {
Auth-Type := Step2
- Cleartext-Password := &session-state:Tmp-Integer-0
+ Cleartext-Password := &session-state.Tmp-Integer-0
}
}
}
Tmp-Integer-0 := "%{randstr:n}"
}
update reply {
- Reply-Message := &session-state:Tmp-Integer-0
+ Reply-Message := &session-state.Tmp-Integer-0
}
challenge
}
The following actions are associated with the various
`Identity-Type` values:
- `Permanent`:: The current `&Identity` value will be copied to
- `&session-state:Permanent-Identity`. The hint byte
+ `&session-state.Permanent-Identity`. The hint byte
will be stripped if the hint matches the current
EAP-Method. If the hint byte does not match
the current EAP-Method the complete value of
NOTE: If you're using 3GPP style encrypted pseudonyms, you should
decrypt the pseudonym here, and store the decrypted value in
-`&session-state:Permanent-Identity`.
+`&session-state.Permanent-Identity`.
attribute is found, this section will be called.
You should restore the contents of the following attributes using
-`&session-state:Session-ID` or `&reply.Next-Reauth-Id` as a key:
+`&session-state.Session-ID` or `&reply.Next-Reauth-Id` as a key:
-- `&session-state:Counter`:: How many times this session has
+- `&session-state.Counter`:: How many times this session has
been resumed.
-- `&session-state:Session-Data`:: The master session key.
+- `&session-state.Session-Data`:: The master session key.
- `&session-State:Permanent-Identity`::(optionally) the permanent
identity of the user.
This section will be called prior to attempting re-authentication.
You should restore the contents of the following attributes using
-`&session-state:Session-ID` or `&reply.Next-Reauth-Id` as a key:
+`&session-state.Session-ID` or `&reply.Next-Reauth-Id` as a key:
-- `&session-state:Counter`:: How many times this session has
+- `&session-state.Counter`:: How many times this session has
been resumed.
-- `&session-state:Session-Data`:: The master session key.
+- `&session-state.Session-Data`:: The master session key.
- `&session-State:Permanent-Identity`::(optionally) the permanent
identity of the user.
recv Authentication {
if (&TACACS-Sequence-Number > 1) {
update request {
- TACACS-Authentication-Type = &session-state:TACACS-Authentication-Type
+ TACACS-Authentication-Type = &session-state.TACACS-Authentication-Type
}
}
switch &TACACS-Authentication-Type {
}
} else {
update request {
- User-Name = &session-state:User-Name
- User-Password = &session-state:User-Password
+ User-Name = &session-state.User-Name
+ User-Password = &session-state.User-Password
}
}
if (!&User-Name) {
}
} else {
update request {
- User-Name = &session-state:User-Name
+ User-Name = &session-state.User-Name
}
}
if (!&User-Password) {
This section is run whenever the server needs to read an
entry from the TLS session cache.
-It should read the attribute &session-state:TLS-Session-Data
+It should read the attribute &session-state.TLS-Session-Data
from the cache, along with any other attributes which
were in the cache
This section is run whenever the server needs to write an
entry to the TLS session cache.
-It should write the attribute &session-state:Session-Data
+It should write the attribute &session-state.Session-Data
to the cache, along with any other attributes which
need to be cached.
.Examples
`&parent.request.User-Name` +
`&parent.reply.Reply-Message` +
-`&parent.parent.session-state:Filter-Id`
+`&parent.parent.session-state.Filter-Id`
# update <section> { ... }::
#
update {
- &session-state:Session-Data := &session-state:Session-Data
+ &session-state.Session-Data := &session-state.Session-Data
#
# NOTE: If you want to store authorization attributes too, consider
#
# key:: `cache` key.
#
- key = &session-state:TLS-Client-Cert-Serial
+ key = &session-state.TLS-Client-Cert-Serial
#
# update <section> { ... }::
#
# If using the default `tls-cache` virtual server and
# cache module config, policy attributes may be stored in the
- # `&session-state:` list.
+ # `&session-state.` list.
#
cache {
#
# Outputs the contents of the session state list in debugging (-X) mode
#
debug_session_state {
- if ("%{debug_attr:session-state:[*]}" == '') {
+ if ("%{debug_attr:session-state.[*]}" == '') {
noop
}
}
filter_username {
if (&State) {
if (&User-Name) {
- if (!&session-state:Session-State-User-Name) {
+ if (!&session-state.Session-State-User-Name) {
update request {
- &Module-Failure-Message += 'No cached session-state:Session-State-User-Name'
+ &Module-Failure-Message += 'No cached session-state.Session-State-User-Name'
}
reject
}
- if (&User-Name != &session-state:Session-State-User-Name) {
+ if (&User-Name != &session-state.Session-State-User-Name) {
update request {
- &Module-Failure-Message += 'User-Name does not match cached session-state:Session-State-User-Name'
+ &Module-Failure-Message += 'User-Name does not match cached session-state.Session-State-User-Name'
}
reject
}
#
update control {
Auth-Type := Step2
- Cleartext-Password := &session-state:Tmp-Integer-0
+ Cleartext-Password := &session-state.Tmp-Integer-0
}
}
}
Tmp-Integer-0 := "%{randstr:n}"
}
update reply {
- Reply-Message := &session-state:Tmp-Integer-0
+ Reply-Message := &session-state.Tmp-Integer-0
}
#
# The following actions are associated with the various
# `Identity-Type` values:
# - `Permanent`:: The current `&Identity` value will be copied to
- # `&session-state:Permanent-Identity`. The hint byte
+ # `&session-state.Permanent-Identity`. The hint byte
# will be stripped if the hint matches the current
# EAP-Method. If the hint byte does not match
# the current EAP-Method the complete value of
#
# NOTE: If you're using 3GPP style encrypted pseudonyms, you should
# decrypt the pseudonym here, and store the decrypted value in
- # `&session-state:Permanent-Identity`.
+ # `&session-state.Permanent-Identity`.
#
load pseudonym {
ok
# attribute is found, this section will be called.
#
# You should restore the contents of the following attributes using
- # `&session-state:Session-ID` or `&reply.Next-Reauth-Id` as a key:
+ # `&session-state.Session-ID` or `&reply.Next-Reauth-Id` as a key:
#
- # - `&session-state:Counter`:: How many times this session has
+ # - `&session-state.Counter`:: How many times this session has
# been resumed.
- # - `&session-state:Session-Data`:: The master session key.
+ # - `&session-state.Session-Data`:: The master session key.
# - `&session-State:Permanent-Identity`::(optionally) the permanent
# identity of the user.
#
# This section will be called prior to attempting re-authentication.
#
# You should restore the contents of the following attributes using
- # `&session-state:Session-ID` or `&reply.Next-Reauth-Id` as a key:
+ # `&session-state.Session-ID` or `&reply.Next-Reauth-Id` as a key:
#
- # - `&session-state:Counter`:: How many times this session has
+ # - `&session-state.Counter`:: How many times this session has
# been resumed.
- # - `&session-state:Session-Data`:: The master session key.
+ # - `&session-state.Session-Data`:: The master session key.
# - `&session-State:Permanent-Identity`::(optionally) the permanent
# identity of the user.
#
# This section is run whenever the server needs to read an
# entry from the TLS session cache.
#
- # It should read the attribute &session-state:TLS-Session-Data
+ # It should read the attribute &session-state.TLS-Session-Data
# from the cache, along with any other attributes which
# were in the cache
#
# This section is run whenever the server needs to write an
# entry to the TLS session cache.
#
- # It should write the attribute &session-state:Session-Data
+ # It should write the attribute &session-state.Session-Data
# to the cache, along with any other attributes which
# need to be cached.
#
* to form the real permanent ID.
*
* Otherwise copy the entire incoming Identity to the
- * &session-state:Permanent-Identity attribute.
+ * &session-state.Permanent-Identity attribute.
*
* @param[in] request The current request.
* @param[in] in current identity.
fr_aka_sim_hint_byte(AKA_SIM_ID_TYPE_PERMANENT, expected_method),
fr_aka_sim_hint_byte(our_type, our_method));
RINDENT();
- RDEBUG2("&session-state:%pP", vp);
+ RDEBUG2("&session-state.%pP", vp);
REXDENT();
} else {
/*
RDEBUG2("Stripping 'hint' byte from %s", attr_eap_aka_sim_permanent_identity->name);
RINDENT();
- RDEBUG2("&session-state:%pP", vp);
+ RDEBUG2("&session-state.%pP", vp);
REXDENT();
}
*/
counter_vp = fr_pair_find_by_da(vps, attr_eap_aka_sim_counter);
if (!counter_vp) {
- RDEBUG2("No &session-state:%s attribute found, can't calculate re-auth keys",
+ RDEBUG2("No &session-state.%s attribute found, can't calculate re-auth keys",
attr_eap_aka_sim_counter->name);
return 1;
}
mk_vp = fr_pair_find_by_da(vps, attr_session_data);
if (!mk_vp) mk_vp = fr_pair_find_by_da(vps, attr_eap_aka_sim_mk);
if (!mk_vp) {
- RDEBUG2("Neither &session-state:%s or &session-state:%s attributes found, "
+ RDEBUG2("Neither &session-state.%s or &session-state.%s attributes found, "
"can't calculate re-auth keys", attr_session_data->name, attr_eap_aka_sim_mk->name);
return 1;
}
if (mk_vp->vp_length != AKA_SIM_MK_SIZE) {
- REDEBUG("&session-state:%s incorrect length. Expected "
+ REDEBUG("&session-state.%s incorrect length. Expected "
STRINGIFY(AKA_SIM_MK_SIZE) " bytes, got %zu bytes",
attr_eap_aka_sim_mk->name, mk_vp->vp_length);
return -1;
*/
counter_vp = fr_pair_find_by_da(vps, attr_eap_aka_sim_counter);
if (!counter_vp) {
- RDEBUG2("No &session-state:%s attribute found, can't calculate re-auth keys",
+ RDEBUG2("No &session-state.%s attribute found, can't calculate re-auth keys",
attr_eap_aka_sim_counter->name);
return 1;
}
k_re_vp = fr_pair_find_by_da(vps, attr_session_data);
if (!k_re_vp) k_re_vp = fr_pair_find_by_da(vps, attr_eap_aka_sim_k_re);
if (!k_re_vp) {
- RDEBUG2("Neither &session-state:%s or &session-sate:%s attributes found, "
+ RDEBUG2("Neither &session-state.%s or &session-sate:%s attributes found, "
"can't calculate re-auth keys", attr_session_data->name, attr_eap_aka_sim_k_re->name);
return 1;
}
if (k_re_vp->vp_length != AKA_SIM_K_RE_SIZE) {
- REDEBUG("&session-state:%s incorrect length. Expected "
+ REDEBUG("&session-state.%s incorrect length. Expected "
STRINGIFY(AKA_SIM_K_RE_SIZE) " bytes, got %zu bytes",
attr_eap_aka_sim_mk->name, k_re_vp->vp_length);
return -1;
if (request->state) {
RDEBUG2("Restored &session-state");
- log_request_pair_list(L_DBG_LVL_2, request, request->state, "&session-state:");
+ log_request_pair_list(L_DBG_LVL_2, request, request->state, "&session-state.");
}
/*
if (request->state) {
RDEBUG2("Saving &session-state");
- log_request_pair_list(L_DBG_LVL_2, request, request->state, "&session-state:");
+ log_request_pair_list(L_DBG_LVL_2, request, request->state, "&session-state.");
}
vp = fr_pair_find_by_da(request->packet->vps, state->da);
MEM(vp = fr_pair_afrom_da(request->state_ctx, attr_tls_session_data));
fr_pair_value_memdup(vp, tls_session->session_blob, talloc_array_length(tls_session->session_blob), false);
RINDENT();
- RDEBUG2("&session-state:%pP", vp);
+ RDEBUG2("&session-state.%pP", vp);
REXDENT();
fr_pair_add(&request->state, vp);
fr_pair_value_strdup(vp, SSL_CIPHER_get_name(cipher));
fr_pair_add(&request->state, vp);
RINDENT();
- RDEBUG2("&session-state:%pP", vp);
+ RDEBUG2("&session-state.%pP", vp);
REXDENT();
}
fr_pair_value_strdup(vp, version);
fr_pair_add(&request->state, vp);
RINDENT();
- RDEBUG2("&session-state:TLS-Session-Version := \"%s\"", version);
+ RDEBUG2("&session-state.TLS-Session-Version := \"%s\"", version);
REXDENT();
}
/*
* Print out all the pairs we have so far
*/
- log_request_pair_list(L_DBG_LVL_2, request, cert_vps, "&session-state:");
+ log_request_pair_list(L_DBG_LVL_2, request, cert_vps, "&session-state.");
/*
* cert_vps have a different talloc parent, so we
# update <section> { ... }::
#
update {
- &session-state:Session-Data := &session-state:Session-Data
- &session-state:Counter := &session-state:Counter
+ &session-state.Session-Data := &session-state.Session-Data
+ &session-state.Counter := &session-state.Counter
}
}
\ No newline at end of file
namespace = eap-aka-prime
recv Identity-Response {
- "%{debug_attr:&session-state:}"
- if (!&session-state:Tmp-String-0) {
+ "%{debug_attr:&session-state.}"
+ if (!&session-state.Tmp-String-0) {
update reply {
&Any-ID-Req := yes
}
# update <section> { ... }::
#
update {
- &session-state:Session-Data := &session-state:Session-Data
- &session-state:Counter := &session-state:Counter
+ &session-state.Session-Data := &session-state.Session-Data
+ &session-state.Counter := &session-state.Counter
}
}
\ No newline at end of file
namespace = eap-aka
recv Identity-Response {
- "%{debug_attr:&session-state:}"
- if (!&session-state:Tmp-String-0) {
+ "%{debug_attr:&session-state.}"
+ if (!&session-state.Tmp-String-0) {
update reply {
&Any-ID-Req := yes
}
# update <section> { ... }::
#
update {
- &session-state:Session-Data := &session-state:Session-Data
- &session-state:Counter := &session-state:Counter
+ &session-state.Session-Data := &session-state.Session-Data
+ &session-state.Counter := &session-state.Counter
}
}
\ No newline at end of file
namespace = eap-sim
recv Identity-Response {
- "%{debug_attr:&session-state:}"
- if (!&session-state:Tmp-String-0) {
+ "%{debug_attr:&session-state.}"
+ if (!&session-state.Tmp-String-0) {
update reply {
&Any-ID-Req := yes
}
#
# List existence checks are "is the list empty" checks.
#
-if (&session-state:) {
+if (&session-state.) {
test_fail
}
-if (&session-state:[*]) {
+if (&session-state.[*]) {
test_fail
}
-if (&session-state:) {
+if (&session-state.) {
test_fail
}
&User-Name := 'foo'
}
-if (!&session-state:) {
+if (!&session-state.) {
test_fail
}
-if (!&session-state:[*]) {
+if (!&session-state.[*]) {
test_fail
}
test_fail
}
-if (&session-state:Reply-Message[0] == 'hello') {
+if (&session-state.Reply-Message[0] == 'hello') {
test_pass
}
else {
test_fail
}
-if (&session-state:Reply-Message[1] == 'goodbye') {
+if (&session-state.Reply-Message[1] == 'goodbye') {
test_pass
}
else {
# Outputs the contents of the session state list in debugging (-X) mode
#
debug_session_state {
- if("%{debug_attr:session-state:[*]}" == '') {
+ if("%{debug_attr:session-state.[*]}" == '') {
noop
}
}