Additionally set/provided variables... how to access them?
My telcom incumberant allows me to authenticate my clients on his network - providing me with both ADSL and Dialup facilities - which I then sell on to my clients. I need to be able to distinguish between these two different service types. My telco sends .... %{Telkom-Access-Type} and when I (for example) look in the environment - I see TELKOM_ACCESS_TYPE either set to "dsl" or "dial" - just what I need.... but I am trying to accesss these values inside some MySQL. In my "useracct" table - I have a table value called "aces_typ" (ie - Access-Type) which contains either the word "dial" or "dsl". In my "authorize_check_query" statement - I have.... AND ( aces_typ='%{Telkom-Access-Type}' OR '%{Telkom-Access-Type}'='' ) (I also do authenticate from NAS's which do not set that value (ie - My own AS5300) - hence the check for it not being set - Hmm - how do I set that in my Cisco?) This gives (in radiusd -X) the debug warning message of.... WARNING: Attempt to use unknown xlat function, or non-existent attribute in string %{Telkom-Access-Type} So how do I correctly access and use this value???? -- . . ___. .__ Posix Systems - Sth Africa /| /| / /__ mje@posix.co.za - Mark J Elkins, SCO ACE, Cisco CCIE / |/ |ARK \_/ /__ LKINS Tel: +27 12 807 0590 Cell: +27 82 601 0496
Mark J Elkins wrote:
This gives (in radiusd -X) the debug warning message of....
WARNING: Attempt to use unknown xlat function, or non-existent attribute in string %{Telkom-Access-Type}
So how do I correctly access and use this value????
See doc/variables.txt, which explains how to conditionally look at the contents of attributes. Alan DeKok.
Alan DeKok wrote:
Mark J Elkins wrote:
This gives (in radiusd -X) the debug warning message of....
WARNING: Attempt to use unknown xlat function, or non-existent attribute in string %{Telkom-Access-Type}
So how do I correctly access and use this value????
See doc/variables.txt, which explains how to conditionally look at the contents of attributes.
Alan DeKok.
I had doc/variables.txt open when I posted this question. I also tried sticking things like "request:" and "reply:" into my query - but had no joy. I'm either not being sent the Variable (so how do I send this myself from a NAS that I own - e.g. a Cisco router with an AUX port - so I can confirm I'm getting the Variable properly set)... or I'm missing the whole plot. My first language is English... so I should be able to understand what is written... In "variables.txt" - you state...
The run-time variables defined by the server are:
%{Attribute-Name} The value of the given Attribute-Name in the request packet
%{request:Attribute-Name} The value of value the given
Attribute-Name in the request packet These almost look the same... except for an extra "value" - so when does one use "request:" ??? Any chance of an example? In all honesty - I'm not sure when Telkom even sends me this attribute - ie is it sent at the same time as when the NAS gives me the username&realm and password - or is it sent with the accounting record? -- . . ___. .__ Posix Systems - Sth Africa /| /| / /__ mje@posix.co.za - Mark J Elkins, SCO ACE, Cisco CCIE / |/ |ARK \_/ /__ LKINS Tel: +27 12 807 0590 Cell: +27 82 601 0496
If you are introducing a new attribute it has to be defined in the dictionary. Ivan Kalik Kalik Informatika ISP Dana 19/6/2007, "Mark J Elkins" <mje@posix.co.za> piše:
Alan DeKok wrote:
Mark J Elkins wrote:
This gives (in radiusd -X) the debug warning message of....
WARNING: Attempt to use unknown xlat function, or non-existent attribute in string %{Telkom-Access-Type}
So how do I correctly access and use this value????
See doc/variables.txt, which explains how to conditionally look at the contents of attributes.
Alan DeKok.
I had doc/variables.txt open when I posted this question. I also tried sticking things like "request:" and "reply:" into my query - but had no joy. I'm either not being sent the Variable (so how do I send this myself from a NAS that I own - e.g. a Cisco router with an AUX port - so I can confirm I'm getting the Variable properly set)... or I'm missing the whole plot.
My first language is English... so I should be able to understand what is written...
In "variables.txt" - you state...
The run-time variables defined by the server are:
%{Attribute-Name} The value of the given Attribute-Name in the request packet
%{request:Attribute-Name} The value of value the given
Attribute-Name in the request packet
These almost look the same... except for an extra "value" - so when does one use "request:" ???
Any chance of an example?
In all honesty - I'm not sure when Telkom even sends me this attribute - ie is it sent at the same time as when the NAS gives me the username&realm and password - or is it sent with the accounting record?
-- . . ___. .__ Posix Systems - Sth Africa /| /| / /__ mje@posix.co.za - Mark J Elkins, SCO ACE, Cisco CCIE / |/ |ARK \_/ /__ LKINS Tel: +27 12 807 0590 Cell: +27 82 601 0496
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
tnt@kalik.co.yu wrote:
If you are introducing a new attribute it has to be defined in the dictionary.
Thanks Ivan - it was over three years ago when the Radius server was first set up - so I had completely forgotten about the Dictionary part... Added the 'dictionary.telkom', got this $included in 'dictionary' - and the "Warning:.." message has gone. The value of the new variable is now showing up. (South African audience) Incidentally - Telkom SA set this with all requests (access and accounting). Eddie Stassen at SAIX customised (an old version of) freeradius and gets his proxy servers to add the attribute. Apparently - using the new 'unlanguage' - this is now trivial. Thanks FreeRadius community!
Ivan Kalik Kalik Informatika ISP
Dana 19/6/2007, "Mark J Elkins" <mje@posix.co.za> piše:
Alan DeKok wrote:
Mark J Elkins wrote:
This gives (in radiusd -X) the debug warning message of....
WARNING: Attempt to use unknown xlat function, or non-existent attribute in string %{Telkom-Access-Type}
So how do I correctly access and use this value????
-- . . ___. .__ Posix Systems - Sth Africa /| /| / /__ mje@posix.co.za - Mark J Elkins, SCO ACE, Cisco CCIE / |/ |ARK \_/ /__ LKINS Tel: +27 12 807 0590 Cell: +27 82 601 0496
Mark J Elkins wrote:
Added the 'dictionary.telkom', got this $included in 'dictionary' - and the "Warning:.." message has gone. The value of the new variable is now showing up.
Could you mail a copy here so that other people don't have to go through this?
(South African audience) Incidentally - Telkom SA set this with all requests (access and accounting). Eddie Stassen at SAIX customised (an old version of) freeradius and gets his proxy servers to add the attribute. Apparently - using the new 'unlanguage' - this is now trivial.
That's the idea. I like trivial solutions to problems. Alan DeKok.
Alan DeKok wrote:
Mark J Elkins wrote:
Added the 'dictionary.telkom', got this $included in 'dictionary' - and the "Warning:.." message has gone. The value of the new variable is now showing up.
Could you mail a copy here so that other people don't have to go through this?
The Dictionary that needs the include .... $INCLUDE dictionary.telkom # ie - put this line in "/usr/share/freeradius/dictionary" # Contents of file "/usr/share/freeradius/dictionary.telkom" # # Telkom SA - RADIUS dictionary # Used to convey Telkom Specific Information in proxied requests # EDS 20031007 eddie@saix.net VENDOR Telkom 1431 BEGIN-VENDOR Telkom # Access-Type is used to describe the Access Medium used eg # Dial/ADSL/VSAT etc. Used in both Access-Requests and Accounting ATTRIBUTE Telkom-Access-Type 1 string # # Service-Type is used to indicate the Service used main in conjunction # with the SSG. Used in both Access-Requests and Accounting ATTRIBUTE Telkom-Service-Type 2 string END-VENDOR Telkom Use: You would normally add the following as a check item in your freeradius radcheck table by adding an entry like: Attribute : 'Telkom-Access-Type' Value : 'DSL' Op : '==' Which will restrict a user to ADSL only.
(South African audience) Incidentally - Telkom SA set this with all requests (access and accounting). Eddie Stassen at SAIX customised (an old version of) freeradius and gets his proxy servers to add the attribute. Apparently - using the new 'unlanguage' - this is now trivial.
That's the idea. I like trivial solutions to problems.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- . . ___. .__ Posix Systems - Sth Africa /| /| / /__ mje@posix.co.za - Mark J Elkins, SCO ACE, Cisco CCIE / |/ |ARK \_/ /__ LKINS Tel: +27 12 807 0590 Cell: +27 82 601 0496
Mark J Elkins wrote:
I had doc/variables.txt open when I posted this question. I also tried sticking things like "request:" and "reply:" into my query - but had no joy.
That only refers to attributes in a specific list.
I'm either not being sent the Variable (so how do I send this myself from a NAS that I own - e.g. a Cisco router with an AUX port - so I can confirm I'm getting the Variable properly set)... or I'm missing the whole plot.
Look in doc/variables.txt for "When attribute Foo is set".
My first language is English... so I should be able to understand what is written...
In "variables.txt" - you state... ... These almost look the same... except for an extra "value" - so when does one use "request:" ???
Are you sure you're reading *all* of variables.txt? See the "conditional syntax" section.
Any chance of an example?
See the "conditional syntax" section. If it's not in doc/variables.txt. upgrade to a recent version of the server.
In all honesty - I'm not sure when Telkom even sends me this attribute - ie is it sent at the same time as when the NAS gives me the username&realm and password - or is it sent with the accounting record?
No one knows but you, because no one else is getting the RADIUS packets. Look at the RADIUS packets to see what's being sent when. Alan DeKok.
On 19 Jun 2007, at 5:08 PM, Mark J Elkins wrote:
In all honesty - I'm not sure when Telkom even sends me this attribute - ie is it sent at the same time as when the NAS gives me the username&realm and password - or is it sent with the accounting record?
Hi Mark, SAIX sends it with the authentication request, which is how you determine what type of access type a user is using on the SAIX network. Regards --jm
-- . . ___. .__ Posix Systems - Sth Africa /| /| / /__ mje@posix.co.za - Mark J Elkins, SCO ACE, Cisco CCIE / |/ |ARK \_/ /__ LKINS Tel: +27 12 807 0590 Cell: +27 82 601 0496
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/ users.html
-- Jacques Marneweck http://www.powertrip.co.za/ http://www.powertrip.co.za/blog/ http://www.ataris.co.za/ #include <std/disclaimer.h>
participants (4)
-
Alan DeKok -
Jacques Marneweck -
Mark J Elkins -
tnt@kalik.co.yu