elsa-core icon indicating copy to clipboard operation
elsa-core copied to clipboard

HttpEndpoint Path Validation

Open jigneshnarain opened this issue 2 years ago • 3 comments

Can the HttpEndpoint activity (on the dashboard) be extended so that the Path is validated to prevent the creation of duplicate endpoints?

jigneshnarain avatar Aug 22 '22 11:08 jigneshnarain

Not at the moment; we need to add some extensibility points so that plug-ins can implement custom validation logic. In the case of HTTP Endpoint, we should provide a plug-in that implements duplicate path validation. Might be tricky, because we need to validate between published workflows only; if there’s a workflow using the same path by that workflow is not published, validation should ignore it. But then, what should happen when you publish the workflow with the duplicate path?

sfmskywalker avatar Aug 24 '22 06:08 sfmskywalker

what should happen when you publish the workflow with the duplicate path? An additional validation check when the workflow is published will need to be added to prevent the duplicate path from being created.

Since the extensibility does not exist at the moment, are there other options to add validation to the HTTP Endpoint activity?

jigneshnarain avatar Aug 24 '22 07:08 jigneshnarain

There is also a multi-tenancy issue here (within same database and current tenant ids). If custom tenant provider is written for example based on hostname or additional header than different tenants could have workflows with same path. Hence path validation should be written in extensible fashion to allow for such a use case.

tomy2105 avatar Aug 29 '22 12:08 tomy2105

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 28 '22 20:10 stale[bot]