ShadowKnightMK4 / OdinSearch

Search thru local computer files and feed matching output to a class that consumes it.
MIT License
1 stars 0 forks source link

Add Managed plugin support #19

Closed ShadowKnightMK4 closed 5 months ago

ShadowKnightMK4 commented 5 months ago

See title.

Plan is to functionally just load the assembly and assume managed plugin is running our .NET runtime.

ShadowKnightMK4 commented 5 months ago

Technically exists now.

Do need to think about security issues as I dont' want 'evil' plugins causing damage to the library when running. Likely will separate each plugin loaded into its own name space and have a check that refusing loading unsigned plugins unless the caller itself opts into that (or is unsigned.)

ShadowKnightMK4 commented 5 months ago

So .NET 7 puts a damper on using AppDomains to seperate stuff,. I'm closing this as done for now, the extern plugin system itself (minus the exampe unmanged class) has a system in place to see if itself is signed and comparing the certificate if any against any loaded plugin.

By Default that is active with the OdinSearch_OutputConsumer_UnmanagedPlugin and OdinSearch_OutputConsumer_ExternManaged but can be disabled by setting OdinSearch_OutputConsumer_PluginCheck.CheckAgainstThis to null.

End Theory is developing the source likely will involve testing unsigned plugins but once they're done, both the class library part of OdinSearch and the plugin can be signed if a certificate. The code itself does not care what certificate long as OdinSearch and the plugin have machine certificates.