Setting up FreeRADIUS API for SAS PCE/SPE
RADIUS API requests radius client’s data from SAS PCE/SPE to dynamically update the clients in FreeRADIUS database.
In case of a fresh SafeNet server installation with MySQL database, RADIUS API encounters an issue with MySQL database (MySQL MySql.Data.EntityFramework.dll in GAC missing). It is a limitation of MySQL Connector 9.2.0.
Before installation, ensure that the following steps are performed:
-
After installing SafeNet server, install MySQL 9.2.0 Connector.
-
Configure SafeNet server with MySQL database.
Follow the steps:
For Windows Server 2012, 2012 R2, 2016, 2019, and 2022
- Click here to download the mysql.data.entityframework.9.2.0 nuget package. This library is freely available from Oracle’s MySQL website and must be used in compliance with the GPL-2.0 license. Ensure to understand the GPL-2.0 obligations before using this library.
- Change the extension of the downloaded package from .nupkg to .zip by renaming the package.
- Extract the package mysql.data.entityframework.9.2.0.zip.
- Open the extracted folder, navigate to lib > net462 > MySql.Data.EntityFramework.dll, and copy the complete path of this DLL file. It will be required in the next step.
-
Copy the following text in a text file and save the file in the .ps1 file format. Also check and update the DLL path as per the above step:
# Note that you should be running PowerShell as an Administrator
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish
$publish.GacInstall("C:\Downloads\mysql.data.entityframework.9.2.0\lib\net462\MySql.Data.EntityFramework.dll")
# If installing into the GAC on a server hosting web applications in IIS, restart IIS for changes to take effect
iisreset
-
Run the .ps1 file as an administrator in the PowerShell.
-
To validate whether your script runs successfully, go to C:\Windows\Microsoft.NET\assembly\GAC_MSI and verify that MySql.Data.EntityFramework folder is created after execution of the above script.
Points to remember
-
Default location:
System Directory:\Downloads\mysql.data.entityframework.9.2.0\lib\net462
(Assuming it will be the path of your directory where the nuget package is downloaded) -
Open the PowerShell script and change the path to where your DLL resides.