From: Arran Cudbard-Bell Date: Mon, 21 Sep 2020 21:32:36 +0000 (-0500) Subject: s/request:/request./ X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e470ed910d05cb987bb2cb72886e45a3ea6980b1;p=thirdparty%2Ffreeradius-server.git s/request:/request./ --- diff --git a/doc/antora/modules/howto/pages/modules/ldap/authentication.adoc b/doc/antora/modules/howto/pages/modules/ldap/authentication.adoc index 71ab360c9c2..1905d330e2a 100644 --- a/doc/antora/modules/howto/pages/modules/ldap/authentication.adoc +++ b/doc/antora/modules/howto/pages/modules/ldap/authentication.adoc @@ -82,7 +82,7 @@ ldapsearch -LL -H ldap://localhost -x -D cn=freeradius,dc=example,dc=com -w mypa *** the module decides it has everything it needs to do authentication so sets `&control:Auth-Type = pap` *** as RADIUS attributes were changed, it returns `updated` as a result code to unlang . the authenticate section runs and hands off to `pap` as `&control:Auth-Type = pap` was set earlier - ** `&control:Cleartext-Password` is compared to `&request:User-Password` + ** `&control:Cleartext-Password` is compared to `&request.User-Password` ** matches so `ok` is returned . we return `Access-Accept` as `ok` was returned to unlang diff --git a/doc/antora/modules/installation/pages/upgrade.adoc b/doc/antora/modules/installation/pages/upgrade.adoc index eda51471464..66a2e64be7a 100644 --- a/doc/antora/modules/installation/pages/upgrade.adoc +++ b/doc/antora/modules/installation/pages/upgrade.adoc @@ -518,7 +518,7 @@ call to a cache module instance. Both default to `yes`. 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, +The certificates are no longer added to the `&request.` list. Instead, they are added to the `session-state` list. You are advised to update any references during the upgrade to 4.0: @@ -609,7 +609,7 @@ recv Access-Request { === rlm_rest -`REST-HTTP-Code` is now inserted into the `&request:` list instead +`REST-HTTP-Code` is now inserted into the `&request.` list instead of the `&reply:` list, to be compliant with the http://wiki.freeradius.org/guide/List-Usage[list usage] guidelines. diff --git a/doc/antora/modules/raddb/pages/mods-available/cache.adoc b/doc/antora/modules/raddb/pages/mods-available/cache.adoc index df07d14363e..f0f9166ab41 100644 --- a/doc/antora/modules/raddb/pages/mods-available/cache.adoc +++ b/doc/antora/modules/raddb/pages/mods-available/cache.adoc @@ -133,7 +133,7 @@ You should never set the "epoch" configuration item in this file. add_stats:: If `yes` the following attributes will be added to the request: - * `&request:Cache-Entry-Hits` - The number of times this entry + * `&request.Cache-Entry-Hits` - The number of times this entry has been retrieved. NOTE: Not supported by the `rlm_cache_memcached` module. diff --git a/doc/antora/modules/raddb/pages/mods-available/cache_eap.adoc b/doc/antora/modules/raddb/pages/mods-available/cache_eap.adoc index f16863932be..883237d08ba 100644 --- a/doc/antora/modules/raddb/pages/mods-available/cache_eap.adoc +++ b/doc/antora/modules/raddb/pages/mods-available/cache_eap.adoc @@ -72,7 +72,7 @@ cache cache_eap { ttl = 15 update reply { &reply: += &reply: - &control:State := &request:State + &control:State := &request.State } } ``` diff --git a/doc/antora/modules/raddb/pages/mods-available/dhcpv4.adoc b/doc/antora/modules/raddb/pages/mods-available/dhcpv4.adoc index aa2dffebc12..ee3c9abe46f 100644 --- a/doc/antora/modules/raddb/pages/mods-available/dhcpv4.adoc +++ b/doc/antora/modules/raddb/pages/mods-available/dhcpv4.adoc @@ -79,7 +79,7 @@ update request { &DHCP-Relay-Remote-Id := 0x010203040506 } update request { - &Tmp-Octets-0 := "%{dhcpv4_encode:&request:[*]}" + &Tmp-Octets-0 := "%{dhcpv4_encode:&request.[*]}" } if (&Tmp-Octets-0 != 0x520d0103abcdef0206010203040506) { update reply { diff --git a/doc/antora/modules/raddb/pages/mods-available/json.adoc b/doc/antora/modules/raddb/pages/mods-available/json.adoc index 093dea1936e..17509f91f45 100644 --- a/doc/antora/modules/raddb/pages/mods-available/json.adoc +++ b/doc/antora/modules/raddb/pages/mods-available/json.adoc @@ -227,7 +227,7 @@ The following will include all attributes in the RADIUS request, except for .Example ``` -%{json_encode:&request:[*] !&User-Password} +%{json_encode:&request.[*] !&User-Password} ``` In another (contrived) example, all the attributes in the RADIUS request will @@ -237,7 +237,7 @@ be included in the document, _except_ any attributes in the RADIUS reply. .Example ``` -%{json_encode:&request:[*] !&reply:[*] &control:User-Name} +%{json_encode:&request.[*] !&reply:[*] &control:User-Name} ``` #### Output format modes diff --git a/doc/antora/modules/raddb/pages/mods-available/passwd.adoc b/doc/antora/modules/raddb/pages/mods-available/passwd.adoc index 7b2e7094d5d..a2fe6cb1078 100644 --- a/doc/antora/modules/raddb/pages/mods-available/passwd.adoc +++ b/doc/antora/modules/raddb/pages/mods-available/passwd.adoc @@ -56,7 +56,7 @@ passwd file. * Attributes marked as `=` are added to the `&reply:` list, instead of default `&control:` list. - * Attributes marked as `~` are added to the `&request:` list. + * Attributes marked as `~` are added to the `&request.` list. * Field marked as `,` may contain a comma separated list of attributes. diff --git a/doc/antora/modules/raddb/pages/mods-available/yubikey.adoc b/doc/antora/modules/raddb/pages/mods-available/yubikey.adoc index 46473761849..c1a9d7801c1 100644 --- a/doc/antora/modules/raddb/pages/mods-available/yubikey.adoc +++ b/doc/antora/modules/raddb/pages/mods-available/yubikey.adoc @@ -25,8 +25,8 @@ Yubikey defaults to a 6 byte ID (2 * 6 = 12) split:: If true, the authorize method of `rlm_yubikey` will attempt to split the value of `link:https://freeradius.org/rfc/rfc2865.html#User-Password[User-Password]`, into the user's password, and the OTP token. -NOTE: If enabled and successful, the value of `&request:User-Password` will be -truncated and `&request:Yubikey-OTP` will be added. +NOTE: If enabled and successful, the value of `&request.User-Password` will be +truncated and `&request.Yubikey-OTP` will be added. @@ -77,7 +77,7 @@ These attributes are available after `authorization`: [options="header,autowidth"] |=== | Attributes | Description -| `&request:Yubikey-Public-ID` | The public portion of the OTP string. +| `&request.Yubikey-Public-ID` | The public portion of the OTP string. The value is a `id_len` modhex string. |=== @@ -86,7 +86,7 @@ and additionally if 'split' is set: [options="header,autowidth"] |=== | Attributes | Description -| `&request:Yubikey-OTP` | The OTP portion of `link:https://freeradius.org/rfc/rfc2865.html#User-Password[User-Password]`. +| `&request.Yubikey-OTP` | The OTP portion of `link:https://freeradius.org/rfc/rfc2865.html#User-Password[User-Password]`. |=== These attributes are available after authentication (if successful): @@ -94,19 +94,19 @@ These attributes are available after authentication (if successful): [options="header,autowidth"] |=== | Attributes | Description -| `&request:Yubikey-Private-ID` | The encrypted ID included in OTP data, +| `&request.Yubikey-Private-ID` | The encrypted ID included in OTP data, should be verified for increased security. The value is a `6-byte` binary blob. -| `&request:Yubikey-Counter` | The last counter value (should be recorded). +| `&request.Yubikey-Counter` | The last counter value (should be recorded). The value is a concatenation of the 16-bit session count & `8-bit` use count which form a `24-bit` monotonically strictly increasing integer (until the individual count ceilings are hit) -| `&request:Yubikey-Timestamp` | Token's internal clock (mainly useful for debugging). +| `&request.Yubikey-Timestamp` | Token's internal clock (mainly useful for debugging). The value is a 24-bit increasing `integer @ 8 Hz` with rollover which is randomly initialized each session. -| `&request:Yubikey-Random` | Randomly generated value from the token. +| `&request.Yubikey-Random` | Randomly generated value from the token. The value is a 16-bit integer. |=== diff --git a/doc/antora/modules/raddb/pages/sites-available/coa-relay.adoc b/doc/antora/modules/raddb/pages/sites-available/coa-relay.adoc index d9ce274989d..43131d0d2c4 100644 --- a/doc/antora/modules/raddb/pages/sites-available/coa-relay.adoc +++ b/doc/antora/modules/raddb/pages/sites-available/coa-relay.adoc @@ -238,7 +238,7 @@ server coa { } subrequest CoA-Request { update request { - &request := &parent.request:[*] + &request := &parent.request.[*] &Acct-Session-Id := &parent.control:Tmp-String-1 &Event-Timestamp := "%l" &Message-Authenticator := 0x00 diff --git a/doc/antora/modules/raddb/pages/sites-available/inner-tunnel.adoc b/doc/antora/modules/raddb/pages/sites-available/inner-tunnel.adoc index cc91f2a46d9..9fe4a85c601 100644 --- a/doc/antora/modules/raddb/pages/sites-available/inner-tunnel.adoc +++ b/doc/antora/modules/raddb/pages/sites-available/inner-tunnel.adoc @@ -36,7 +36,7 @@ from from v4.0. Individual attributes from the outer request may be accessed with: - &outer.request: + &outer.request. The following policy in raddb/policy.d/eap can be used to copy attributes over. @@ -306,7 +306,7 @@ send Access-Reject { -sql attr_filter.access_reject update outer.session-state { - &Module-Failure-Message := &request:Module-Failure-Message + &Module-Failure-Message := &request.Module-Failure-Message } } } # inner-tunnel server block diff --git a/doc/antora/modules/raddb/pages/sites-available/ldap_sync.adoc b/doc/antora/modules/raddb/pages/sites-available/ldap_sync.adoc index 6ad4e93e0e0..40ae7b1df09 100644 --- a/doc/antora/modules/raddb/pages/sites-available/ldap_sync.adoc +++ b/doc/antora/modules/raddb/pages/sites-available/ldap_sync.adoc @@ -77,10 +77,10 @@ Provides FreeRADIUS with the last cookie value we received for the sync A request will be generated with the following attributes: -- &request:LDAP-Sync-DN the base_dn of the sync. -- &request:LDAP-Sync-Filter the filter of the sync (optional). -- &request:LDAP-Sync-Scope the scope of the sync (optional). -- &request:LDAP-Sync-attr the attributes returned by the sync (optional). +- &request.LDAP-Sync-DN the base_dn of the sync. +- &request.LDAP-Sync-Filter the filter of the sync (optional). +- &request.LDAP-Sync-Scope the scope of the sync (optional). +- &request.LDAP-Sync-attr the attributes returned by the sync (optional). You should use these attributes to uniquely identify the sync when retrieving previous cookie values. @@ -101,11 +101,11 @@ Stores the latest cookie we've received for a sync A request will be generated with the following attributes: -- &request:LDAP-Sync-DN the base_dn of the sync. -- &request:LDAP-Sync-Cookie the cookie value to store. -- &request:LDAP-Sync-Filter the filter of the sync (optional). -- &request:LDAP-Sync-Scope the scope of the sync (optional). -- &request:LDAP-Sync-attr the attributes returned by the sync (optional). +- &request.LDAP-Sync-DN the base_dn of the sync. +- &request.LDAP-Sync-Cookie the cookie value to store. +- &request.LDAP-Sync-Filter the filter of the sync (optional). +- &request.LDAP-Sync-Scope the scope of the sync (optional). +- &request.LDAP-Sync-attr the attributes returned by the sync (optional). The return code of this section is ignored. @@ -119,14 +119,14 @@ a refreshDeletes phase. A request will be generated with the following attributes: -- &request:LDAP-Sync-DN the base_dn of the sync. -- &request:LDAP-Sync-Entry-UUID the UUID of the object. -- &request:LDAP-Sync-Entry-DN the DN of the object that was added. +- &request.LDAP-Sync-DN the base_dn of the sync. +- &request.LDAP-Sync-Entry-UUID the UUID of the object. +- &request.LDAP-Sync-Entry-DN the DN of the object that was added. - &*:* attributes mapped from the LDAP entry to FreeRADIUS attributes using the update section within the sync. -- &request:LDAP-Sync-Filter the filter of the sync (optional). -- &request:LDAP-Sync-Scope the scope of the sync (optional). -- &request:LDAP-Sync-attr the attributes returned by the sync (optional). +- &request.LDAP-Sync-Filter the filter of the sync (optional). +- &request.LDAP-Sync-Scope the scope of the sync (optional). +- &request.LDAP-Sync-attr the attributes returned by the sync (optional). The return code of this section is ignored (for now). @@ -140,14 +140,14 @@ a refreshDeletes phase. A request will be generated with the following attributes: -- &request:LDAP-Sync-DN the base_dn of the sync. -- &request:LDAP-Sync-Entry-UUID the UUID of the object. -- &request:LDAP-Sync-Entry-DN the DN of the object that was added. +- &request.LDAP-Sync-DN the base_dn of the sync. +- &request.LDAP-Sync-Entry-UUID the UUID of the object. +- &request.LDAP-Sync-Entry-DN the DN of the object that was added. - &*:* attributes mapped from the LDAP entry to FreeRADIUS attributes using the update section within the sync. -- &request:LDAP-Sync-Filter the filter of the sync (optional). -- &request:LDAP-Sync-Scope the scope of the sync (optional). -- &request:LDAP-Sync-attr the attributes returned by the sync (optional). +- &request.LDAP-Sync-Filter the filter of the sync (optional). +- &request.LDAP-Sync-Scope the scope of the sync (optional). +- &request.LDAP-Sync-attr the attributes returned by the sync (optional). The return code of this section is ignored (for now). @@ -161,12 +161,12 @@ a refreshDeletes phase. A request will be generated with the following attributes: -- &request:LDAP-Sync-DN the base_dn of the sync. -- &request:LDAP-Sync-Entry-UUID the UUID of the object. -- &request:LDAP-Sync-Entry-DN the DN of the object that was added (optional). -- &request:LDAP-Sync-Filter the filter of the sync (optional). -- &request:LDAP-Sync-Scope the scope of the sync (optional). -- &request:LDAP-Sync-attr the attributes returned by the sync (optional). +- &request.LDAP-Sync-DN the base_dn of the sync. +- &request.LDAP-Sync-Entry-UUID the UUID of the object. +- &request.LDAP-Sync-Entry-DN the DN of the object that was added (optional). +- &request.LDAP-Sync-Filter the filter of the sync (optional). +- &request.LDAP-Sync-Scope the scope of the sync (optional). +- &request.LDAP-Sync-attr the attributes returned by the sync (optional). The return code of this section is ignored (for now). diff --git a/doc/antora/modules/raddb/pages/sites-available/originate-coa.adoc b/doc/antora/modules/raddb/pages/sites-available/originate-coa.adoc index d5a825506eb..635beca47b0 100644 --- a/doc/antora/modules/raddb/pages/sites-available/originate-coa.adoc +++ b/doc/antora/modules/raddb/pages/sites-available/originate-coa.adoc @@ -67,8 +67,8 @@ how it works. # User-Name # Acct-Session-Id # subrequest Disconnect-Request { -# &User-Name = &parent.request:User-Name -# &Acct-Session-Id = &parent.request:Acct-Session-Id +# &User-Name = &parent.request.User-Name +# &Acct-Session-Id = &parent.request.Acct-Session-Id # &NAS-IP-Address = &parent.NAS-IP-Address} # ... # } @@ -85,13 +85,13 @@ server originate-coa.example.com { recv Accounting-Request { subrequest Disconnect-Request { update request { - &User-Name := &parent.request:User-Name - &Acct-Session-Id := &parent.request:Acct-Session-Id - &NAS-Identifier := &parent.request:NAS-Identifier - &NAS-IP-Address := &parent.request:NAS-IP-Addres - &NAS-IPv6-Address := &parent.request:NAS-IPv6-Address - &NAS-Port := &parent.request:NAS-Port - &Framed-IP-Address := &parent.request:Framed-IP-Address + &User-Name := &parent.request.User-Name + &Acct-Session-Id := &parent.request.Acct-Session-Id + &NAS-Identifier := &parent.request.NAS-Identifier + &NAS-IP-Address := &parent.request.NAS-IP-Addres + &NAS-IPv6-Address := &parent.request.NAS-IPv6-Address + &NAS-Port := &parent.request.NAS-Port + &Framed-IP-Address := &parent.request.Framed-IP-Address } radius.coa } diff --git a/doc/antora/modules/tutorials/pages/unlang_splitting_strings.adoc b/doc/antora/modules/tutorials/pages/unlang_splitting_strings.adoc index 50aa1f93e13..39431f841ab 100644 --- a/doc/antora/modules/tutorials/pages/unlang_splitting_strings.adoc +++ b/doc/antora/modules/tutorials/pages/unlang_splitting_strings.adoc @@ -32,7 +32,7 @@ its components and setup the request for proxying. Create an unlang version of "suffix" that splits an incoming `&User-Name` into two components on the "@" separator. -The first component should be written to the `&request:Stripped-User-Name` +The first component should be written to the `&request.Stripped-User-Name` attribute and the second component should be written to the `&control:Stripped-User-Domain` attribute. diff --git a/doc/antora/modules/unlang/pages/detach.adoc b/doc/antora/modules/unlang/pages/detach.adoc index da57a4f2618..54785d91442 100644 --- a/doc/antora/modules/unlang/pages/detach.adoc +++ b/doc/antora/modules/unlang/pages/detach.adoc @@ -20,10 +20,10 @@ access any attributes in the parent. ---- subrequest Disconnect-Request { update request { - &User-Name := &parent.request:User-Name - &NAS-IP-Address := &parent.request:NAS-IP-Address - &NAS-Port := &parent.request:NAS-Port - &Acct-Session-Id := &parent.request:Acct-Session-Id + &User-Name := &parent.request.User-Name + &NAS-IP-Address := &parent.request.NAS-IP-Address + &NAS-Port := &parent.request.NAS-Port + &Acct-Session-Id := &parent.request.Acct-Session-Id } detach @@ -53,10 +53,10 @@ seconds. Only integer seconds can be set. ---- subrequest Disconnect-Request { update request { - &User-Name := &parent.request:User-Name - &NAS-IP-Address := &parent.request:NAS-IP-Address - &NAS-Port := &parent.request:NAS-Port - &Acct-Session-Id := &parent.request:Acct-Session-Id + &User-Name := &parent.request.User-Name + &NAS-IP-Address := &parent.request.NAS-IP-Address + &NAS-Port := &parent.request.NAS-Port + &Acct-Session-Id := &parent.request.Acct-Session-Id } update control { diff --git a/doc/antora/modules/unlang/pages/filter.adoc b/doc/antora/modules/unlang/pages/filter.adoc index 1860f26309c..5fba03e508b 100644 --- a/doc/antora/modules/unlang/pages/filter.adoc +++ b/doc/antora/modules/unlang/pages/filter.adoc @@ -20,7 +20,7 @@ usually `request`, `reply`, or `control`. + If the __ qualifier is omitted, then each entry inside of the `filter` section *must* be prefixed with a list name. For example, -`&request:User-Name ...` +`&request.User-Name ...` :: The server attribute which is being filtered via the given __. @@ -49,7 +49,7 @@ filter reply { The __ field sets the attribute list that will be filter. If the __ qualifier is omitted, then each entry inside of the `filter` section *must* be prefixed with a list name. For example, -`&request:User-Name ...` +`&request.User-Name ...` Please see the xref:list.adoc[list] page for valid list names. diff --git a/doc/antora/modules/unlang/pages/list.adoc b/doc/antora/modules/unlang/pages/list.adoc index 95f1b1e57b5..878b1d87c4c 100644 --- a/doc/antora/modules/unlang/pages/list.adoc +++ b/doc/antora/modules/unlang/pages/list.adoc @@ -50,6 +50,6 @@ the child is running, the parent is suspended. Once the child finishes, it is deleted, and is no longer accessible to the parent. .Examples -`&parent.request:User-Name` + +`&parent.request.User-Name` + `&parent.reply:Reply-Message` + `&parent.parent.session-state:Filter-Id` diff --git a/doc/antora/modules/unlang/pages/parallel.adoc b/doc/antora/modules/unlang/pages/parallel.adoc index 7bdcdf82cb2..6c83d674cd9 100644 --- a/doc/antora/modules/unlang/pages/parallel.adoc +++ b/doc/antora/modules/unlang/pages/parallel.adoc @@ -137,15 +137,15 @@ a different way from the parent `User-Name`, and it sees a parallel empty { group { update request { - &User-Name := "%{&parent.request:User-Name}@example.org" + &User-Name := "%{&parent.request.User-Name}@example.org" &User-Password := "hello" } radius1 } group { update request { - &User-Name := "%{&parent.request:User-Name}@example.com" - &User-Password := &parent.request:User-Password + &User-Name := "%{&parent.request.User-Name}@example.com" + &User-Password := &parent.request.User-Password } radius2 } diff --git a/doc/antora/modules/unlang/pages/subrequest.adoc b/doc/antora/modules/unlang/pages/subrequest.adoc index d4f28b6aded..a0f837a31eb 100644 --- a/doc/antora/modules/unlang/pages/subrequest.adoc +++ b/doc/antora/modules/unlang/pages/subrequest.adoc @@ -44,10 +44,10 @@ and can create any kind of packet. ---- subrequest Disconnect-Request { update request { - &User-Name := &parent.request:User-Name - &NAS-IP-Address := &parent.request:NAS-IP-Address - &NAS-Port := &parent.request:NAS-Port - &Acct-Session-Id := &parent.request:Acct-Session-Id + &User-Name := &parent.request.User-Name + &NAS-IP-Address := &parent.request.NAS-IP-Address + &NAS-Port := &parent.request.NAS-Port + &Acct-Session-Id := &parent.request.Acct-Session-Id } radius @@ -67,7 +67,7 @@ parsed in the context of the new protocol. ---- subrequest dhcpv4.DHCP-Discover { update request { - &DHCP-Your-IP-Address := &parent.request:Framed-IP-Address + &DHCP-Your-IP-Address := &parent.request.Framed-IP-Address ... } @@ -97,10 +97,10 @@ request, the child can no longer access any attributes in the parent. ---- subrequest Disconnect-Request { update request { - &User-Name := &parent.request:User-Name - &NAS-IP-Address := &parent.request:NAS-IP-Address - &NAS-Port := &parent.request:NAS-Port - &Acct-Session-Id := &parent.request:Acct-Session-Id + &User-Name := &parent.request.User-Name + &NAS-IP-Address := &parent.request.NAS-IP-Address + &NAS-Port := &parent.request.NAS-Port + &Acct-Session-Id := &parent.request.Acct-Session-Id } detach diff --git a/doc/antora/modules/unlang/pages/update.adoc b/doc/antora/modules/unlang/pages/update.adoc index f7dec592857..594278f7ead 100644 --- a/doc/antora/modules/unlang/pages/update.adoc +++ b/doc/antora/modules/unlang/pages/update.adoc @@ -19,7 +19,7 @@ usually `request`, `reply`, or `control`. + If the __ qualifier is omitted, then each entry inside of the `update` section *must* be prefixed with a list name. For example, -`&request:User-Name ...` +`&request.User-Name ...` :: The server attribute which is assigned the __. @@ -49,7 +49,7 @@ update reply { The __ field sets the attribute list that will be updated. If the __ qualifier is omitted, then each entry inside of the `update` section *must* be prefixed with a list name. For example, -`&request:User-Name ...` +`&request.User-Name ...` Please see the xref:list.adoc[list] page for valid list names. diff --git a/doc/antora/modules/unlang/pages/xlat/builtin.adoc b/doc/antora/modules/unlang/pages/xlat/builtin.adoc index d311ebb3fd3..e3960aa0810 100644 --- a/doc/antora/modules/unlang/pages/xlat/builtin.adoc +++ b/doc/antora/modules/unlang/pages/xlat/builtin.adoc @@ -219,7 +219,7 @@ Dynamically change the debug level to something high, recording the old level. [source,unlang] ---- recv Access-Request { - if (&request:User-Name == "bob") { + if (&request.User-Name == "bob") { "%{debug:4}" } else { "%{debug:0}" @@ -233,10 +233,10 @@ recv Access-Request { ``` ... (0) recv Access-Request { -(0) if (&request:User-Name == "bob") { +(0) if (&request.User-Name == "bob") { (0) EXPAND %{debug:4} (0) --> 2 -(0) } # if (&request:User-Name == "bob") (...) +(0) } # if (&request.User-Name == "bob") (...) (0) filter_username { (0) if (&State) { (0) ... @@ -256,8 +256,8 @@ expands to a zero-length string. [source,unlang] ---- recv Access-Request { - if (&request:User-Name == "bob") { - "%{debug_attr:request:[*]}" + if (&request.User-Name == "bob") { + "%{debug_attr:request.[*]}" } ... } @@ -268,15 +268,15 @@ recv Access-Request { ``` ... (0) recv Access-Request { -(0) if (&request:User-Name == "bob") { -(0) Attributes matching "request:[*]" -(0) &request:User-Name = bob -(0) &request:User-Password = hello -(0) &request:NAS-IP-Address = 127.0.1.1 -(0) &request:NAS-Port = 1 -(0) &request:Message-Authenticator = 0x9210ee447a9f4c522f5300eb8fc15e14 -(0) EXPAND %{debug_attr:request:[*]} -(0) } # if (&request:User-Name == "bob") (...) +(0) if (&request.User-Name == "bob") { +(0) Attributes matching "request.[*]" +(0) &request.User-Name = bob +(0) &request.User-Password = hello +(0) &request.NAS-IP-Address = 127.0.1.1 +(0) &request.NAS-Port = 1 +(0) &request.Message-Authenticator = 0x9210ee447a9f4c522f5300eb8fc15e14 +(0) EXPAND %{debug_attr:request.[*]} +(0) } # if (&request.User-Name == "bob") (...) ... ``` diff --git a/man/man5/unlang.5 b/man/man5/unlang.5 index cdd1033b53d..5cf0cb39cbc 100644 --- a/man/man5/unlang.5 +++ b/man/man5/unlang.5 @@ -313,7 +313,7 @@ parent. .br update request { .br - &User-Name = &parent.request:User-Name + &User-Name = &parent.request.User-Name .br ... .br @@ -473,7 +473,7 @@ an attribute of the given name. Some examples are: .DS User-Name .br - request:User-Name # same as above + request.User-Name # same as above .br reply:User-Name .br @@ -481,7 +481,7 @@ an attribute of the given name. Some examples are: .br Cisco-AVPAir[2] .br - outer.request:User-Name # from inside of a TTLS/PEAP tunnel + outer.request.User-Name # from inside of a TTLS/PEAP tunnel .DE Note that unlike C, there is no way to define new attributes at run-time. They MUST be declared in a dictionary file, and loaded when @@ -968,7 +968,7 @@ Generate HMAC-SHA1 of input data. .IP %{pairs:} Serialize attributes as comma-delimited string -e.g. "%{pairs:request:}" == "User-Name = 'foo', User-Password = 'bar', ..." +e.g. "%{pairs:request.}" == "User-Name = 'foo', User-Password = 'bar', ..." .IP %{base64:} Encode string as base64. @@ -1095,7 +1095,7 @@ string. When the value is an an attribute reference, it must take the form of "&Attribute-Name". The leading "&" signifies that the value is a reference. The "Attribute-Name" is an attribute name, such as -"User-Name" or "request:User-Name". When an attribute reference is +"User-Name" or "request.User-Name". When an attribute reference is used, both attributes must have the same data type. For example, "User-Name := &NAS-Port" is invalid, because "User-Name" is a string, and "NAS-Port" is an integer. diff --git a/raddb/mods-available/cache b/raddb/mods-available/cache index 162012b4492..c6350a0029e 100644 --- a/raddb/mods-available/cache +++ b/raddb/mods-available/cache @@ -167,7 +167,7 @@ cache { # add_stats:: # # If `yes` the following attributes will be added to the request: - # * `&request:Cache-Entry-Hits` - The number of times this entry + # * `&request.Cache-Entry-Hits` - The number of times this entry # has been retrieved. # # NOTE: Not supported by the `rlm_cache_memcached` module. diff --git a/raddb/mods-available/cache_eap b/raddb/mods-available/cache_eap index c44116fb77b..a9f9fc52ba0 100644 --- a/raddb/mods-available/cache_eap +++ b/raddb/mods-available/cache_eap @@ -71,6 +71,6 @@ cache cache_eap { # update reply { &reply: += &reply: - &control:State := &request:State + &control:State := &request.State } } diff --git a/raddb/mods-available/dhcpv4 b/raddb/mods-available/dhcpv4 index 55af0ba3497..63d556aff30 100644 --- a/raddb/mods-available/dhcpv4 +++ b/raddb/mods-available/dhcpv4 @@ -84,7 +84,7 @@ dhcpv4 { # &DHCP-Relay-Remote-Id := 0x010203040506 # } # update request { -# &Tmp-Octets-0 := "%{dhcpv4_encode:&request:[*]}" +# &Tmp-Octets-0 := "%{dhcpv4_encode:&request.[*]}" # } # if (&Tmp-Octets-0 != 0x520d0103abcdef0206010203040506) { # update reply { diff --git a/raddb/mods-available/json b/raddb/mods-available/json index 1e710e99864..c8ac8d34126 100644 --- a/raddb/mods-available/json +++ b/raddb/mods-available/json @@ -244,7 +244,7 @@ json { # .Example # # ``` -# %{json_encode:&request:[*] !&User-Password} +# %{json_encode:&request.[*] !&User-Password} # ``` # # In another (contrived) example, all the attributes in the RADIUS request will @@ -254,7 +254,7 @@ json { # .Example # # ``` -# %{json_encode:&request:[*] !&reply:[*] &control:User-Name} +# %{json_encode:&request.[*] !&reply:[*] &control:User-Name} # ``` # # #### Output format modes diff --git a/raddb/mods-available/passwd b/raddb/mods-available/passwd index ecadc6da742..3f451417eea 100644 --- a/raddb/mods-available/passwd +++ b/raddb/mods-available/passwd @@ -62,7 +62,7 @@ passwd etc_passwd { # * Attributes marked as `=` are added to the `&reply:` list, # instead of default `&control:` list. # - # * Attributes marked as `~` are added to the `&request:` list. + # * Attributes marked as `~` are added to the `&request.` list. # # * Field marked as `,` may contain a comma separated list of attributes. # diff --git a/raddb/mods-available/yubikey b/raddb/mods-available/yubikey index 5f691815cc2..e8bf973a293 100644 --- a/raddb/mods-available/yubikey +++ b/raddb/mods-available/yubikey @@ -31,8 +31,8 @@ yubikey { # split:: If true, the authorize method of `rlm_yubikey` will attempt to split the # value of `User-Password`, into the user's password, and the OTP token. # - # NOTE: If enabled and successful, the value of `&request:User-Password` will be - # truncated and `&request:Yubikey-OTP` will be added. + # NOTE: If enabled and successful, the value of `&request.User-Password` will be + # truncated and `&request.Yubikey-OTP` will be added. # # split = yes @@ -84,7 +84,7 @@ yubikey { # [options="header,autowidth"] # |=== # | Attributes | Description - # | `&request:Yubikey-Public-ID` | The public portion of the OTP string. + # | `&request.Yubikey-Public-ID` | The public portion of the OTP string. # The value is a `id_len` modhex string. # |=== # @@ -93,7 +93,7 @@ yubikey { # [options="header,autowidth"] # |=== # | Attributes | Description - # | `&request:Yubikey-OTP` | The OTP portion of `User-Password`. + # | `&request.Yubikey-OTP` | The OTP portion of `User-Password`. # |=== # # These attributes are available after authentication (if successful): @@ -101,19 +101,19 @@ yubikey { # [options="header,autowidth"] # |=== # | Attributes | Description - # | `&request:Yubikey-Private-ID` | The encrypted ID included in OTP data, + # | `&request.Yubikey-Private-ID` | The encrypted ID included in OTP data, # should be verified for increased security. # The value is a `6-byte` binary blob. - # | `&request:Yubikey-Counter` | The last counter value (should be recorded). + # | `&request.Yubikey-Counter` | The last counter value (should be recorded). # The value is a concatenation of the 16-bit # session count & `8-bit` use count which form a # `24-bit` monotonically strictly increasing # integer (until the individual count ceilings # are hit) - # | `&request:Yubikey-Timestamp` | Token's internal clock (mainly useful for debugging). + # | `&request.Yubikey-Timestamp` | Token's internal clock (mainly useful for debugging). # The value is a 24-bit increasing `integer @ 8 Hz` # with rollover which is randomly initialized each session. - # | `&request:Yubikey-Random` | Randomly generated value from the token. + # | `&request.Yubikey-Random` | Randomly generated value from the token. # The value is a 16-bit integer. # |=== # diff --git a/raddb/policy.d/abfab-tr b/raddb/policy.d/abfab-tr index a617a323310..e84867e274a 100644 --- a/raddb/policy.d/abfab-tr +++ b/raddb/policy.d/abfab-tr @@ -52,15 +52,15 @@ abfab_client_check { # A policy which is used to validate channel-bindings. # abfab_channel_bindings { - if (&GSS-Acceptor-Service-Name && (&outer.request:GSS-Acceptor-Service-Name != &GSS-Acceptor-Service-Name)) { + if (&GSS-Acceptor-Service-Name && (&outer.request.GSS-Acceptor-Service-Name != &GSS-Acceptor-Service-Name)) { reject } - if (&GSS-Acceptor-Host-Name && &outer.request:GSS-Acceptor-Host-Name != &GSS-Acceptor-Host-Name) { + if (&GSS-Acceptor-Host-Name && &outer.request.GSS-Acceptor-Host-Name != &GSS-Acceptor-Host-Name) { reject } - if (&GSS-Acceptor-Realm-Name && &outer.request:GSS-Acceptor-Realm-Name != &GSS-Acceptor-Realm-Name) { + if (&GSS-Acceptor-Realm-Name && &outer.request.GSS-Acceptor-Realm-Name != &GSS-Acceptor-Realm-Name) { reject } diff --git a/raddb/policy.d/cui b/raddb/policy.d/cui index a2ed6e9cd50..85e6948191c 100644 --- a/raddb/policy.d/cui +++ b/raddb/policy.d/cui @@ -72,7 +72,7 @@ cui.post-auth { if (&reply:Chargeable-User-Identity) { # Force User-Name to be the User-Name from the request update { - &reply:User-Name := &request:User-Name + &reply:User-Name := &request.User-Name } cuisql } @@ -80,8 +80,8 @@ cui.post-auth { cui-inner.post-auth { - if (&outer.request:Chargeable-User-Identity && \ - (&outer.request:Operator-Name || ('${policy.cui_require_operator_name}' != 'yes'))) { + if (&outer.request.Chargeable-User-Identity && \ + (&outer.request.Operator-Name || ('${policy.cui_require_operator_name}' != 'yes'))) { update reply { &Chargeable-User-Identity := "%{sha1:${policy.cui_hash_key}%{tolower:%{User-Name}%{%{outer.request.Operator-Name}:-}}}" } diff --git a/raddb/policy.d/debug b/raddb/policy.d/debug index 76f8feed907..3be849b0fa0 100644 --- a/raddb/policy.d/debug +++ b/raddb/policy.d/debug @@ -11,7 +11,7 @@ debug_control { # Outputs the contents of the request list in debugging (-X) mode # debug_request { - if ("%{debug_attr:request:[*]}" == '') { + if ("%{debug_attr:request.[*]}" == '') { noop } } diff --git a/raddb/policy.d/eap b/raddb/policy.d/eap index 1d3d2a34610..d9b2fc25f00 100644 --- a/raddb/policy.d/eap +++ b/raddb/policy.d/eap @@ -60,7 +60,7 @@ permit_only_eap { # PEAP and EAP-FAST require EAP inside of # the tunnel, so this check is OK. # If so, then there MUST be an outer EAP message. - if (!&outer.request || !&outer.request:EAP-Message) { + if (!&outer.request || !&outer.request.EAP-Message) { reject } } @@ -92,8 +92,8 @@ remove_reply_message_if_eap { # copy_request_to_tunnel { update request { - Calling-Station-Id = &outer.request:Calling-Station-Id - Called-Station-Id = &outer.request:Called-Station-Id + Calling-Station-Id = &outer.request.Calling-Station-Id + Called-Station-Id = &outer.request.Called-Station-Id } } diff --git a/raddb/policy.d/filter b/raddb/policy.d/filter index a67e7c9244e..39327dc9d66 100644 --- a/raddb/policy.d/filter +++ b/raddb/policy.d/filter @@ -133,7 +133,7 @@ filter_inner_identity { # # No names, reject. # - if (!&outer.request:User-Name || !&User-Name) { + if (!&outer.request.User-Name || !&User-Name) { update request { &Module-Failure-Message += "User-Name is required for tunneled authentication" } @@ -147,11 +147,11 @@ filter_inner_identity { # If the NAIs are the same, it violates user privacy, # but is allowed. # - if (&outer.request:User-Name != &User-Name) { + if (&outer.request.User-Name != &User-Name) { # # Get the outer realm. # - if (&outer.request:User-Name =~ /@([^@]+)$/) { + if (&outer.request.User-Name =~ /@([^@]+)$/) { update request { &Outer-Realm-Name = "%{1}" } @@ -163,7 +163,7 @@ filter_inner_identity { # We don't check for the full "anonymous", because # some vendors don't follow the standards. # - if (&outer.request:User-Name !~ /^(anon|@)/) { + if (&outer.request.User-Name !~ /^(anon|@)/) { update request { &Module-Failure-Message += "User-Name is not anonymized" } @@ -178,7 +178,7 @@ filter_inner_identity { # Otherwise, you could log in as outer "bob", and inner "doug", # and we'd have no idea which one was correct. # - elsif (&outer.request:User-Name !~ /^anon/) { + elsif (&outer.request.User-Name !~ /^anon/) { update request { &Module-Failure-Message += "User-Name is not anonymized" } diff --git a/raddb/sites-available/coa-relay b/raddb/sites-available/coa-relay index 941cf1ccd01..1a035bb7fea 100644 --- a/raddb/sites-available/coa-relay +++ b/raddb/sites-available/coa-relay @@ -172,7 +172,7 @@ server coa { # The subrequest begins empty, so initially copy all attributes # from the incoming request. # - &request := &parent.request:[*] + &request := &parent.request.[*] # # Add/override the session identification attributes looked up diff --git a/raddb/sites-available/dhcp b/raddb/sites-available/dhcp index 038fd5285bf..51e12a6fa3e 100644 --- a/raddb/sites-available/dhcp +++ b/raddb/sites-available/dhcp @@ -189,8 +189,8 @@ recv DHCP-Request { } # If the request is not for this server then silently discard it - if (&request:DHCP-DHCP-Server-Identifier && \ - &request:DHCP-DHCP-Server-Identifier != &control:DHCP-DHCP-Server-Identifier) { + if (&request.DHCP-DHCP-Server-Identifier && \ + &request.DHCP-DHCP-Server-Identifier != &control:DHCP-DHCP-Server-Identifier) { do_not_respond } @@ -225,7 +225,7 @@ recv DHCP-Request { if (ok) { update reply { - &DHCP-Your-IP-Address := "%{%{request.DHCP-Requested-IP-Address}:-{request:DHCP-Client-IP-Address}}" + &DHCP-Your-IP-Address := "%{%{request.DHCP-Requested-IP-Address}:-{request.DHCP-Client-IP-Address}}" } } diff --git a/raddb/sites-available/inner-tunnel b/raddb/sites-available/inner-tunnel index f458fa11b83..360bb69f0e4 100644 --- a/raddb/sites-available/inner-tunnel +++ b/raddb/sites-available/inner-tunnel @@ -53,7 +53,7 @@ recv Access-Request { # Individual attributes from the outer request may be # accessed with: # - # &outer.request: + # &outer.request. # # The following policy in raddb/policy.d/eap can be used # to copy attributes over. @@ -308,7 +308,7 @@ send Access-Reject { # Let the outer session know which module failed, and why. # update outer.session-state { - &Module-Failure-Message := &request:Module-Failure-Message + &Module-Failure-Message := &request.Module-Failure-Message } } } # inner-tunnel server block diff --git a/raddb/sites-available/ldap_sync b/raddb/sites-available/ldap_sync index bd621704cfa..ff04d4b48d0 100644 --- a/raddb/sites-available/ldap_sync +++ b/raddb/sites-available/ldap_sync @@ -110,10 +110,10 @@ server ldap { # # A request will be generated with the following attributes: # - # - &request:LDAP-Sync-DN the base_dn of the sync. - # - &request:LDAP-Sync-Filter the filter of the sync (optional). - # - &request:LDAP-Sync-Scope the scope of the sync (optional). - # - &request:LDAP-Sync-attr the attributes returned by the sync (optional). + # - &request.LDAP-Sync-DN the base_dn of the sync. + # - &request.LDAP-Sync-Filter the filter of the sync (optional). + # - &request.LDAP-Sync-Scope the scope of the sync (optional). + # - &request.LDAP-Sync-attr the attributes returned by the sync (optional). # # You should use these attributes to uniquely identify the sync when retrieving # previous cookie values. @@ -137,11 +137,11 @@ server ldap { # # A request will be generated with the following attributes: # - # - &request:LDAP-Sync-DN the base_dn of the sync. - # - &request:LDAP-Sync-Cookie the cookie value to store. - # - &request:LDAP-Sync-Filter the filter of the sync (optional). - # - &request:LDAP-Sync-Scope the scope of the sync (optional). - # - &request:LDAP-Sync-attr the attributes returned by the sync (optional). + # - &request.LDAP-Sync-DN the base_dn of the sync. + # - &request.LDAP-Sync-Cookie the cookie value to store. + # - &request.LDAP-Sync-Filter the filter of the sync (optional). + # - &request.LDAP-Sync-Scope the scope of the sync (optional). + # - &request.LDAP-Sync-attr the attributes returned by the sync (optional). # # The return code of this section is ignored. store Cookie { @@ -158,14 +158,14 @@ server ldap { # # A request will be generated with the following attributes: # - # - &request:LDAP-Sync-DN the base_dn of the sync. - # - &request:LDAP-Sync-Entry-UUID the UUID of the object. - # - &request:LDAP-Sync-Entry-DN the DN of the object that was added. + # - &request.LDAP-Sync-DN the base_dn of the sync. + # - &request.LDAP-Sync-Entry-UUID the UUID of the object. + # - &request.LDAP-Sync-Entry-DN the DN of the object that was added. # - &*:* attributes mapped from the LDAP entry to FreeRADIUS # attributes using the update section within the sync. - # - &request:LDAP-Sync-Filter the filter of the sync (optional). - # - &request:LDAP-Sync-Scope the scope of the sync (optional). - # - &request:LDAP-Sync-attr the attributes returned by the sync (optional). + # - &request.LDAP-Sync-Filter the filter of the sync (optional). + # - &request.LDAP-Sync-Scope the scope of the sync (optional). + # - &request.LDAP-Sync-attr the attributes returned by the sync (optional). # # The return code of this section is ignored (for now). recv Add { @@ -182,14 +182,14 @@ server ldap { # # A request will be generated with the following attributes: # - # - &request:LDAP-Sync-DN the base_dn of the sync. - # - &request:LDAP-Sync-Entry-UUID the UUID of the object. - # - &request:LDAP-Sync-Entry-DN the DN of the object that was added. + # - &request.LDAP-Sync-DN the base_dn of the sync. + # - &request.LDAP-Sync-Entry-UUID the UUID of the object. + # - &request.LDAP-Sync-Entry-DN the DN of the object that was added. # - &*:* attributes mapped from the LDAP entry to FreeRADIUS # attributes using the update section within the sync. - # - &request:LDAP-Sync-Filter the filter of the sync (optional). - # - &request:LDAP-Sync-Scope the scope of the sync (optional). - # - &request:LDAP-Sync-attr the attributes returned by the sync (optional). + # - &request.LDAP-Sync-Filter the filter of the sync (optional). + # - &request.LDAP-Sync-Scope the scope of the sync (optional). + # - &request.LDAP-Sync-attr the attributes returned by the sync (optional). # # The return code of this section is ignored (for now). recv Modify { @@ -206,12 +206,12 @@ server ldap { # # A request will be generated with the following attributes: # - # - &request:LDAP-Sync-DN the base_dn of the sync. - # - &request:LDAP-Sync-Entry-UUID the UUID of the object. - # - &request:LDAP-Sync-Entry-DN the DN of the object that was added (optional). - # - &request:LDAP-Sync-Filter the filter of the sync (optional). - # - &request:LDAP-Sync-Scope the scope of the sync (optional). - # - &request:LDAP-Sync-attr the attributes returned by the sync (optional). + # - &request.LDAP-Sync-DN the base_dn of the sync. + # - &request.LDAP-Sync-Entry-UUID the UUID of the object. + # - &request.LDAP-Sync-Entry-DN the DN of the object that was added (optional). + # - &request.LDAP-Sync-Filter the filter of the sync (optional). + # - &request.LDAP-Sync-Scope the scope of the sync (optional). + # - &request.LDAP-Sync-attr the attributes returned by the sync (optional). # # The return code of this section is ignored (for now). recv Delete { diff --git a/raddb/sites-available/originate-coa b/raddb/sites-available/originate-coa index c7896904519..d3f6f9de34a 100644 --- a/raddb/sites-available/originate-coa +++ b/raddb/sites-available/originate-coa @@ -31,8 +31,8 @@ # and call the `radius` module to send the packet. # # subrequest Disconnect-Request { -# &User-Name = &parent.request:User-Name -# &Acct-Session-Id = &parent.request:Acct-Session-Id +# &User-Name = &parent.request.User-Name +# &Acct-Session-Id = &parent.request.Acct-Session-Id # &NAS-IP-Address = &parent.NAS-IP-Address} # ... # } @@ -72,13 +72,13 @@ recv Accounting-Request { # attributes over. # update request { - &User-Name := &parent.request:User-Name - &Acct-Session-Id := &parent.request:Acct-Session-Id - &NAS-Identifier := &parent.request:NAS-Identifier - &NAS-IP-Address := &parent.request:NAS-IP-Addres - &NAS-IPv6-Address := &parent.request:NAS-IPv6-Address - &NAS-Port := &parent.request:NAS-Port - &Framed-IP-Address := &parent.request:Framed-IP-Address + &User-Name := &parent.request.User-Name + &Acct-Session-Id := &parent.request.Acct-Session-Id + &NAS-Identifier := &parent.request.NAS-Identifier + &NAS-IP-Address := &parent.request.NAS-IP-Addres + &NAS-IPv6-Address := &parent.request.NAS-IPv6-Address + &NAS-Port := &parent.request.NAS-Port + &Framed-IP-Address := &parent.request.Framed-IP-Address } # diff --git a/src/lib/server/client.c b/src/lib/server/client.c index 2d4cf7fb19a..08c94ee5ee9 100644 --- a/src/lib/server/client.c +++ b/src/lib/server/client.c @@ -963,7 +963,7 @@ RADCLIENT *client_afrom_request(TALLOC_CTX *ctx, REQUEST *request) fr_cursor_init(&cursor, &request->control); - RDEBUG2("Converting &request:control to client {...} section"); + RDEBUG2("Converting &request.control to client {...} section"); RINDENT(); for (vp = fr_cursor_init(&cursor, &request->control); diff --git a/src/lib/server/state.c b/src/lib/server/state.c index 3321bf6691c..2b942dcd287 100644 --- a/src/lib/server/state.c +++ b/src/lib/server/state.c @@ -616,7 +616,7 @@ void fr_state_to_request(fr_state_tree_t *state, REQUEST *request) */ vp = fr_pair_find_by_da(request->packet->vps, state->da); if (!vp) { - RDEBUG3("No &request:State attribute, can't restore &session-state"); + RDEBUG3("No &request.State attribute, can't restore &session-state"); if (request->seq_start == 0) request->seq_start = request->number; /* Need check for fake requests */ return; } diff --git a/src/lib/tls/cache.c b/src/lib/tls/cache.c index 368baa18be3..ca5c2fd5912 100644 --- a/src/lib/tls/cache.c +++ b/src/lib/tls/cache.c @@ -41,7 +41,7 @@ USES_APPLE_DEPRECATED_API /* OpenSSL API has been deprecated by Apple */ * * Adds the following attributes to the request: * - * - &request:Session-Id + * - &request.Session-Id * * Session identity will contain the binary session key used to create, retrieve * and delete cache entries related to the SSL session. diff --git a/src/lib/tls/ocsp.c b/src/lib/tls/ocsp.c index c97ca2a87e2..c1663ccdc1e 100644 --- a/src/lib/tls/ocsp.c +++ b/src/lib/tls/ocsp.c @@ -122,7 +122,7 @@ static int ocsp_staple_from_pair(REQUEST *request, SSL *ssl, VALUE_PAIR *vp) /** Store OCSP response as a TLS-OCSP-Response attribute * - * @note Adds &request:TLS-OCSP-Response to the current request, and adds + * @note Adds &request.TLS-OCSP-Response to the current request, and adds * stapling data to the current SSL session. * * @param out Where to write the TLS-OCSP-Response attribute. Will also diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index cbd4a42dca3..665a01906ab 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -831,7 +831,7 @@ done: * * Example: @verbatim -"%{debug_attr:&request:[*]}" +"%{debug_attr:&request.[*]}" @endverbatim * * @ingroup xlat_functions @@ -2157,8 +2157,8 @@ static xlat_action_t xlat_func_pack(TALLOC_CTX *ctx, fr_cursor_t *out, * * Example: @verbatim -"%{pairs:request:[*]}" == "User-Name = 'foo'User-Password = 'bar'" -"%{concat:, %{pairs:request:[*]}}" == "User-Name = 'foo', User-Password = 'bar'" +"%{pairs:request.[*]}" == "User-Name = 'foo'User-Password = 'bar'" +"%{concat:, %{pairs:request.[*]}}" == "User-Name = 'foo', User-Password = 'bar'" @endverbatim * * @see #xlat_func_concat diff --git a/src/modules/proto_arp/proto_arp_process.c b/src/modules/proto_arp/proto_arp_process.c index d1f331bc0cc..17da29fbfc5 100644 --- a/src/modules/proto_arp/proto_arp_process.c +++ b/src/modules/proto_arp/proto_arp_process.c @@ -79,7 +79,7 @@ static rlm_rcode_t mod_process(UNUSED module_ctx_t const *mctx, REQUEST *request dv = fr_dict_enum_by_value(attr_arp_operation, fr_box_uint16(request->packet->code)); if (!dv) { - REDEBUG("Failed to find value for &request:ARP-Operation"); + REDEBUG("Failed to find value for &request.ARP-Operation"); return RLM_MODULE_FAIL; } diff --git a/src/modules/proto_dhcpv4/proto_dhcpv4_process.c b/src/modules/proto_dhcpv4/proto_dhcpv4_process.c index cb13b7241a4..02c29b615cf 100644 --- a/src/modules/proto_dhcpv4/proto_dhcpv4_process.c +++ b/src/modules/proto_dhcpv4/proto_dhcpv4_process.c @@ -155,7 +155,7 @@ static rlm_rcode_t mod_process(UNUSED module_ctx_t const *mctx, REQUEST *request dv = fr_dict_enum_by_value(attr_message_type, fr_box_uint8(request->packet->code)); if (!dv) { - REDEBUG("Failed to find value for &request:DHCP-Message-Type"); + REDEBUG("Failed to find value for &request.DHCP-Message-Type"); return RLM_MODULE_FAIL; } diff --git a/src/modules/proto_radius/proto_radius_coa.c b/src/modules/proto_radius/proto_radius_coa.c index 7b65c4b11ad..f76f2f7e5ab 100644 --- a/src/modules/proto_radius/proto_radius_coa.c +++ b/src/modules/proto_radius/proto_radius_coa.c @@ -73,7 +73,7 @@ static rlm_rcode_t mod_process(UNUSED module_ctx_t const *mctx, REQUEST *request */ dv = fr_dict_enum_by_value(attr_packet_type, fr_box_uint32(request->packet->code)); if (!dv) { - REDEBUG("Failed to find value for &request:Packet-Type"); + REDEBUG("Failed to find value for &request.Packet-Type"); return RLM_MODULE_FAIL; } diff --git a/src/modules/proto_vmps/proto_vmps_process.c b/src/modules/proto_vmps/proto_vmps_process.c index 6f46919bd7d..b25a87eba46 100644 --- a/src/modules/proto_vmps/proto_vmps_process.c +++ b/src/modules/proto_vmps/proto_vmps_process.c @@ -65,7 +65,7 @@ static rlm_rcode_t mod_process(UNUSED module_ctx_t const *mctx, REQUEST *request dv = fr_dict_enum_by_value(attr_packet_type, fr_box_uint32(request->packet->code)); if (!dv) { - REDEBUG("Failed to find value for &request:VMPS-Packet-Type"); + REDEBUG("Failed to find value for &request.VMPS-Packet-Type"); return RLM_MODULE_FAIL; } diff --git a/src/modules/rlm_chap/rlm_chap.c b/src/modules/rlm_chap/rlm_chap.c index c0c2ea7e4e8..c9b22c4d6f2 100644 --- a/src/modules/rlm_chap/rlm_chap.c +++ b/src/modules/rlm_chap/rlm_chap.c @@ -173,12 +173,12 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(UNUSED module_ctx_t const * } if (chap->vp_length == 0) { - REDEBUG("&request:CHAP-Password is empty"); + REDEBUG("&request.CHAP-Password is empty"); return RLM_MODULE_INVALID; } if (chap->vp_length != RADIUS_CHAP_CHALLENGE_LENGTH + 1) { - REDEBUG("&request:CHAP-Password has invalid length"); + REDEBUG("&request.CHAP-Password has invalid length"); return RLM_MODULE_INVALID; } @@ -214,7 +214,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(UNUSED module_ctx_t const * vp = fr_pair_find_by_da(request->packet->vps, attr_chap_challenge); if (vp) { - RDEBUG2("Using challenge from &request:CHAP-Challenge"); + RDEBUG2("Using challenge from &request.CHAP-Challenge"); p = vp->vp_octets; length = vp->vp_length; } else { diff --git a/src/modules/rlm_dhcpv4/rlm_dhcpv4.c b/src/modules/rlm_dhcpv4/rlm_dhcpv4.c index 15659995a32..81a9a8c043f 100644 --- a/src/modules/rlm_dhcpv4/rlm_dhcpv4.c +++ b/src/modules/rlm_dhcpv4/rlm_dhcpv4.c @@ -136,7 +136,7 @@ static xlat_action_t dhcpv4_decode_xlat(TALLOC_CTX *ctx, fr_cursor_t *out, * * Example: @verbatim -%{dhcpv4_encode:&request:[*]} +%{dhcpv4_encode:&request.[*]} @endverbatim * * @ingroup xlat_functions diff --git a/src/modules/rlm_eap/types/rlm_eap_peap/peap.c b/src/modules/rlm_eap/types/rlm_eap_peap/peap.c index 25e285d0e16..a4ddd67a76d 100644 --- a/src/modules/rlm_eap/types/rlm_eap_peap/peap.c +++ b/src/modules/rlm_eap/types/rlm_eap_peap/peap.c @@ -760,7 +760,7 @@ static int CC_HINT(nonnull) setup_fake_request(REQUEST *request, REQUEST *fake, if (t->username) { vp = fr_pair_copy(fake->packet, t->username); fr_pair_add(&fake->packet->vps, vp); - RDEBUG2("Setting &request:User-Name from tunneled (inner) identity \"%s\"", + RDEBUG2("Setting &request.User-Name from tunneled (inner) identity \"%s\"", vp->vp_strvalue); } else { RDEBUG2("No tunnel username (SSL resumption?)"); diff --git a/src/modules/rlm_redis_ippool/rlm_redis_ippool.c b/src/modules/rlm_redis_ippool/rlm_redis_ippool.c index 4a135f5f956..1704bc4befc 100644 --- a/src/modules/rlm_redis_ippool/rlm_redis_ippool.c +++ b/src/modules/rlm_redis_ippool/rlm_redis_ippool.c @@ -1262,7 +1262,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(module_ctx_t const *mctx, REQ */ vp = fr_pair_find_by_da(request->packet->vps, attr_acct_status_type); if (!vp) { - RDEBUG2("Couldn't find &request:Acct-Status-Type or &control:Pool-Action, doing nothing..."); + RDEBUG2("Couldn't find &request.Acct-Status-Type or &control:Pool-Action, doing nothing..."); return RLM_MODULE_NOOP; } diff --git a/src/modules/rlm_rest/rlm_rest.c b/src/modules/rlm_rest/rlm_rest.c index ea14cd72b54..2d8f41d6d7e 100644 --- a/src/modules/rlm_rest/rlm_rest.c +++ b/src/modules/rlm_rest/rlm_rest.c @@ -166,11 +166,11 @@ static int rlm_rest_status_update(REQUEST *request, void *handle) code = rest_get_handle_code(handle); if (!code) { pair_delete_request(attr_rest_http_status_code); - RDEBUG2("&request:REST-HTTP-Status-Code !* ANY"); + RDEBUG2("&request.REST-HTTP-Status-Code !* ANY"); return -1; } - RDEBUG2("&request:REST-HTTP-Status-Code := %i", code); + RDEBUG2("&request.REST-HTTP-Status-Code := %i", code); MEM(pair_update_request(&vp, attr_rest_http_status_code) >= 0); vp->vp_uint32 = code; diff --git a/src/modules/rlm_yubikey/rlm_yubikey.c b/src/modules/rlm_yubikey/rlm_yubikey.c index c45ff06c1b3..fea5eb12352 100644 --- a/src/modules/rlm_yubikey/rlm_yubikey.c +++ b/src/modules/rlm_yubikey/rlm_yubikey.c @@ -315,11 +315,11 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(module_ctx_t const *mctx, REQU RINDENT(); if (RDEBUG_ENABLED3) { - RDEBUG3("&request:%pP", vp); - RDEBUG3("&request:%pP", password); + RDEBUG3("&request.%pP", vp); + RDEBUG3("&request.%pP", password); } else { - RDEBUG2("&request:%s := <<< secret >>>", vp->da->name); - RDEBUG2("&request:%s := <<< secret >>>", password->da->name); + RDEBUG2("&request.%s := <<< secret >>>", vp->da->name); + RDEBUG2("&request.%s := <<< secret >>>", password->da->name); } REXDENT(); diff --git a/src/tests/keywords/3gpp b/src/tests/keywords/3gpp index af389ca00ce..97b179daae0 100644 --- a/src/tests/keywords/3gpp +++ b/src/tests/keywords/3gpp @@ -6,12 +6,12 @@ update request { } # -# "request:[0-9]" should be parsed as a list followed +# "request.[0-9]" should be parsed as a list followed # by an attribute. # update control { &Tmp-String-0 := &3GPP-IMSI - &Tmp-String-1 := &request:3GPP-IMSI + &Tmp-String-1 := &request.3GPP-IMSI } success diff --git a/src/tests/keywords/cast-byte b/src/tests/keywords/cast-byte index e7b910611c5..0ffd6bc1681 100644 --- a/src/tests/keywords/cast-byte +++ b/src/tests/keywords/cast-byte @@ -2,7 +2,7 @@ # PRE: update if # update { - &request:Class := 0xad + &request.Class := 0xad } if (&Class == 173) { diff --git a/src/tests/keywords/cast-integer b/src/tests/keywords/cast-integer index d50be354085..ccc2f638a11 100644 --- a/src/tests/keywords/cast-integer +++ b/src/tests/keywords/cast-integer @@ -2,7 +2,7 @@ # PRE: update if # update { - &request:Class := 0x00000101 + &request.Class := 0x00000101 } if (&Class[0] == 257) { diff --git a/src/tests/keywords/cast-ipaddr b/src/tests/keywords/cast-ipaddr index 6c45684bf1f..e84fafe0e3b 100644 --- a/src/tests/keywords/cast-ipaddr +++ b/src/tests/keywords/cast-ipaddr @@ -2,8 +2,8 @@ # PRE: update if redundant # update { - &request:NAS-IP-Address := 127.0.0.1 - &request:Tmp-Integer-0 := 2130706433 + &request.NAS-IP-Address := 127.0.0.1 + &request.Tmp-Integer-0 := 2130706433 } update request { diff --git a/src/tests/keywords/cast-short b/src/tests/keywords/cast-short index ebacb4755db..4caddc631fa 100644 --- a/src/tests/keywords/cast-short +++ b/src/tests/keywords/cast-short @@ -2,7 +2,7 @@ # PRE: update if # update { - &request:Class := 0x0101 + &request.Class := 0x0101 } if (&Class == 257) { diff --git a/src/tests/keywords/comments b/src/tests/keywords/comments index 0f82415a4f2..5b02bda2789 100644 --- a/src/tests/keywords/comments +++ b/src/tests/keywords/comments @@ -16,22 +16,22 @@ update { #}'{ Opening block with extra special chars {} '" &control:User-Name := 'whatever' # do some random stuff } #{'} Closing block with extra special chars {} '" -update { &request:Tmp-String-0 := 'candy' } # Comment after unicorn block +update { &request.Tmp-String-0 := 'candy' } # Comment after unicorn block update request { - &request:Reply-Message += 'I am #literally a comment #' - &request:Reply-Message += "I am #literally a comment #" + &request.Reply-Message += 'I am #literally a comment #' + &request.Reply-Message += "I am #literally a comment #" } -if (&request:Tmp-String-0 != 'candy') { +if (&request.Tmp-String-0 != 'candy') { test_fail } -if (&request:Reply-Message[0] != 'I am #literally a comment #') { +if (&request.Reply-Message[0] != 'I am #literally a comment #') { test_fail } -if (&request:Reply-Message[1] != "I am #literally a comment #") { +if (&request.Reply-Message[1] != "I am #literally a comment #") { test_fail } diff --git a/src/tests/keywords/concat b/src/tests/keywords/concat index d1cd000cc32..695f4dcdcc1 100644 --- a/src/tests/keywords/concat +++ b/src/tests/keywords/concat @@ -2,21 +2,21 @@ # PRE: update if # update { - &request:Tmp-String-0 := "ab c" - &request:Tmp-String-0 += "de fg" - &request:Tmp-Integer-0 := 123 + &request.Tmp-String-0 := "ab c" + &request.Tmp-String-0 += "de fg" + &request.Tmp-Integer-0 := 123 } update { - &request:Tmp-String-1 := "%{concat:, %{request[*]}}" - &request:Tmp-String-2 := "%{concat:, %{Tmp-String-0[*]}}" + &request.Tmp-String-1 := "%{concat:, %{request[*]}}" + &request.Tmp-String-2 := "%{concat:, %{Tmp-String-0[*]}}" } -if (&request:Tmp-String-1 != "bob, hello, ab c, de fg, 123") { +if (&request.Tmp-String-1 != "bob, hello, ab c, de fg, 123") { test_fail } -if (&request:Tmp-String-2 != "ab c, de fg") { +if (&request.Tmp-String-2 != "ab c, de fg") { test_fail } diff --git a/src/tests/keywords/foreach-break b/src/tests/keywords/foreach-break index cbfb19ed9c0..71b3104eef1 100644 --- a/src/tests/keywords/foreach-break +++ b/src/tests/keywords/foreach-break @@ -27,35 +27,35 @@ foreach &Filter-Id { # Adding attribute during request and immediately breaking # update { - &request:Filter-Id += "1" - &request:Filter-Id += "2" + &request.Filter-Id += "1" + &request.Filter-Id += "2" } -foreach &request:Reply-Message { +foreach &request.Reply-Message { if("%{Foreach-Variable-0}" == "1") { update { - &request:Filter-Id += "3" + &request.Filter-Id += "3" } break } } update { - &request:Filter-Id !* ANY + &request.Filter-Id !* ANY } # # Adding attribute during request and continuing # update { - &request:Filter-Id += "1" - &request:Filter-Id += "2" + &request.Filter-Id += "1" + &request.Filter-Id += "2" } -foreach &request:Reply-Message { +foreach &request.Reply-Message { if("%{Foreach-Variable-0}" == "1") { update { - &request:Filter-Id += "3" + &request.Filter-Id += "3" } } diff --git a/src/tests/keywords/foreach-break-3 b/src/tests/keywords/foreach-break-3 index 8bf45dd3295..54386786de9 100644 --- a/src/tests/keywords/foreach-break-3 +++ b/src/tests/keywords/foreach-break-3 @@ -27,7 +27,7 @@ update control { } foreach &control:Calling-Station-Id { - if (&request:Calling-Station-Id == "%{Foreach-Variable-0}") { + if (&request.Calling-Station-Id == "%{Foreach-Variable-0}") { success break } diff --git a/src/tests/keywords/foreach-break-4 b/src/tests/keywords/foreach-break-4 index 87ae07f0132..d9ca4a81671 100644 --- a/src/tests/keywords/foreach-break-4 +++ b/src/tests/keywords/foreach-break-4 @@ -27,7 +27,7 @@ update control { } foreach &control:Calling-Station-Id { - if (&request:Calling-Station-Id == "%{Foreach-Variable-0}") { + if (&request.Calling-Station-Id == "%{Foreach-Variable-0}") { success break } diff --git a/src/tests/keywords/if-multivalue b/src/tests/keywords/if-multivalue index dfffe7b17e9..db3c80912e4 100644 --- a/src/tests/keywords/if-multivalue +++ b/src/tests/keywords/if-multivalue @@ -47,37 +47,37 @@ update control { # # Mmmm O(N^2) # -if (&request:Tmp-String-0[*] != &control:Tmp-String-0[*]) { +if (&request.Tmp-String-0[*] != &control:Tmp-String-0[*]) { test_fail } -if (&request:Tmp-String-0[*] == &control:Tmp-String-1[*]) { +if (&request.Tmp-String-0[*] == &control:Tmp-String-1[*]) { test_fail } -if (&request:Tmp-String-1[*] == &control:Tmp-String-0[*]) { +if (&request.Tmp-String-1[*] == &control:Tmp-String-0[*]) { test_fail } # # Integer comparison and normalisation # -if (&request:Tmp-Integer-0 != &control:Tmp-Integer-0) { +if (&request.Tmp-Integer-0 != &control:Tmp-Integer-0) { test_fail } # -# if any value of request:Tmp-Integer-0 > any value of -# request:Tmp-Integer-1 then evaluate to true +# if any value of request.Tmp-Integer-0 > any value of +# request.Tmp-Integer-1 then evaluate to true # -if (&request:Tmp-Integer-0[*] > &control:Tmp-Integer-1[*]) { +if (&request.Tmp-Integer-0[*] > &control:Tmp-Integer-1[*]) { test_fail } # # Compiled regex comparisons # -if (&request:Tmp-String-1[*] !~ /PEONS$/) { +if (&request.Tmp-String-1[*] !~ /PEONS$/) { test_fail } @@ -92,19 +92,19 @@ if (&control:Tmp-String-1 =~ /DINKS$/) { # # Dynamic regex comparisons # -if (&request:Tmp-String-1[*] !~ /%{Tmp-String-2[0]}$/) { +if (&request.Tmp-String-1[*] !~ /%{Tmp-String-2[0]}$/) { test_fail } -if (&request:Tmp-String-1 =~ /%{Tmp-String-2[1]}$/) { +if (&request.Tmp-String-1 =~ /%{Tmp-String-2[1]}$/) { test_fail } -if (&request:Tmp-String-1 !~ /%{Tmp-String-2[2]}$/) { +if (&request.Tmp-String-1 !~ /%{Tmp-String-2[2]}$/) { test_fail } -if (&request:Tmp-String-1 =~ /%{Tmp-String-2[#]}$/) { +if (&request.Tmp-String-1 =~ /%{Tmp-String-2[#]}$/) { test_fail } @@ -126,11 +126,11 @@ if (&control:Tmp-String-1[*] == 'foo') { test_fail } -if (&request:Tmp-Integer-0[*] > 10) { +if (&request.Tmp-Integer-0[*] > 10) { test_fail } -if (!(&request:Tmp-Integer-0[*] < 10)) { +if (!(&request.Tmp-Integer-0[*] < 10)) { test_fail } diff --git a/src/tests/keywords/map-xlat b/src/tests/keywords/map-xlat index 6bbd4725d89..3e5c4768740 100644 --- a/src/tests/keywords/map-xlat +++ b/src/tests/keywords/map-xlat @@ -5,8 +5,8 @@ # update { &Tmp-String-0 := '&control:Tmp-String-0 := \'testing123\'' - &Tmp-String-1 := "request:Alc-MSAP-Interface = 'UNICAST_7360OLT3'" - &Tmp-String-1 += "request:Alc-MSAP-Interface += 'UNICAST_7360OLT4'" + &Tmp-String-1 := "request.Alc-MSAP-Interface = 'UNICAST_7360OLT3'" + &Tmp-String-1 += "request.Alc-MSAP-Interface += 'UNICAST_7360OLT4'" } if ("%{map:%{Tmp-String-0}}" != 1) { @@ -23,11 +23,11 @@ foreach &Tmp-String-1[*] { } } -if (&request:Alc-MSAP-Interface[0] != 'UNICAST_7360OLT3') { +if (&request.Alc-MSAP-Interface[0] != 'UNICAST_7360OLT3') { test_fail } -if (&request:Alc-MSAP-Interface[1] != 'UNICAST_7360OLT4') { +if (&request.Alc-MSAP-Interface[1] != 'UNICAST_7360OLT4') { test_fail } diff --git a/src/tests/keywords/md4 b/src/tests/keywords/md4 index 1793b896930..91a4a80a8e4 100644 --- a/src/tests/keywords/md4 +++ b/src/tests/keywords/md4 @@ -2,11 +2,11 @@ # PRE: update if # update { - &request:Tmp-String-0 := "This is a string\n" - &request:Tmp-Octets-0 := 0x000504030201 - &request:Tmp-String-1 := "what do ya want for nothing?" - &request:Tmp-String-2 := "Jefe" - &request:Tmp-String-3 := "" + &request.Tmp-String-0 := "This is a string\n" + &request.Tmp-Octets-0 := 0x000504030201 + &request.Tmp-String-1 := "what do ya want for nothing?" + &request.Tmp-String-2 := "Jefe" + &request.Tmp-String-3 := "" } diff --git a/src/tests/keywords/md5 b/src/tests/keywords/md5 index 039f278be1f..7eb352d1d9e 100644 --- a/src/tests/keywords/md5 +++ b/src/tests/keywords/md5 @@ -2,11 +2,11 @@ # PRE: update if # update { - &request:Tmp-String-0 := "This is a string\n" - &request:Tmp-Octets-0 := 0x000504030201 - &request:Tmp-String-1 := "what do ya want for nothing?" - &request:Tmp-String-2 := "Jefe" - &request:Tmp-String-3 := "" + &request.Tmp-String-0 := "This is a string\n" + &request.Tmp-Octets-0 := 0x000504030201 + &request.Tmp-String-1 := "what do ya want for nothing?" + &request.Tmp-String-2 := "Jefe" + &request.Tmp-String-3 := "" } diff --git a/src/tests/keywords/module-failure-message b/src/tests/keywords/module-failure-message index 53296159b0f..6c787e73082 100644 --- a/src/tests/keywords/module-failure-message +++ b/src/tests/keywords/module-failure-message @@ -4,23 +4,23 @@ test -if (&request:Module-Failure-Message[4] != 'test: RERROR error message') { +if (&request.Module-Failure-Message[4] != 'test: RERROR error message') { test_fail } -if (&request:Module-Failure-Message[3] != 'test: RDEBUG error message') { +if (&request.Module-Failure-Message[3] != 'test: RDEBUG error message') { test_fail } -if (&request:Module-Failure-Message[2] != 'test: RDEBUG2 error message') { +if (&request.Module-Failure-Message[2] != 'test: RDEBUG2 error message') { test_fail } -if (&request:Module-Failure-Message[1] != 'test: RDEBUG3 error message') { +if (&request.Module-Failure-Message[1] != 'test: RDEBUG3 error message') { test_fail } -if (&request:Module-Failure-Message[0] != 'test: RDEBUG4 error message') { +if (&request.Module-Failure-Message[0] != 'test: RDEBUG4 error message') { test_fail } diff --git a/src/tests/keywords/pairs b/src/tests/keywords/pairs index c28de33ad8f..8e3c574d96b 100644 --- a/src/tests/keywords/pairs +++ b/src/tests/keywords/pairs @@ -2,37 +2,37 @@ # PRE: update if # update { - &request:Tmp-String-0 := "This is a string" - &request:Tmp-String-0 += "This is another one" - &request:Tmp-Octets-0 := 0x000504030201 - &request:Tmp-Integer-0 := 7331 + &request.Tmp-String-0 := "This is a string" + &request.Tmp-String-0 += "This is another one" + &request.Tmp-Octets-0 := 0x000504030201 + &request.Tmp-Integer-0 := 7331 } update { - &request:Tmp-String-1 := "%{concat:, %{pairs:request:[*]}}" - &request:Tmp-String-2 := "%{pairs:Tmp-String-0}" - &request:Tmp-String-3 := "%{concat:, %{pairs:Tmp-String-0[*]}}" - &request:Tmp-String-4 := "%{pairs:control:}" - &request:Tmp-String-5 := "%{pairs:control:User-Name}" + &request.Tmp-String-1 := "%{concat:, %{pairs:request.[*]}}" + &request.Tmp-String-2 := "%{pairs:Tmp-String-0}" + &request.Tmp-String-3 := "%{concat:, %{pairs:Tmp-String-0[*]}}" + &request.Tmp-String-4 := "%{pairs:control:}" + &request.Tmp-String-5 := "%{pairs:control:User-Name}" } -if (&request:Tmp-String-1 != "User-Name = \"bob\", User-Password = \"hello\", Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\", Tmp-Octets-0 = 0x000504030201, Tmp-Integer-0 = 7331") { +if (&request.Tmp-String-1 != "User-Name = \"bob\", User-Password = \"hello\", Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\", Tmp-Octets-0 = 0x000504030201, Tmp-Integer-0 = 7331") { test_fail } -if (&request:Tmp-String-2 != "Tmp-String-0 = \"This is a string\"") { +if (&request.Tmp-String-2 != "Tmp-String-0 = \"This is a string\"") { test_fail } -if (&request:Tmp-String-3 != "Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\"") { +if (&request.Tmp-String-3 != "Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\"") { test_fail } -if (&request:Tmp-String-4 != "Cleartext-Password = \"hello\"") { +if (&request.Tmp-String-4 != "Cleartext-Password = \"hello\"") { test_fail } -if (&request:Tmp-String-5 != '') { +if (&request.Tmp-String-5 != '') { test_fail } diff --git a/src/tests/keywords/pap b/src/tests/keywords/pap index 5aa003f3aa3..9c7eb0aff0c 100644 --- a/src/tests/keywords/pap +++ b/src/tests/keywords/pap @@ -3,7 +3,7 @@ # update { &control: !* ANY - &request:Tmp-String-0 := "5RNqNl8iYLbkCc7JhR8as4TtDDCX6otuuWtcja8rITUyx9zrnHSe9tTHGmKK" # 60 byte salt + &request.Tmp-String-0 := "5RNqNl8iYLbkCc7JhR8as4TtDDCX6otuuWtcja8rITUyx9zrnHSe9tTHGmKK" # 60 byte salt } # diff --git a/src/tests/keywords/parallel-rcode b/src/tests/keywords/parallel-rcode index fd9a8e8ab12..00f2c7be654 100644 --- a/src/tests/keywords/parallel-rcode +++ b/src/tests/keywords/parallel-rcode @@ -37,7 +37,7 @@ group { if (!fail) { test_fail } -if (&request:Tmp-String-0) { +if (&request.Tmp-String-0) { test_fail } @@ -61,7 +61,7 @@ group { if (!fail) { test_fail } -if (&request:Tmp-String-0 != 'foo') { +if (&request.Tmp-String-0 != 'foo') { test_fail } diff --git a/src/tests/keywords/sha1 b/src/tests/keywords/sha1 index e4968f4174a..8f58cedb026 100644 --- a/src/tests/keywords/sha1 +++ b/src/tests/keywords/sha1 @@ -2,50 +2,50 @@ # PRE: update if # update { - &request:Tmp-String-0 := "This is a string\n" - &request:Tmp-Octets-0 := 0x000504030201 - &request:Tmp-String-1 := "what do ya want for nothing?" - &request:Tmp-String-2 := "Jefe" - &request:Tmp-String-3 := "" + &request.Tmp-String-0 := "This is a string\n" + &request.Tmp-Octets-0 := 0x000504030201 + &request.Tmp-String-1 := "what do ya want for nothing?" + &request.Tmp-String-2 := "Jefe" + &request.Tmp-String-3 := "" } update { - &request:Tmp-Octets-2 := "%{sha1:This is a string\n}" - &request:Tmp-Octets-3 := "%{sha1:%{Tmp-String-0}}" - &request:Tmp-Octets-4 := "%{sha1:%{request.Tmp-String-0}}" - &request:Tmp-Octets-5 := "%{sha1:%{request.Tmp-Octets-9}}" - &request:Tmp-Octets-6 := "%{hmacsha1:%{Tmp-String-1} %{Tmp-String-2}}" - &request:Tmp-Octets-7 := "%{hmacsha1:%{Tmp-String-3} %{Tmp-String-3}}" - &request:Tmp-Octets-8 := "%{hmacsha1:%{Tmp-String-1} }" + &request.Tmp-Octets-2 := "%{sha1:This is a string\n}" + &request.Tmp-Octets-3 := "%{sha1:%{Tmp-String-0}}" + &request.Tmp-Octets-4 := "%{sha1:%{request.Tmp-String-0}}" + &request.Tmp-Octets-5 := "%{sha1:%{request.Tmp-Octets-9}}" + &request.Tmp-Octets-6 := "%{hmacsha1:%{Tmp-String-1} %{Tmp-String-2}}" + &request.Tmp-Octets-7 := "%{hmacsha1:%{Tmp-String-3} %{Tmp-String-3}}" + &request.Tmp-Octets-8 := "%{hmacsha1:%{Tmp-String-1} }" } # # Put "This is a string" into a file and call "sha1sum" on it. # You should get this string. # -if (&request:Tmp-Octets-2 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) { +if (&request.Tmp-Octets-2 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) { test_fail } -if (&request:Tmp-Octets-3 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) { +if (&request.Tmp-Octets-3 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) { test_fail } -if (&request:Tmp-Octets-4 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) { +if (&request.Tmp-Octets-4 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) { test_fail } # # SHA1 of empty string # -if (&request:Tmp-Octets-5 != 0xda39a3ee5e6b4b0d3255bfef95601890afd80709) { +if (&request.Tmp-Octets-5 != 0xda39a3ee5e6b4b0d3255bfef95601890afd80709) { test_fail } # # SHA1 HMAC with attribute references # -if (&request:Tmp-Octets-6 != 0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79) { +if (&request.Tmp-Octets-6 != 0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79) { test_fail } diff --git a/src/tests/keywords/sha2 b/src/tests/keywords/sha2 index aef16ffb8f9..c82bd44f4e8 100644 --- a/src/tests/keywords/sha2 +++ b/src/tests/keywords/sha2 @@ -2,45 +2,45 @@ # PRE: update if # update { - &request:Tmp-String-0 := "This is a string\n" - &request:Tmp-Octets-0 := 0x000504030201 + &request.Tmp-String-0 := "This is a string\n" + &request.Tmp-Octets-0 := 0x000504030201 } update { - &request:Tmp-Octets-1 := "%{sha2_256:This is a string\n}" - &request:Tmp-Octets-2 := "%{sha2_256:%{Tmp-String-0}}" - &request:Tmp-Octets-3 := "%{sha2_256:%{request.Tmp-String-0}}" - &request:Tmp-Octets-4 := "%{sha2_256:%{request.Tmp-Octets-0}}" - &request:Tmp-Octets-5 := "%{sha2_256:%{request.Tmp-Octets-9}}" + &request.Tmp-Octets-1 := "%{sha2_256:This is a string\n}" + &request.Tmp-Octets-2 := "%{sha2_256:%{Tmp-String-0}}" + &request.Tmp-Octets-3 := "%{sha2_256:%{request.Tmp-String-0}}" + &request.Tmp-Octets-4 := "%{sha2_256:%{request.Tmp-Octets-0}}" + &request.Tmp-Octets-5 := "%{sha2_256:%{request.Tmp-Octets-9}}" } # # Put "This is a string" into a file and call "sha2_256sum" on it. # You should get this string. # -if (&request:Tmp-Octets-1 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) { +if (&request.Tmp-Octets-1 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) { test_fail } -if (&request:Tmp-Octets-2 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) { +if (&request.Tmp-Octets-2 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) { test_fail } -if (&request:Tmp-Octets-3 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) { +if (&request.Tmp-Octets-3 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) { test_fail } # # SHA256 should also be able to cope with references to octet attributes # -if (&request:Tmp-Octets-4 != 0xf307e202b881fded70e58017aa0c4d7b29c76ab25d02bf078301a5f6635187eb) { +if (&request.Tmp-Octets-4 != 0xf307e202b881fded70e58017aa0c4d7b29c76ab25d02bf078301a5f6635187eb) { test_fail } # # SHA256 of empty string # -if (&request:Tmp-Octets-5 != 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855) { +if (&request.Tmp-Octets-5 != 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855) { test_fail } @@ -49,20 +49,20 @@ if (&request:Tmp-Octets-5 != 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca # as exhaustive. # update { - &request:Tmp-Octets-1 := "%{sha2_512:This is a string\n}" - &request:Tmp-Octets-2 := "%{sha2_512:%{Tmp-String-0}}" - &request:Tmp-Octets-3 := "%{sha2_512:%{request.Tmp-Octets-0}}" + &request.Tmp-Octets-1 := "%{sha2_512:This is a string\n}" + &request.Tmp-Octets-2 := "%{sha2_512:%{Tmp-String-0}}" + &request.Tmp-Octets-3 := "%{sha2_512:%{request.Tmp-Octets-0}}" } -if (&request:Tmp-Octets-1 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) { +if (&request.Tmp-Octets-1 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) { test_fail } -if (&request:Tmp-Octets-2 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) { +if (&request.Tmp-Octets-2 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) { test_fail } -if (&request:Tmp-Octets-3 != 0xde80271eb5e03a1c24dd0cd823a22305a743ee3a54f1de5bf97adbf56984561154bfb6928b1da4ccc3f5dde9f4032ad461937b60b9ace4ad3898cf45c90596d7) { +if (&request.Tmp-Octets-3 != 0xde80271eb5e03a1c24dd0cd823a22305a743ee3a54f1de5bf97adbf56984561154bfb6928b1da4ccc3f5dde9f4032ad461937b60b9ace4ad3898cf45c90596d7) { test_fail } diff --git a/src/tests/keywords/smash b/src/tests/keywords/smash index 4d04208afb6..033128a3747 100644 --- a/src/tests/keywords/smash +++ b/src/tests/keywords/smash @@ -3,6 +3,6 @@ # # This gives the game away. # -update { &control:User-Name := 'bob', &request:Reply-Message := "foo" } +update { &control:User-Name := 'bob', &request.Reply-Message := "foo" } success diff --git a/src/tests/keywords/subrequest-if b/src/tests/keywords/subrequest-if index 5d7a6758ad3..02fb51e69f5 100644 --- a/src/tests/keywords/subrequest-if +++ b/src/tests/keywords/subrequest-if @@ -3,7 +3,7 @@ # subrequest Access-Request { update request { - &User-Name := &parent.request:User-Name + &User-Name := &parent.request.User-Name } if (!&User-Name) { diff --git a/src/tests/keywords/subrequest-return b/src/tests/keywords/subrequest-return index e948d089b2d..abb97fad569 100644 --- a/src/tests/keywords/subrequest-return +++ b/src/tests/keywords/subrequest-return @@ -13,7 +13,7 @@ subrequest Access-Request { } } -if ((&request:Tmp-String-0 == "testing1234") && !&reply:Tmp-String-1) { +if ((&request.Tmp-String-0 == "testing1234") && !&reply:Tmp-String-1) { success } else { diff --git a/src/tests/keywords/unit_test_module.conf b/src/tests/keywords/unit_test_module.conf index 964fb372abf..919202399a8 100644 --- a/src/tests/keywords/unit_test_module.conf +++ b/src/tests/keywords/unit_test_module.conf @@ -56,7 +56,7 @@ policy { # Outputs the contents of the request list in debugging (-X) mode # debug_request { - if("%{debug_attr:request:[*]}" == '') { + if("%{debug_attr:request.[*]}" == '') { noop } } @@ -100,7 +100,7 @@ policy { } } - if (&parent.request:User-Name && !&parent.reply:Filter-Id) { + if (&parent.request.User-Name && !&parent.reply:Filter-Id) { update parent.reply { &Filter-Id := "filter" } @@ -112,7 +112,7 @@ policy { &Filter-Id += "Failure in test at line %{interpreter:...line}" } - if (&parent.request:User-Name) { + if (&parent.request.User-Name) { update parent.reply { &Filter-Id += "Failure in test at line %{interpreter:...line}" } diff --git a/src/tests/keywords/update-remove-any b/src/tests/keywords/update-remove-any index f026bfecf50..3c3814fa191 100644 --- a/src/tests/keywords/update-remove-any +++ b/src/tests/keywords/update-remove-any @@ -2,10 +2,10 @@ # PRE: update # update { - &request:Tmp-String-0 := 'foobarbaz' - &request:Tmp-Integer-0 := 123456789 - &request:Tmp-IP-Address-0 := 192.0.2.1 - &request:Tmp-IP-Address-0 += 192.0.2.2 + &request.Tmp-String-0 := 'foobarbaz' + &request.Tmp-Integer-0 := 123456789 + &request.Tmp-IP-Address-0 := 192.0.2.1 + &request.Tmp-IP-Address-0 += 192.0.2.2 &control:Tmp-IP-Address-0 := 192.0.2.1 &control:Tmp-IP-Address-0 += 192.0.2.3 &control:Tmp-IP-Address-1 := 192.0.3.1 @@ -17,7 +17,7 @@ if (("%{Tmp-IP-Address-0[0]}" != 192.0.2.1) || ("%{Tmp-IP-Address-0[1]}" != 192. # Remove all attributes in the request list update { - &request:Tmp-IP-Address-0 !* ANY + &request.Tmp-IP-Address-0 !* ANY } # Non Tmp-IP-Address-0 address attributes should still be in the request list diff --git a/src/tests/keywords/update-remove-index b/src/tests/keywords/update-remove-index index 94a767df482..9b448b34dd0 100644 --- a/src/tests/keywords/update-remove-index +++ b/src/tests/keywords/update-remove-index @@ -3,13 +3,13 @@ # update { - &request:Tmp-String-0 := 'foobarbaz' - &request:Tmp-Integer-0 := 123456789 - &request:Tmp-IP-Address-0 := 192.0.2.1 - &request:Tmp-IP-Address-0 += 192.0.2.2 - &request:Tmp-IP-Address-0 += 192.0.2.3 - &request:Tmp-IP-Address-0 += 192.0.2.2 - &request:Tmp-IP-Address-0 += 192.0.2.4 + &request.Tmp-String-0 := 'foobarbaz' + &request.Tmp-Integer-0 := 123456789 + &request.Tmp-IP-Address-0 := 192.0.2.1 + &request.Tmp-IP-Address-0 += 192.0.2.2 + &request.Tmp-IP-Address-0 += 192.0.2.3 + &request.Tmp-IP-Address-0 += 192.0.2.2 + &request.Tmp-IP-Address-0 += 192.0.2.4 } diff --git a/src/tests/keywords/update-remove-value b/src/tests/keywords/update-remove-value index 882cd57684d..af423d15a81 100644 --- a/src/tests/keywords/update-remove-value +++ b/src/tests/keywords/update-remove-value @@ -3,12 +3,12 @@ # update { - &request:Tmp-String-0 := 'foobarbaz' - &request:Tmp-Integer-0 := 123456789 - &request:Tmp-IP-Address-0 := 192.0.2.1 - &request:Tmp-IP-Address-0 += 192.0.2.2 - &request:Tmp-IP-Address-0 += 192.0.2.3 - &request:Tmp-IP-Address-0 += 192.0.2.4 + &request.Tmp-String-0 := 'foobarbaz' + &request.Tmp-Integer-0 := 123456789 + &request.Tmp-IP-Address-0 := 192.0.2.1 + &request.Tmp-IP-Address-0 += 192.0.2.2 + &request.Tmp-IP-Address-0 += 192.0.2.3 + &request.Tmp-IP-Address-0 += 192.0.2.4 &control:Tmp-IP-Address-0 := 192.0.2.1 &control:Tmp-IP-Address-0 += 192.0.2.3 } @@ -22,7 +22,7 @@ if (("%{Tmp-IP-Address-0[0]}" != 192.0.2.1) || \ # Remove Tmp-IP-Address-0 with a specific value update { - &request:Tmp-IP-Address-0 -= 192.0.2.1 + &request.Tmp-IP-Address-0 -= 192.0.2.1 } # Only the 2nd, 3rd and 4th Tmp-IP-Address attributes should still be in the list @@ -35,7 +35,7 @@ if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ # Remove Tmp-IP-Address-0 with a specific value (somewhere in the middle) update { - &request:Tmp-IP-Address-0 -= 192.0.2.3 + &request.Tmp-IP-Address-0 -= 192.0.2.3 } # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list @@ -47,7 +47,7 @@ if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ # Remove Tmp-IP-Address-0 with a specific value (which doesn't exist) update { - &request:Tmp-IP-Address-0 -= 192.0.2.3 + &request.Tmp-IP-Address-0 -= 192.0.2.3 } # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list @@ -59,12 +59,12 @@ if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ # Remove Tmp-IP-Address-4 (which doesn't exist - more to check for SEGV/assert) update { - &request:Tmp-IP-Address-4 -= 192.0.2.3 + &request.Tmp-IP-Address-4 -= 192.0.2.3 } # Remove Tmp-IP-Address-0 with a specific value update { - &request:Tmp-IP-Address-0 -= 192.0.2.4 + &request.Tmp-IP-Address-0 -= 192.0.2.4 } # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list @@ -75,7 +75,7 @@ if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ # Remove Tmp-IP-Address-0 with a specific value update { - &request:Tmp-IP-Address-0 -= 192.0.2.2 + &request.Tmp-IP-Address-0 -= 192.0.2.2 } # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list diff --git a/src/tests/keywords/xlat-explode b/src/tests/keywords/xlat-explode index b450b50e1c0..6f73aa87a2c 100644 --- a/src/tests/keywords/xlat-explode +++ b/src/tests/keywords/xlat-explode @@ -4,8 +4,8 @@ # Check explode works correctly # update { - &request:Class := '1=1|my_attr=2|my_attr=hello|' - &request:Calling-Station-ID += '|' + &request.Class := '1=1|my_attr=2|my_attr=hello|' + &request.Calling-Station-ID += '|' &control:User-Name += '|hello|goodbye' &control:User-Name += '|morning|night|1|' &control:Reply-Message := 'Can\'t touch this' diff --git a/src/tests/map/base b/src/tests/map/base index 11e06b51735..5d3fc78188e 100644 --- a/src/tests/map/base +++ b/src/tests/map/base @@ -2,5 +2,5 @@ update request { &Filter-Id[*] := "filter" &User-Name[*] := "blah" - &reply:Filter-Id[*] += &request:Filter-Id[*] + &reply:Filter-Id[*] += &request.Filter-Id[*] } diff --git a/src/tests/map/count-list-error b/src/tests/map/count-list-error index a7beae138a3..48fdfa40e89 100644 --- a/src/tests/map/count-list-error +++ b/src/tests/map/count-list-error @@ -2,5 +2,5 @@ # Updating lists isn't allowed # update { - &request:Filter-Id := &Filter-Id[#] # ERROR + &request.Filter-Id := &Filter-Id[#] # ERROR } diff --git a/src/tests/modules/cache_rbtree/cache-logic.unlang b/src/tests/modules/cache_rbtree/cache-logic.unlang index 489997ee9ad..cd27d715218 100644 --- a/src/tests/modules/cache_rbtree/cache-logic.unlang +++ b/src/tests/modules/cache_rbtree/cache-logic.unlang @@ -2,7 +2,7 @@ # PRE: # update { - &request:Tmp-String-0 := 'testkey' + &request.Tmp-String-0 := 'testkey' } @@ -22,7 +22,7 @@ else { } # 1. Check the module didn't perform a merge -if (&request:Tmp-String-1) { +if (&request.Tmp-String-1) { test_fail } else { @@ -59,7 +59,7 @@ else { } # 5. -if (&request:Tmp-String-1 != &control:Tmp-String-1) { +if (&request.Tmp-String-1 != &control:Tmp-String-1) { test_fail } else { @@ -80,7 +80,7 @@ else { } # 7. -if (&request:Tmp-String-1 != &control:Tmp-String-1) { +if (&request.Tmp-String-1 != &control:Tmp-String-1) { test_fail } else { @@ -184,7 +184,7 @@ else { } # 17. -if (&request:Tmp-String-1 != &control:Tmp-String-1) { +if (&request.Tmp-String-1 != &control:Tmp-String-1) { test_fail } else { @@ -208,7 +208,7 @@ else { } # 19. Request Tmp-String-1 shouldn't have been updated yet -if (&request:Tmp-String-1 == &control:Tmp-String-1) { +if (&request.Tmp-String-1 == &control:Tmp-String-1) { test_fail } else { @@ -228,7 +228,7 @@ else { } # 21. Request Tmp-String-1 still shouldn't have been updated yet -if (&request:Tmp-String-1 == &control:Tmp-String-1) { +if (&request.Tmp-String-1 == &control:Tmp-String-1) { test_fail } else { @@ -245,7 +245,7 @@ else { } # 23. Request Tmp-String-1 should now have been updated -if (&request:Tmp-String-1 != &control:Tmp-String-1) { +if (&request.Tmp-String-1 != &control:Tmp-String-1) { test_fail } else { @@ -267,7 +267,7 @@ else { } # 25. Request Tmp-String-1 should now have been updated -if (&request:Tmp-String-1 != &control:Tmp-String-1) { +if (&request.Tmp-String-1 != &control:Tmp-String-1) { test_fail } else { @@ -275,7 +275,7 @@ else { } # 26. Check Cache-Entry-Hits is updated as we expect -if (&request:Cache-Entry-Hits != 0) { +if (&request.Cache-Entry-Hits != 0) { test_fail } else { @@ -283,7 +283,7 @@ else { } cache -if (&request:Cache-Entry-Hits != 1) { +if (&request.Cache-Entry-Hits != 1) { test_fail } else { diff --git a/src/tests/modules/cache_rbtree/cache-update.unlang b/src/tests/modules/cache_rbtree/cache-update.unlang index bbe8c931a7d..c51a95b78c4 100644 --- a/src/tests/modules/cache_rbtree/cache-update.unlang +++ b/src/tests/modules/cache_rbtree/cache-update.unlang @@ -2,7 +2,7 @@ # PRE: cache-logic # update { - &request:Tmp-String-0 := 'testkey' + &request.Tmp-String-0 := 'testkey' # Reply attributes &reply:Reply-Message := 'hello' diff --git a/src/tests/modules/cache_rbtree/module.conf b/src/tests/modules/cache_rbtree/module.conf index c0501252c1d..49d58d10b2a 100644 --- a/src/tests/modules/cache_rbtree/module.conf +++ b/src/tests/modules/cache_rbtree/module.conf @@ -6,8 +6,8 @@ cache { ttl = 2 update { - &request:Tmp-String-1 := &control:Tmp-String-1[0] - &request:Tmp-Integer-0 := &control:Tmp-Integer-0[0] + &request.Tmp-String-1 := &control:Tmp-String-1[0] + &request.Tmp-Integer-0 := &control:Tmp-Integer-0[0] &control: += &reply: } diff --git a/src/tests/modules/imap/imap_opt_tls/auth_try_tls.unlang b/src/tests/modules/imap/imap_opt_tls/auth_try_tls.unlang index 5f82167ab97..4367dc22423 100644 --- a/src/tests/modules/imap/imap_opt_tls/auth_try_tls.unlang +++ b/src/tests/modules/imap/imap_opt_tls/auth_try_tls.unlang @@ -1,6 +1,6 @@ imap_try_tls.authenticate -# if (&request:cert-attrs.Issuer) { +# if (&request.cert-attrs.Issuer) { # test_fail #} # else { @@ -17,7 +17,7 @@ else { reject } -if (&request:TLS-Cert-Issuer =~ /@example\.org/) { +if (&request.TLS-Cert-Issuer =~ /@example\.org/) { test_pass } else { test_fail diff --git a/src/tests/modules/imap/imap_tls/auth_tls.unlang b/src/tests/modules/imap/imap_tls/auth_tls.unlang index 393266bdf56..d8711934326 100644 --- a/src/tests/modules/imap/imap_tls/auth_tls.unlang +++ b/src/tests/modules/imap/imap_tls/auth_tls.unlang @@ -1,6 +1,6 @@ imap_tls.authenticate -# if (&request:cert-attrs.Issuer) { +# if (&request.cert-attrs.Issuer) { # test_fail #} # else { @@ -17,7 +17,7 @@ else { reject } -if (&request:TLS-Cert-Issuer =~ /@example\.org/) { +if (&request.TLS-Cert-Issuer =~ /@example\.org/) { test_pass } else { test_fail diff --git a/src/tests/modules/json/encode.unlang b/src/tests/modules/json/encode.unlang index f474db5a8b1..b7a0d4e6d8e 100644 --- a/src/tests/modules/json/encode.unlang +++ b/src/tests/modules/json/encode.unlang @@ -6,15 +6,15 @@ # 0. Check basic xlat parsing update request { - &Tmp-String-1 := "%{json_encode:&request:[*]}" - &Tmp-String-2 := "%{json_encode:&request:[*] }" - &Tmp-String-3 := "%{json_encode: &request:[*]}" - &Tmp-String-4 := "%{json_encode: &request:[*] }" - &Tmp-String-5 := "%{json_encode: &request:[*] !&Filter-Id }" - &Tmp-String-6 := "%{json_encode:&request:[*] ! }" + &Tmp-String-1 := "%{json_encode:&request.[*]}" + &Tmp-String-2 := "%{json_encode:&request.[*] }" + &Tmp-String-3 := "%{json_encode: &request.[*]}" + &Tmp-String-4 := "%{json_encode: &request.[*] }" + &Tmp-String-5 := "%{json_encode: &request.[*] !&Filter-Id }" + &Tmp-String-6 := "%{json_encode:&request.[*] ! }" # Check defaults are the same as output_mode "object": - &Tmp-String-7 := "%{json_object_encode:&request:[*]}" - &Tmp-String-8 := "%{json_object_no_encode:&request:[*]}" + &Tmp-String-7 := "%{json_object_encode:&request.[*]}" + &Tmp-String-8 := "%{json_object_no_encode:&request.[*]}" } @@ -67,8 +67,8 @@ update request { # decide that it's going to use a different ordering of the keys... update request { - &Tmp-String-1 := "%{json_object_encode:&request:[*]}" - &Tmp-String-2 := "%{json_object_ex_encode:&request:[*]}" + &Tmp-String-1 := "%{json_object_encode:&request.[*]}" + &Tmp-String-2 := "%{json_object_ex_encode:&request.[*]}" } if (&Tmp-String-1 == '{"User-Name":{"type":"string","value":"john"},"Filter-Id":{"type":"string","value":["f1","f2"]},"NAS-Port":{"type":"uint32","value":999},"Service-Type":{"type":"uint32","value":"Login-User"}}') { @@ -86,7 +86,7 @@ if (&Tmp-String-2 == '{"pf:User-Name":{"type":"string","value":["john"]},"pf:Fil # 1b. "object" empty inputs update request { - &Tmp-String-1 := "%{json_object_encode:!&request:[*]}" + &Tmp-String-1 := "%{json_object_encode:!&request.[*]}" &Tmp-String-2 := "%{json_object_ex_encode:}" } @@ -118,8 +118,8 @@ update request { # 2a. Output mode "object_simple" tests update request { - &Tmp-String-1 := "%{json_object_simple_encode:&request:[*]}" - &Tmp-String-2 := "%{json_object_simple_ex_encode:&request:[*]}" + &Tmp-String-1 := "%{json_object_simple_encode:&request.[*]}" + &Tmp-String-2 := "%{json_object_simple_ex_encode:&request.[*]}" } if (&Tmp-String-1 == '{"User-Name":"john","Filter-Id":["f1","f2"],"NAS-Port":999,"Service-Type":"Login-User"}') { @@ -137,7 +137,7 @@ if (&Tmp-String-2 == '{"pf:User-Name":["john"],"pf:Filter-Id":["f1","f2"],"pf:NA # 2b. "object_simple" empty inputs update request { - &Tmp-String-1 := "%{json_object_simple_encode:!&request:[*]}" + &Tmp-String-1 := "%{json_object_simple_encode:!&request.[*]}" &Tmp-String-2 := "%{json_object_simple_ex_encode:}" } @@ -169,8 +169,8 @@ update request { # 3a. Output mode "array" tests update request { - &Tmp-String-1 := "%{json_array_encode:&request:[*]}" - &Tmp-String-2 := "%{json_array_ex_encode:&request:[*]}" + &Tmp-String-1 := "%{json_array_encode:&request.[*]}" + &Tmp-String-2 := "%{json_array_ex_encode:&request.[*]}" } if (&Tmp-String-1 == '[{"name":"User-Name","type":"string","value":"john"},{"name":"Filter-Id","type":"string","value":"f1"},{"name":"Filter-Id","type":"string","value":"f2"},{"name":"NAS-Port","type":"uint32","value":999},{"name":"Service-Type","type":"uint32","value":"Login-User"}]') { @@ -188,7 +188,7 @@ if (&Tmp-String-2 == '[{"name":"pf:User-Name","type":"string","value":["john"]}, # 3b. "array" empty inputs update request { - &Tmp-String-1 := "%{json_array_encode:!&request:[*]}" + &Tmp-String-1 := "%{json_array_encode:!&request.[*]}" &Tmp-String-2 := "%{json_array_ex_encode:}" } @@ -220,8 +220,8 @@ update request { # 4a. Output mode "array_of_names" tests update request { - &Tmp-String-1 := "%{json_array_names_encode:&request:[*]}" - &Tmp-String-2 := "%{json_array_names_ex_encode:&request:[*]}" + &Tmp-String-1 := "%{json_array_names_encode:&request.[*]}" + &Tmp-String-2 := "%{json_array_names_ex_encode:&request.[*]}" } if (&Tmp-String-1 == '["User-Name","Filter-Id","Filter-Id","NAS-Port","Service-Type"]') { @@ -239,7 +239,7 @@ if (&Tmp-String-2 == '["pf:User-Name","pf:Filter-Id","pf:Filter-Id","pf:NAS-Port # 4b. "array_of_names" empty inputs update request { - &Tmp-String-1 := "%{json_array_names_encode:!&request:[*]}" + &Tmp-String-1 := "%{json_array_names_encode:!&request.[*]}" &Tmp-String-2 := "%{json_array_names_ex_encode:}" } @@ -271,8 +271,8 @@ update request { # 5a. Output mode "array_of_values" tests update request { - &Tmp-String-1 := "%{json_array_values_encode:&request:[*]}" - &Tmp-String-2 := "%{json_array_values_ex_encode:&request:[*]}" + &Tmp-String-1 := "%{json_array_values_encode:&request.[*]}" + &Tmp-String-2 := "%{json_array_values_ex_encode:&request.[*]}" } if (&Tmp-String-1 == '["john","f1","f2",999,"Login-User"]') { @@ -290,7 +290,7 @@ if (&Tmp-String-2 == '["john","f1","f2","999","1"]') { # 5b. "array_of_values" empty inputs update request { - &Tmp-String-1 := "%{json_array_values_encode:!&request:[*]}" + &Tmp-String-1 := "%{json_array_values_encode:!&request.[*]}" &Tmp-String-2 := "%{json_array_values_ex_encode:}" } diff --git a/src/tests/modules/ldap/map.unlang b/src/tests/modules/ldap/map.unlang index 957210f141d..ac788fcefad 100644 --- a/src/tests/modules/ldap/map.unlang +++ b/src/tests/modules/ldap/map.unlang @@ -9,21 +9,21 @@ if (updated) { test_fail } -if (&request:Tmp-String-0 == '255.255.255.0') { +if (&request.Tmp-String-0 == '255.255.255.0') { test_pass } else { test_fail } -if (&request:Tmp-String-1[0] == 'cn=radprofile,ou=profiles,dc=example,dc=com') { +if (&request.Tmp-String-1[0] == 'cn=radprofile,ou=profiles,dc=example,dc=com') { test_pass } else { test_fail } -if (&request:Tmp-String-1[1] == 'cn=profile1,ou=profiles,dc=example,dc=com') { +if (&request.Tmp-String-1[1] == 'cn=profile1,ou=profiles,dc=example,dc=com') { test_pass } else { diff --git a/src/tests/modules/redis_ippool/alloc.unlang b/src/tests/modules/redis_ippool/alloc.unlang index 8032bb16a72..390e18de3d0 100644 --- a/src/tests/modules/redis_ippool/alloc.unlang +++ b/src/tests/modules/redis_ippool/alloc.unlang @@ -95,9 +95,9 @@ if (&reply:Session-Timeout == 30) { } update { - &request:Pool-Range := &reply:Pool-Range - &request:Framed-IP-Address := &reply:Framed-IP-Address - &request:Session-Timeout := &reply:Session-Timeout # We should get the same lease time + &request.Pool-Range := &reply:Pool-Range + &request.Framed-IP-Address := &reply:Framed-IP-Address + &request.Session-Timeout := &reply:Session-Timeout # We should get the same lease time &reply: !* ANY } @@ -121,7 +121,7 @@ if (updated) { # # Check the ranges are the same # -if (&request:Pool-Range == &reply:Pool-Range) { +if (&request.Pool-Range == &reply:Pool-Range) { test_pass } else { test_fail @@ -130,7 +130,7 @@ if (&request:Pool-Range == &reply:Pool-Range) { # # Check the IP addresses are the same # -if (&request:Framed-IP-Address == &reply:Framed-IP-Address) { +if (&request.Framed-IP-Address == &reply:Framed-IP-Address) { test_pass } else { test_fail @@ -142,7 +142,7 @@ if (&request:Framed-IP-Address == &reply:Framed-IP-Address) { # The fudge factor is to allow for delays running ippool tool and script interpretation # as we should be allocating the same lesase as before, but its TTL could be slightly lower. # -if ("%{expr:&request:Session-Timeout - &reply:Session-Timeout}" < 5) { +if ("%{expr:&request.Session-Timeout - &reply:Session-Timeout}" < 5) { test_pass } else { test_fail diff --git a/src/tests/modules/redis_ippool/release.unlang b/src/tests/modules/redis_ippool/release.unlang index 069a309cbb6..a5388384e2e 100644 --- a/src/tests/modules/redis_ippool/release.unlang +++ b/src/tests/modules/redis_ippool/release.unlang @@ -36,7 +36,7 @@ if (&reply:Framed-IP-Address == 192.168.0.1) { # Release the IP address # update { - &request:Framed-IP-Address := &reply:Framed-IP-Address + &request.Framed-IP-Address := &reply:Framed-IP-Address &control:Pool-Action := Release } redis_ippool { @@ -99,7 +99,7 @@ if ("%{expr:%{redis:ZSCORE '{%{control.Pool-Name}%}:pool' '%{reply.Framed-IP-Add # Release the IP address again (should still be fine) # update { - &request:Framed-IP-Address := &reply:Framed-IP-Address + &request.Framed-IP-Address := &reply:Framed-IP-Address &control:Pool-Action := Release } redis_ippool { diff --git a/src/tests/modules/redis_ippool/update.unlang b/src/tests/modules/redis_ippool/update.unlang index c3b9f79fcc5..07f9bf04bb5 100644 --- a/src/tests/modules/redis_ippool/update.unlang +++ b/src/tests/modules/redis_ippool/update.unlang @@ -50,8 +50,8 @@ update request { # 6. Verify that the lease time is extended update { - &request:Framed-IP-Address := &reply:Framed-IP-Address - &request:NAS-IP-Address := 127.0.0.2 + &request.Framed-IP-Address := &reply:Framed-IP-Address + &request.NAS-IP-Address := 127.0.0.2 &control:Pool-Action := Renew } redis_ippool @@ -116,7 +116,7 @@ if (&reply:Pool-Range && (&reply:Pool-Range == '192.168.0.0')) { # Change the ip address to one that doesn't exist in the pool and check we *can't* update it update request { - &request:Framed-IP-Address := 192.168.3.1 + &request.Framed-IP-Address := 192.168.3.1 } redis_ippool { invalid = 1 @@ -128,7 +128,7 @@ if (notfound) { test_fail } update request { - &request:Framed-IP-Address := 192.168.0.1 + &request.Framed-IP-Address := 192.168.0.1 } # 15. Now change the calling station ID and check that we *can't* update the lease diff --git a/src/tests/modules/redis_ippool/update_alloc.unlang b/src/tests/modules/redis_ippool/update_alloc.unlang index 4aed0045ac8..46fd4bc3b5c 100644 --- a/src/tests/modules/redis_ippool/update_alloc.unlang +++ b/src/tests/modules/redis_ippool/update_alloc.unlang @@ -26,8 +26,8 @@ if (updated) { # Attempt to reserve an IP address by performing a renew # update { - &request:Framed-IP-Address := 192.168.0.1 - &request:NAS-IP-Address := 127.0.0.1 + &request.Framed-IP-Address := 192.168.0.1 + &request.NAS-IP-Address := 127.0.0.1 &control:Pool-Action := Renew } redis_ippool diff --git a/src/tests/modules/unit_test_module.conf b/src/tests/modules/unit_test_module.conf index 4b924c41b62..e5c0f7ffed5 100644 --- a/src/tests/modules/unit_test_module.conf +++ b/src/tests/modules/unit_test_module.conf @@ -73,7 +73,7 @@ policy { # Outputs the contents of the request list in debugging (-X) mode # debug_request { - if("%{debug_attr:request:[*]}" == '') { + if("%{debug_attr:request.[*]}" == '') { noop } } diff --git a/src/tests/unit/condition/base.txt b/src/tests/unit/condition/base.txt index a988760c749..9262d8ac6ea 100644 --- a/src/tests/unit/condition/base.txt +++ b/src/tests/unit/condition/base.txt @@ -11,7 +11,7 @@ # proto-dictionary radius -condition &request:User-Name == &reply:User-Name +condition &request.User-Name == &reply:User-Name match &User-Name == &reply:User-Name # All IP address literals should be parsed as prefixes @@ -418,7 +418,7 @@ match ERROR offset 0 Cannot compare attributes of type 'string' and 'ipaddr' condition 127.0.0.1 == &Filter-Id match ERROR offset 0 Cannot compare types 'ipaddr' (cast) and 'string' (attr) -condition &Tmp-Integer64-0 == &request:Foo-Stuff-Bar +condition &Tmp-Integer64-0 == &request.Foo-Stuff-Bar match &Tmp-Integer64-0 == &Foo-Stuff-Bar condition &Tmp-Integer64-0 == &reply:Foo-Stuff-Bar @@ -525,21 +525,21 @@ match ERROR offset 11 Invalid array index '-1' (should be between 0-1000) # # Sometimes the attribute/condition parser needs to fallback to bare words # -condition request:Foo == 'request:Foo' +condition request.Foo == 'request.Foo' match true # Bareword compared with bareword is true -condition request:Foo+Bar == request:Foo+Bar +condition request.Foo+Bar == request.Foo+Bar match true -condition &request:Foo+Bar == 'request:Foo+Bar' +condition &request.Foo+Bar == 'request.Foo+Bar' match ERROR offset 12 Unexpected text after attribute reference -condition 'request:Foo+d' == &request:Foo+Bar +condition 'request.Foo+d' == &request.Foo+Bar match ERROR offset 31 Unexpected text after attribute reference # Attribute tags are not allowed for unknown attributes -condition &request:FooBar:0 == &request:FooBar +condition &request.FooBar:0 == &request.FooBar match ERROR offset 15 Unexpected text after attribute reference condition ¬-a-list:User-Name == ¬-a-list:User-Name