-
Bug
-
Resolution: Done
-
Undefined
-
4.6.0
-
None
-
Quality / Stability / Reliability
-
False
-
-
False
-
-
-
Rox Sprint 4.7G - Global
-
0
USER PROBLEM
What is the user experiencing as a result of the bug? Include steps to reproduce.
- Customer is looking to integrate mattermost into there RHACS just like Slack can be integrated.
- Customer tried Slack Integration for mattermost, because Mattermost API is Slack-compatible.
https://docs.mattermost.com/about/integrations.html#webhooks
- However, it did not work, it came back with error
"Must be a valid Slack webhook URL, like https://hooks.slack.com/services/EXAMPLE"
CONDITIONS
What conditions need to exist for a user to be affected? Is it everyone? Is it only those with a specific integration? Is it specific to someone with particular database content? etc.
- Whenever the customer tries to create an integration in the ACS UI, with an endpoint for the Slack integration that does not start with "https://hooks.slack.com"
ROOT CAUSE
What is the root cause of the bug?
- The ACS UI app tries to do front-end validation on the URL, using the regex `
^((https?):\/\/)?([a-zA-Z0-9\-.]\.)?[a-zA-Z0-9\-.]{1,}\.[a-zA-Z]{2,}(\.[a-zA-Z]{2,})?(\/services)(\/[a-zA-Z0-9-])$`, which requires the URL fragment "sevices" in the middle of the URL.
FIX
How was the bug fixed (this is more important if a workaround was implemented rather than an actual fix)?
- Remove the regex validation, and only validate that the URL field is not empty. (In this case, we could probably require a standard URL, but for some other integrations, we have had customers who used Kubernetes services names, which can be as short as single words–better to be as permissive as possible.)