* Add support for secret accessor functions in JavaScript
Refactored the rendering and evaluation of JavaScript to include method definitions alongside existing properties. Enhanced secret handling by generating asynchronous accessor functions, improving the clarity and functionality of secret management in scripting.
* Refactor secret retrieval logic in JavaScript engine configuration
Refactored the code to use a dedicated method `ResolveSecretAsync` for secret retrieval, improving clarity and maintainability. Added a check to ensure that only active secrets are decrypted, enhancing robustness and error handling.
* Add SecretExpired notification and mediator to updater
Introduces a new SecretExpired notification class and integrates it within DefaultExpiredSecretsUpdater. The updater now sends a SecretExpired notification via the mediator upon expiring a secret.
* Add secret scripting integration for JavaScript
Introduced a new `Elsa.Secrets.Scripting` module that provides secret management capabilities within JavaScript workflows. This includes configuring the Jint engine to use workflow variables, adding new type and variable definition providers, and integrating with existing secret management features.
* Refactor secret name extraction to a separate method
Moved the logic for extracting secret names from the main method to a dedicated private method `GetSecretNamesFromExpression`. This improves code readability and maintains the single responsibility principle by delegating secret name extraction to its own method.
* Add input evaluation, sensitive input handling, and middleware refactor
Introduced methods for evaluating activity input properties and handling inputs marked as sensitive. Refactored `ExecutionLogMiddleware` constructor for consistency. Enhanced `SendHttpRequestBase` to mark authorization inputs as potentially containing secrets. Removed obsolete entries and adjusted persistence logic for clarity.
* Refactor IActivityStateProtector interface
Remove unused using directives and unnecessary comments. Simplify the definition of the `ProtectedActivityStateContext` record.
* Add activity state filtering mechanism
Introduce an abstract filter base class, context, and result models to enable filtering of activity state. Implement a default filter manager to run these filters and apply a specific filter for obfuscating HTTP request headers. Update necessary dependencies and extension methods to integrate the new filtering functionality.
* Add expired secrets management
Implemented services to manage expired secrets by periodically checking and updating their status. Introduced a new hosted service to perform the sweep and configurable options for the sweep interval. Updated related classes and configurations accordingly.
* Update SweepInterval in appsettings.json
Changed the Secrets Management SweepInterval from 30 seconds to 4 hours. This adjustment aims to reduce the frequency of sweep operations and improve overall system performance.
* Update comment to reflect configuring engine with secrets
The comment was changed to better describe the handler's function, specifying that it configures the Jint engine with secrets instead of workflow variables. This clarifies the purpose and usage of the handler in the context of the code.
* Remove unused inputDescriptors variable
This commit removes the inputDescriptors variable, which was declared but never used in DefaultActivityExecutionMapper.cs. This helps in cleaning up the code and potentially reducing memory usage. Ensuring that all declared variables are utilized can improve code readability and maintainability.