cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple SQL selects with JSBR carrier 7.3.1

SOLVED
Terebok_
Contributor

Multiple SQL selects with JSBR carrier 7.3.1

Hello community,

I would apreciate if smb would be able to answer the following question:

Is there any chance that we may use multiple SQL selects with Juniper SBR carrier? The purpose for that is to differintiate authentication reqeusts coming from BRAS and authorization requests coming from the policy server?

In other words, SQL select #1 would be used when BRAS is trying to establish a user session and SQL select #2 would be used for authorization of individual services available within service bundle.

Regards,

Evgeny

1 ACCEPTED SOLUTION

Accepted Solutions
CraigB_
Frequent Contributor

Re: Multiple SQL selects with JSBR carrier 7.3.1

Why not create two separate SQL auth files and call them via directed realm based on NAS-IP-ADDRESS?

Unless they've updated the code in SBR Carrier to do things differently from SBR Enterprise SQL, the answer is that you cannot have multiple selects in one auth file.

You could also write a stored procedure that took the NAS-IP-ADDRESS as an argument and based ont that, your stored procedure would issue the appropriate SELECT statement.

View solution in original post

7 REPLIES 7
Terebok_
Contributor

Re: Multiple SQL selects with JSBR carrier 7.3.1

I also observed that this functionality is supported for SQL accounting:

´ Different request types can be mapped to different SQL statements that may operate
against distinct tables within the database.

Though, this option is not specified for the SQL authentication.

Evgeny

CraigB_
Frequent Contributor

Re: Multiple SQL selects with JSBR carrier 7.3.1

Why not create two separate SQL auth files and call them via directed realm based on NAS-IP-ADDRESS?

Unless they've updated the code in SBR Carrier to do things differently from SBR Enterprise SQL, the answer is that you cannot have multiple selects in one auth file.

You could also write a stored procedure that took the NAS-IP-ADDRESS as an argument and based ont that, your stored procedure would issue the appropriate SELECT statement.

View solution in original post

Terebok_
Contributor

Re: Multiple SQL selects with JSBR carrier 7.3.1

Hello sir,

I appreciate your help!

> Why not create two separate SQL auth files and call them via directed realm based on NAS-IP-ADDRESS?

Good point. I think this may work for us.

> Unless they've updated the code in SBR Carrier to do things differently from SBR Enterprise SQL, the answer is that you cannot have multiple selects in one auth file.

I assume that we should accomplish some sort of Request Routing to map the requests to appropriate auth files, based on NAS-IP-ADDRESS, for instance. Any chance you've got a configuration example for using a directed realm? not necessarily for calling auth files based on NAS-IP-ADDRESS, of course :-)

Regards,

Evgeny

apaul_
Regular Contributor

Re: Multiple SQL selects with JSBR carrier 7.3.1

Hi,

Below configuration steps is what you need.

Edit proxy.ini , [Processing] Section , ensure Attribute-Mapping is enabled

In the [Directed] section of the proxy.ini, initialize both the directed Realms.

This entry must match the name of a RealmName.dir file in the working directory as proxy.ini.

Under the [AuthAttributeMap] section include the attribute to realmname mapping configuration as below
RealmName1
NAS-IP-Address=Value

RealmName2
NAS-IP-Address=Value

Configure the each of the RealmName.dir files, under the [AuthMethods] section of a RealmName.dir file lists the appropriate SQL authentication methods to be used

Hope that helps

Terebok_
Contributor

Re: Multiple SQL selects with JSBR carrier 7.3.1

Thanks for your help guys,

I managed to do this. In our particular scenario we're adding realm to user-name when authorizing services on the SRC.

So I created two separate realms, one for MX and one for SRC. First is handling undecorated requests and second is handling realm requests. I also defined a separate authentication method for each realm.

Evgeny

apaul_
Regular Contributor

Re: Multiple SQL selects with JSBR carrier 7.3.1

Hi Evgeny,

Good to know the solution worked for you.Feel free to mark the post as 'accepted solution' that way it might help others as well

Thanks

Terebok_
Contributor

Re: Multiple SQL selects with JSBR carrier 7.3.1

Seems like I can pick only one reply as solution.

Sorry about that. Anyway, you got your kudo :-)

/Evgeny