Kea issueshttps://gitlab.isc.org/isc-projects/kea/-/issues2023-04-06T12:02:31Zhttps://gitlab.isc.org/isc-projects/kea/-/issues/1596Include subnet and pool user context in lease database2023-04-06T12:02:31ZPeter DaviesInclude subnet and pool user context in lease databaseI would like the option to copy the information from user-context on subnet level and from pool level to user-context in lease4/lease6 table after a lease accepted. What I would like to see it is :
Example config:
```
{
"...I would like the option to copy the information from user-context on subnet level and from pool level to user-context in lease4/lease6 table after a lease accepted. What I would like to see it is :
Example config:
```
{
"name": "CMTS-4",
"relay": {
"ip-addresses": [ "0123:4567:891b:cd::1" ]
},
"subnet6": [
{
"subnet": "0123:4567:891b:cd::/64",
"id": 40001,
"pools": [
{ "pool": "0123:4567:891b:cd:4000::a - 0123:4567:891b:cd:7fff:ffff:ffff:ffff" ,"client-class": "pool_one", "user-context": { "pool": "pool_one", "name" : "av", "size" : "10" }} ,
{ "pool": "0123:4567:891b:cd::a - 0123:4567:891b:cd:3fff:ffff:ffff:ffff" ,"client-class": "gamers", "user-context": { "pool": "gamers", "name" : "computers", "size" : "1000" } } ,
{ "pool": "0123:4567:891b:cd:8000::a - 0123:4567:891b:cd:bfff:ffff:ffff:ffff" ,"client-class": "internet"}
],
"pd-pools": [
{
"prefix": "abcd:ef01:9044::",
"client-class": "pool_one",
"prefix-len": 46,
"delegated-len": 56,
"user-context": { "pdpool": "pool_one", "name" : "av" }
},
{
"prefix": "abcd:ef01:9444::",
"client-class": "gamers",
"prefix-len": 46,
"delegated-len": 56,
"user-context": { "pdpool": "gamers", "name" : "lan" }
},
{
"prefix": "abcd:ef01:8120::",
"client-class": "internet",
"prefix-len": 44,
"delegated-len": 56
}
],
"user-context": {
"device": "CMTS-4",
"location": "Partner"
}
}
]
}
```
When a user gets a lease with "client-class: gamers" then on the lease record in the lease table he will have the next json:
```
"user-context": {
shared-network: {}, ## <- came from shared-network level
"subnet" : { "device": "CMTS-4", "location": "Partner"}, ## <- came from subnet level
"pd-pool" : { "pdpool": "gamers", "name" : "lan" }, ## <- came from pd-pool level
"pool" : { "pool": "gamers", "name" : "computers", "size" : "1000" } ## <- came from pool level
}
```
This will help me get info on my subscribers, the lease table doesnt have specific info,
Lets say that I have a few pools under one subnet(like the example),
with that info I can get more accurate statistics on the leased addresses.
How many subscribers I have in gamers.
Another idea is to add info from other hook,
We are using radius hook,
So If was I able to select fields from radius hook, like "username" or some other attribute (that came from radius) and put it inside user-context:
```
"user-context": {
"radius" : { "username" : "xxxxx", }
}
```
[RT #17374 ](https://support.isc.org/Ticket/Display.html?id=17374)backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2032RADIUS hook support for expressions in accounting messages2023-10-30T21:17:57ZVicky Riskvicky@isc.orgRADIUS hook support for expressions in accounting messagesThe ARM states that expressions are supported in RADIUS, but apparently they are not supported in accounting messages. Can we add this into the accounting messages?
A user who purchased this hook on-line ran across this limitation.The ARM states that expressions are supported in RADIUS, but apparently they are not supported in accounting messages. Can we add this into the accounting messages?
A user who purchased this hook on-line ran across this limitation.backlog