Increase flexibility of SecretSource?
Closed this issue · 2 comments
The existing SecretSource method is great and follows the RFC, as it should. However, relying on IP source to determine what secret should be used is difficult in very large environments that don't necessarily standardize IP space deployments. In my employer's use case, it would be much simpler to rely on something like Nas-Identifier.
Would you be open to supporting something like that? I'm happy to do a PR and discuss approaches further.
Added a PR, please let me know what you think. I took an approach that would not impact any existing code using SecretSource.RADIUSSecret. If you are ok with a 'breaking' change, the cleaner/easier solution would be to simply add the []bytes parameter to that method, rather than a second interface like I have done in my first attempt.