Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeRadius Configuration #431

Open
elacy opened this issue Dec 23, 2023 · 1 comment
Open

FreeRadius Configuration #431

elacy opened this issue Dec 23, 2023 · 1 comment
Labels
backlog Issues backlogged for inclusion in future releases feature request New feature or request

Comments

@elacy
Copy link
Contributor

elacy commented Dec 23, 2023

Is your feature request related to existing pfSense functionality that is missing from the API? Please describe.
Netgate Documentation for FreeRadius

Is your feature request related to a problem? Please describe.
I'm creating a terraform provider based on your api and I would like to be able to add FreeRadius users using terraform

Describe the solution you'd like
PFsense API Endpoints dedicated to creating/updating FreeRadius Configuration. Don't necessarily need you to actually create them, some idea about how you might go about implementing this in your API would be sufficient. Particularly the part about how the configuration isn't usage if the package is not installed. Then again if the mood strikes you, I wouldn't object :D

Describe alternatives you've considered
I could use your configuration API but I decided that this would lose the benefit of the validation that you have placed in all the other APIs

Additional context
Thanks for making this API!

@elacy elacy added backlog Issues backlogged for inclusion in future releases feature request New feature or request labels Dec 23, 2023
@jaredhendrickson13
Copy link
Owner

Good questions! As for endpoints that interact with packages, the APIModel class contains the packages and package_includes properties that can be used to define packages required for your APIModel(s) to operate. There's a section in the contributors guide that briefly details these properties. A good example can be found in the Service Watchdog APIModel:

public function __construct() {
parent::__construct();
$this->privileges = ["page-all", "api-services-servicewatchdog"];
$this->packages = ["pfSense-pkg-Service_Watchdog"];
$this->package_includes = ["servicewatchdog.inc"];
$this->change_note = "Modified Service Watchdog configuration via API";
}

The contributors guide also contains other helpful information on developing new API endpoints. In general, endpoints should be written to mimic their webConfigurator pages as closely as possible. Beyond that, implementation is mostly up to you. If you have any troubles feel free to reach out!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Issues backlogged for inclusion in future releases feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants