Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds webhook format check for Slack #814

Merged
merged 30 commits into from
Nov 20, 2023

Conversation

Noir01
Copy link
Contributor

@Noir01 Noir01 commented Nov 10, 2023

Description

Adds webhook format check for Slack

Issues Resolved

fixes #787

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Member

@zhichao-aws zhichao-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used mock data to perform integration test. And the mock data may can not pass the new validation. Please also fix the tests in this repo and dashboards-notifications.

@Noir01
Copy link
Contributor Author

Noir01 commented Nov 10, 2023

We used mock data to perform integration test. And the mock data may can not pass the new validation. Please also fix the tests in this repo and dashboards-notifications.

I've (hopefully) fixed the integtests in this repo.
I'll go through dashboard-notifications tests and open a PR there soon

@Noir01
Copy link
Contributor Author

Noir01 commented Nov 10, 2023

Also, I just noticed the 'Unverified' tags on my commits. I was messing around with the automatic signing off feature and I think I messed up some settings which is leading to all my commits appearing as unverified

@Hailong-am
Copy link
Collaborator

Also, I just noticed the 'Unverified' tags on my commits. I was messing around with the automatic signing off feature and I think I messed up some settings which is leading to all my commits appearing as unverified

@Noir01 please follow the guide in https://github.com/opensearch-project/notifications/pull/814/checks?check_run_id=18584633999 to fix DCO and there has a unit test failure, can you fix it as well.

@Noir01
Copy link
Contributor Author

Noir01 commented Nov 13, 2023

Also, I just noticed the 'Unverified' tags on my commits. I was messing around with the automatic signing off feature and I think I messed up some settings which is leading to all my commits appearing as unverified

@Noir01 please follow the guide in https://github.com/opensearch-project/notifications/pull/814/checks?check_run_id=18584633999 to fix DCO and there has a unit test failure, can you fix it as well.

Can I close this PR and re-open another with the correct signing-off email?

@Hailong-am
Copy link
Collaborator

Can I close this PR and re-open another with the correct signing-off email?

You don't have to. Follow the guide mentioned in link https://github.com/opensearch-project/notifications/pull/814/checks?check_run_id=18584633999

  1. In your local branch, run: git rebase HEAD~8 --signoff
  2. Force push your changes to overwrite the branch: git push --force-with-lease origin patch-2

@Noir01 Noir01 force-pushed the patch-2 branch 2 times, most recently from b099c60 to 1867a8a Compare November 15, 2023 06:46
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.89%. Comparing base (62b7b4f) to head (aa3b636).
Report is 23 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #814      +/-   ##
============================================
+ Coverage     66.85%   66.89%   +0.03%     
- Complexity      263      265       +2     
============================================
  Files            39       39              
  Lines          1738     1740       +2     
  Branches        165      165              
============================================
+ Hits           1162     1164       +2     
  Misses          453      453              
  Partials        123      123              
Flag Coverage Δ
opensearch-notifications 66.89% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Noir01
Copy link
Contributor Author

Noir01 commented Nov 15, 2023

I was trying to update this branch, and rebased it, but it got rid of the Verified tag. How can I fix this? Also, how do I deal with the failed codecov tests?

@Hailong-am
Copy link
Collaborator

I was trying to update this branch, and rebased it, but it got rid of the Verified tag. How can I fix this? Also, how do I deal with the failed codecov tests?

The DCO failed with reason

Summary
Commit sha: 7e6b4cd, Author: Aniruddh, Committer: Aniruddh; Can not find "Aniruddh 63553175+noir01@users.noreply.github.com", in ["Aniruddh Srivastava ansriv2005@gmail.com", "Aniruddh Srivastava aniruddh@purdue.edu"].
Commit sha: 0791276, Author: Aniruddh Srivastava, Committer: Aniruddh; Expected "Aniruddh Srivastava ansriv2005@gmail.com", but got "Aniruddh Srivastava aniruddh@purdue.edu".

  1. can you check the email settings of your account https://github.com/settings/emails make sure Keep my email addresses private is not checked.
  2. make sure you local git config user email is ansriv2005@gmail.com with command git config user.email

@Noir01
Copy link
Contributor Author

Noir01 commented Nov 15, 2023

I was trying to update this branch, and rebased it, but it got rid of the Verified tag. How can I fix this? Also, how do I deal with the failed codecov tests?

The DCO failed with reason

Summary
Commit sha: 7e6b4cd, Author: Aniruddh, Committer: Aniruddh; Can not find "Aniruddh 63553175+noir01@users.noreply.github.com", in ["Aniruddh Srivastava ansriv2005@gmail.com", "Aniruddh Srivastava aniruddh@purdue.edu"].
Commit sha: 0791276, Author: Aniruddh Srivastava, Committer: Aniruddh; Expected "Aniruddh Srivastava ansriv2005@gmail.com", but got "Aniruddh Srivastava aniruddh@purdue.edu".

  1. can you check the email settings of your account https://github.com/settings/emails make sure Keep my email addresses private is not checked.
  2. make sure you local git config user email is ansriv2005@gmail.com with command git config user.email

I just did both of those steps

@Hailong-am
Copy link
Collaborator

I just did both of those steps

@Noir01 after this, please follow the steps in https://github.com/opensearch-project/notifications/pull/814/checks?check_run_id=18694631981 to fix DCO

Copy link
Member

@zhichao-aws zhichao-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work, but I think we should add more tests cases. Can we add unit test cases to test more success cases and fail cases for url validation? And the integ test case for exception message?

zhichao-aws and others added 8 commits November 15, 2023 23:11
* Added feature support for microsoft teams webhoo

Signed-off-by: danielkyalo599 <johbiento@gmail.com>

* Added feature support for microsoft teams webhook ,removed valid webhooks

Signed-off-by: danielkyalo599 <johbiento@gmail.com>

* Added feature support for Microsoft teams webhook

Signed-off-by: danielkyalo599 <johbiento@gmail.com>

* Refactored feature support for  ms teams and added unit and integTest

Signed-off-by: danielkyalo599 <johbiento@gmail.com>

* fix build in core

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* fix core-spi build

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* fix notifications main code

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* fix mappings, add IT

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add auto upgrade mapping logic

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* put load mapping to initialize step

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add schema_version field

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add integ test

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* adjust with auto upgrade mapping logic

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add bwc

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* modify bwc

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* modify bwc

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* resolve  comments

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add license header

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* fix microsoft teams sample url in IT to adapt url validation

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: danielkyalo599 <johbiento@gmail.com>
Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Co-authored-by: danielkyalo599 <johbiento@gmail.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
* add validation failure message for Microsoft Teams

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* modify integtest

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
* Add 2.10.0 release notes

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* update release notes

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Update opensearch-notifications.release-notes-2.10.0.0.md

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix wrong PR number

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
…x warning (opensearch-project#784)

* Fix integration test failure by allowing direct access to system index warning

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Fix bwc test failure of throwing direct access to system index when getting mapping

Signed-off-by: gaobinlong <gbinlong@amazon.com>

---------

Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
@zhichao-aws
Copy link
Member

Good work, but I think we should add more tests cases. Can we add unit test cases to test more success cases and fail cases for url validation? And the integ test case for exception message?

I'm not very experienced in this, so could you explain a bit more?

Please refer to these test cases:

;

fun `test create config with wrong Microsoft Teams url and get error text`() {

Got it. Do you only want those two copied for slack?

You know we're adding tests to make sure the code behavior are as expected. And here we want to make sure the url check reject wrong url, and return correct message to help users fix it. You can write test cases just like this example, but I think you should modify these mock urls to adapt to you regex expression

@Noir01
Copy link
Contributor Author

Noir01 commented Nov 16, 2023

Good work, but I think we should add more tests cases. Can we add unit test cases to test more success cases and fail cases for url validation? And the integ test case for exception message?

I'm not very experienced in this, so could you explain a bit more?

Please refer to these test cases:

;

fun `test create config with wrong Microsoft Teams url and get error text`() {

Got it. Do you only want those two copied for slack?

You know we're adding tests to make sure the code behavior are as expected. And here we want to make sure the url check reject wrong url, and return correct message to help users fix it. You can write test cases just like this example, but I think you should modify these mock urls to adapt to you regex expression

Oh yeah, of course.

Signed-off-by: Aniruddh <ansriv2005@gmail.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
@Noir01
Copy link
Contributor Author

Noir01 commented Nov 16, 2023

Good work, but I think we should add more tests cases. Can we add unit test cases to test more success cases and fail cases for url validation? And the integ test case for exception message?

Done.

@Hailong-am
Copy link
Collaborator

The validation happens when create new slack channel or update existing slack channel. To be compatible with existing data, we may want to add a condition for update case, only if webhook url has changed, we do the validation. we can have this in follow up PR and remove the backport 2.x label for now.

@Noir01 Noir01 requested a review from zhichao-aws November 18, 2023 08:41
Copy link
Member

@zhichao-aws zhichao-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@zhichao-aws zhichao-aws merged commit 87109a0 into opensearch-project:main Nov 20, 2023
18 checks passed
@Noir01 Noir01 deleted the patch-2 branch November 20, 2023 04:11
@Noir01 Noir01 mentioned this pull request Nov 23, 2023
1 task
@Noir01
Copy link
Contributor Author

Noir01 commented Dec 1, 2023

The validation happens when create new slack channel or update existing slack channel. To be compatible with existing data, we may want to add a condition for update case, only if webhook url has changed, we do the validation. we can have this in follow up PR and remove the backport 2.x label for now.

@Hailong-am Shall I open a new issue for this?

@Hailong-am
Copy link
Collaborator

The validation happens when create new slack channel or update existing slack channel. To be compatible with existing data, we may want to add a condition for update case, only if webhook url has changed, we do the validation. we can have this in follow up PR and remove the backport 2.x label for now.

@Hailong-am Shall I open a new issue for this?

sure, thanks

@zhichao-aws
Copy link
Member

The validation happens when create new slack channel or update existing slack channel. To be compatible with existing data, we may want to add a condition for update case, only if webhook url has changed, we do the validation. we can have this in follow up PR and remove the backport 2.x label for now.

@Hailong-am Shall I open a new issue for this?

sure, thanks

We already have these issues now #818 #819 .

opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 23, 2024
* Microsoft teams (#676)

* Added feature support for microsoft teams webhoo

Signed-off-by: danielkyalo599 <johbiento@gmail.com>

* Added feature support for microsoft teams webhook ,removed valid webhooks

Signed-off-by: danielkyalo599 <johbiento@gmail.com>

* Added feature support for Microsoft teams webhook

Signed-off-by: danielkyalo599 <johbiento@gmail.com>

* Refactored feature support for  ms teams and added unit and integTest

Signed-off-by: danielkyalo599 <johbiento@gmail.com>

* fix build in core

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* fix core-spi build

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* fix notifications main code

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* fix mappings, add IT

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add auto upgrade mapping logic

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* put load mapping to initialize step

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add schema_version field

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add integ test

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* adjust with auto upgrade mapping logic

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add bwc

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* modify bwc

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* modify bwc

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* resolve  comments

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add license header

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* fix microsoft teams sample url in IT to adapt url validation

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: danielkyalo599 <johbiento@gmail.com>
Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Co-authored-by: danielkyalo599 <johbiento@gmail.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Add microsoft teams validation error message (#746)

* add validation failure message for Microsoft Teams

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* modify integtest

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* onboard system and hidden index (#742)

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Updates demo certs used in integ tests (#756)

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Add 2.10.0 release notes (#755)

* Add 2.10.0 release notes

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* update release notes

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Update opensearch-notifications.release-notes-2.10.0.0.md

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix wrong PR number

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* bump bwc version to 2.11 (#763)

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Add 2.11 release notes (#774)

Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Fix integration test failure by allowing direct access to system index warning (#784)

* Fix integration test failure by allowing direct access to system index warning

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Fix bwc test failure of throwing direct access to system index when getting mapping

Signed-off-by: gaobinlong <gbinlong@amazon.com>

---------

Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Re-enable detekt

Bumped version of `io.gitlab.arturbosch.detekt:detekt-gradle-plugin` to `1.23.0`

Signed-off-by: Aniruddh <63553175+Noir01@users.noreply.github.com>
Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* bump bwc version to 2.12 (#793)

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Update dependency org.json:json to v20231013 (#795)

Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Impove security plugin enabling check (#792)

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Add github workflow to auto bump bwc version  (#799)

* Adding bump bwc version github workflow

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* revert app id

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Replace the TestMailServer to GreenMail server (#801)

* Add 2.11 release notes (#774)

Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: rdani <rachana_sudhindradani@intuit.com>

* Fix integration test failure by allowing direct access to system index warning (#784)

* Fix integration test failure by allowing direct access to system index warning

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Fix bwc test failure of throwing direct access to system index when getting mapping

Signed-off-by: gaobinlong <gbinlong@amazon.com>

---------

Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: rdani <rachana_sudhindradani@intuit.com>

* Replace the TestMailServer to GreenMail server

Signed-off-by: rdani <rachana_sudhindradani@intuit.com>

* bump bwc version to 2.12 (#793)

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: rdani <rachana_sudhindradani@intuit.com>

* Update dependency org.json:json to v20231013 (#795)

Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: rdani <rachana_sudhindradani@intuit.com>

* Re-enable detekt (#796)

Bumped version of `io.gitlab.arturbosch.detekt:detekt-gradle-plugin` to `1.23.0`

Signed-off-by: Aniruddh <63553175+Noir01@users.noreply.github.com>
Co-authored-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: rdani <rachana_sudhindradani@intuit.com>

* Add assertion for retrieval of notification

Signed-off-by: rdani <rachana_sudhindradani@intuit.com>

* Update to stable version

Signed-off-by: rdani <rachana_sudhindradani@intuit.com>

* Update to stable version

Signed-off-by: rdani <rachana_sudhindradani@intuit.com>

* Update to suggested version

Signed-off-by: rdani <rachana_sudhindradani@intuit.com>

---------

Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: rdani <rachana_sudhindradani@intuit.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Aniruddh <63553175+Noir01@users.noreply.github.com>
Co-authored-by: Yuye Zhu <yuyezhu@amazon.com>
Co-authored-by: gaobinlong <gbinlong@amazon.com>
Co-authored-by: rdani <rachana_sudhindradani@intuit.com>
Co-authored-by: Hailong Cui <ihailong@amazon.com>
Co-authored-by: Aniruddh <63553175+Noir01@users.noreply.github.com>
Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Onboard prod jenkins docker image to github actions (#809)

* Onboard prod jenkins docker image to github actions

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Add more

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

---------

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Added org.apache.logging.log4j:log4j-slf4j-impl to classpath (#791)

* Added slf4j-jdk14.jar to classpath

Adding binding for SLF4J that should fix StaticLoggerBinder being not loaded.
Followed instructions from warning messages that appear.

Signed-off-by: Noir <63553175+Noir01@users.noreply.github.com>

* Undid 80fc198

Removed slf4j-jdk14.jar from classpath

Signed-off-by: Aniruddh <63553175+Noir01@users.noreply.github.com>

* Added org.apache.logging.log4j:log4j-slf4j-impl to classpath

Signed-off-by: Aniruddh <63553175+Noir01@users.noreply.github.com>

---------

Signed-off-by: Noir <63553175+Noir01@users.noreply.github.com>
Signed-off-by: Aniruddh <63553175+Noir01@users.noreply.github.com>
Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Added Slack webhook URL validation regex

Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Replaced wrongly formatted dummy Slack URL with properly formatted dummy Slack URL

Signed-off-by: Aniruddh Srivastava <ansriv2005@gmail.com>
Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Replaced more wrongly formatted dummy Slack URL with properly formatted dummy Slack URL

Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Replaced even more wrongly formatted dummy Slack URL with properly formatted dummy Slack URL

Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Replace path of mock Slack URL with `sample_slack_url`

Signed-off-by: Aniruddh <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Remove slackId from domainIds

Signed-off-by: Aniruddh <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Replace wrongly formatted dummy Slack URL with properly formatted dummy Slack URL

Signed-off-by: Aniruddh <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Add tests for wrong Slack URLs

Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Add validation tests for Slack URL

Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Format

Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* GovSlack apps can use the slack-gov.com domain

Signed-off-by: Aniruddh <ansriv2005@gmail.com>

* Add validation for gov-slack.com domain

Signed-off-by: Aniruddh <ansriv2005@gmail.com>

---------

Signed-off-by: danielkyalo599 <johbiento@gmail.com>
Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <63553175+Noir01@users.noreply.github.com>
Signed-off-by: rdani <rachana_sudhindradani@intuit.com>
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Noir <63553175+Noir01@users.noreply.github.com>
Signed-off-by: Aniruddh Srivastava <ansriv2005@gmail.com>
Signed-off-by: Aniruddh <aniruddh@purdue.edu>
Co-authored-by: zhichao-aws <zhichaog@amazon.com>
Co-authored-by: danielkyalo599 <johbiento@gmail.com>
Co-authored-by: Hailong Cui <ihailong@amazon.com>
Co-authored-by: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com>
Co-authored-by: Yuye Zhu <yuyezhu@amazon.com>
Co-authored-by: gaobinlong <gbinlong@amazon.com>
Co-authored-by: Rachana Dani <36135368+rachana-dani@users.noreply.github.com>
Co-authored-by: rdani <rachana_sudhindradani@intuit.com>
Co-authored-by: Peter Zhu <zhujiaxi@amazon.com>
(cherry picked from commit 87109a0)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
amsiglan pushed a commit that referenced this pull request Aug 23, 2024
* Microsoft teams (#676)

* Added feature support for microsoft teams webhoo



* Added feature support for microsoft teams webhook ,removed valid webhooks



* Added feature support for Microsoft teams webhook



* Refactored feature support for  ms teams and added unit and integTest



* fix build in core



* fix core-spi build



* fix notifications main code



* fix mappings, add IT



* add auto upgrade mapping logic



* put load mapping to initialize step



* add schema_version field



* add integ test



* adjust with auto upgrade mapping logic



* add bwc



* modify bwc



* modify bwc



* resolve  comments



* add license header



* fix microsoft teams sample url in IT to adapt url validation



---------






* Add microsoft teams validation error message (#746)

* add validation failure message for Microsoft Teams



* modify integtest



---------




* onboard system and hidden index (#742)




* Updates demo certs used in integ tests (#756)




* Add 2.10.0 release notes (#755)

* Add 2.10.0 release notes



* update release notes



* Update opensearch-notifications.release-notes-2.10.0.0.md



* fix wrong PR number



---------




* bump bwc version to 2.11 (#763)




* Add 2.11 release notes (#774)




* Fix integration test failure by allowing direct access to system index warning (#784)

* Fix integration test failure by allowing direct access to system index warning



* Fix bwc test failure of throwing direct access to system index when getting mapping



---------





* Re-enable detekt

Bumped version of `io.gitlab.arturbosch.detekt:detekt-gradle-plugin` to `1.23.0`





* bump bwc version to 2.12 (#793)





* Update dependency org.json:json to v20231013 (#795)





* Impove security plugin enabling check (#792)





* Add github workflow to auto bump bwc version  (#799)

* Adding bump bwc version github workflow



* revert app id



---------





* Replace the TestMailServer to GreenMail server (#801)

* Add 2.11 release notes (#774)




* Fix integration test failure by allowing direct access to system index warning (#784)

* Fix integration test failure by allowing direct access to system index warning



* Fix bwc test failure of throwing direct access to system index when getting mapping



---------




* Replace the TestMailServer to GreenMail server



* bump bwc version to 2.12 (#793)




* Update dependency org.json:json to v20231013 (#795)




* Re-enable detekt (#796)

Bumped version of `io.gitlab.arturbosch.detekt:detekt-gradle-plugin` to `1.23.0`





* Add assertion for retrieval of notification



* Update to stable version



* Update to stable version



* Update to suggested version



---------














* Onboard prod jenkins docker image to github actions (#809)

* Onboard prod jenkins docker image to github actions



* Add more



---------





* Added org.apache.logging.log4j:log4j-slf4j-impl to classpath (#791)

* Added slf4j-jdk14.jar to classpath

Adding binding for SLF4J that should fix StaticLoggerBinder being not loaded.
Followed instructions from warning messages that appear.



* Undid 80fc198

Removed slf4j-jdk14.jar from classpath



* Added org.apache.logging.log4j:log4j-slf4j-impl to classpath



---------






* Added Slack webhook URL validation regex




* Replaced wrongly formatted dummy Slack URL with properly formatted dummy Slack URL





* Replaced more wrongly formatted dummy Slack URL with properly formatted dummy Slack URL




* Replaced even more wrongly formatted dummy Slack URL with properly formatted dummy Slack URL




* Replace path of mock Slack URL with `sample_slack_url`




* Remove slackId from domainIds




* Replace wrongly formatted dummy Slack URL with properly formatted dummy Slack URL




* Add tests for wrong Slack URLs



* Add validation tests for Slack URL



* Format



* GovSlack apps can use the slack-gov.com domain



* Add validation for gov-slack.com domain



---------
























(cherry picked from commit 87109a0)

Signed-off-by: danielkyalo599 <johbiento@gmail.com>
Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Aniruddh <ansriv2005@gmail.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: Aniruddh Srivastava <aniruddh@purdue.edu>
Signed-off-by: Aniruddh <63553175+Noir01@users.noreply.github.com>
Signed-off-by: rdani <rachana_sudhindradani@intuit.com>
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Noir <63553175+Noir01@users.noreply.github.com>
Signed-off-by: Aniruddh Srivastava <ansriv2005@gmail.com>
Signed-off-by: Aniruddh <aniruddh@purdue.edu>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: zhichao-aws <zhichaog@amazon.com>
Co-authored-by: danielkyalo599 <johbiento@gmail.com>
Co-authored-by: Hailong Cui <ihailong@amazon.com>
Co-authored-by: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com>
Co-authored-by: Yuye Zhu <yuyezhu@amazon.com>
Co-authored-by: gaobinlong <gbinlong@amazon.com>
Co-authored-by: Rachana Dani <36135368+rachana-dani@users.noreply.github.com>
Co-authored-by: rdani <rachana_sudhindradani@intuit.com>
Co-authored-by: Peter Zhu <zhujiaxi@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add webhook format check for Slack
9 participants