jaredhendrickson13 / pfsense-api

The missing REST and GraphQL API package for pfSense
https://pfrest.org/
Apache License 2.0
679 stars 105 forks source link

An option control which are the sensitive fields in a configurable matter #582

Open Coffee-Processing-Unit opened 1 week ago

Coffee-Processing-Unit commented 1 week ago

Firstly, thank you for the new 2.2.0 version and for adding the use_tls field.

Background This feature request is related to the recently added expose_sensitive_fields pfSense REST API setting. The sensitive fields setting replaced some of the "write_only" setting, and now some of the fields that weren't previously exposed can be optionally exposed.

Feature description I request an option to control which fields are expose_sensitive_fields in a configurable matter. That is, without requiring to change the code. The reason is not to have only all-or-nothing option - to enable part of the sensitive fields to be read.

Describe the solution you'd like A solution I thought about is to add a "exclude_from_sensitive_fields" field in the RESTAPI xml configuration file. The format of values in this field will be "_" for example.

I am looking forward to your thoughts and solutions.

jaredhendrickson13 commented 1 week ago

I like your solution. That shouldn't be too difficult to implement either. I'll see if I can get this working without making too many changes. Should be able to include it in the patch if that's the case.

Thanks!

Coffee-Processing-Unit commented 2 days ago

Thank you! When will the next patch be released?

jaredhendrickson13 commented 4 hours ago

I should be able to have the patch out sometime next week. I've unfortunately had limited time available this month.