- Changed component to require a bearer token in the Authorization header in all incoming requests
- Validate the bearer token as a JWT signed by Azure AD
- Updated the infra setup script to configure the Azure AD app correctly
- Event Grid binding now accepts any path (which can also include a random token) and not just `/api/events`
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Updated to Go 1.18
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* Updated Azure SDKs that are on track2
Includes some minor refactoring of auth code
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* Updated Service Bus components to track2 SDK
Co-authored-by: halspang <halspang@microsoft.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* Initial Certification test for eventhubs binding [incomplete] (#1670)
* certification test for eventhubs binding
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
* modified go.mod and go.sum
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
* Add connection string testing
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
* iothub testing
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
* address feedback and run test
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
* Install Azure CLI IOT hub extension
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* make modtidy-all
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* covering all eventhubs test cases
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
* dependency changes after go modtidy-all
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* Use revive instead of golint (#1685)
Signed-off-by: pigletfly <wangbing.adam@gmail.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* Updated to Go 1.18 (#1697)
* Updated to Go 1.18
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
* Added go.work file
With Go 1.18, this allows gopls (the Go language server used for example in VS Code) to work inside test apps too.
See: https://go.dev/doc/tutorial/workspaces
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Removed go.work
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* 💄 & 🧹
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* Add metadata property to configure Batching in Pulsar (#1707)
* Add metadata property to configure BatchingMaxSize&batchingMaxMessages in Pulsar
Signed-off-by: saberwang <saberwang@hotmail.com>
* sort field
Signed-off-by: saberwang <saberwang@hotmail.com>
* [pubsub]fix unit test bug
Signed-off-by: saberwang <saberwang@hotmail.com>
* remove unrelated changes
Signed-off-by: saberwang <saberwang@hotmail.com>
* Delete hard coded Metadata
Signed-off-by: saberwang <saberwang@hotmail.com>
* remove .history
Signed-off-by: saberwang <saberwang@hotmail.com>
* restore .gitignore
Signed-off-by: saberwang <saberwang@hotmail.com>
* Hard coding default values and adding 'BatchingMaxPublishDelay' metadata
Signed-off-by: saberwang <saberwang@hotmail.com>
* fix code format
Signed-off-by: saberwang <saberwang@hotmail.com>
* formatting code
Signed-off-by: saberwang <saberwang@hotmail.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* This test can't work with track2 SDKs
The methods to create a message with a body are not exported
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* 🧹
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* There's such thing as too much logging
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Refactored subscription.go
This greatly simplifies certain parts of the code, reducing the number of goroutines and likely improving performance.
Performance for end-users improves too as there's no need anymore to pause for 2 seconds every time that we reach `maxActiveMessages`.
Additionally, with this change the config options `prefetchCount` and `maxActiveMessagesRecoveryInSec` are removed as unnecessary anymore.
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Fixed pubsub tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* These packages should have never been upgraded
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Ensuring we don't fetch 1 message more than max active
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Adding configurable timeout for servicebusqueues operations
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Persistent connection for invoking SB queues
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Reverted Event Hub SDK update
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Revert "Reverted Event Hub SDK update"
This reverts commit 212220aba0.
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Fix Azure deploy for users with a first.last email
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Added some sleep that should help reduce flakiness in eventhubs binding cert test
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Changed servicebusqueue cert test
In case of a failure in the handler (ie. users' code), the message should be correctly re-enqueued, which means that messages will be re-delivered later and won't be in order.
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: halspang <halspang@microsoft.com>
Co-authored-by: tanvigour <60332928+tanvigour@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Wang Bing <wangbing.adam@gmail.com>
Co-authored-by: saber-wang <45062099+saber-wang@users.noreply.github.com>
* First iteration for the eventhubs certifications tests
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* Fixing typos, adding more description and publishing with multiple partitions
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* Moved the secret reference in components definition to secretstore.local.env
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* moving to latest dapr/dapr github.com/dapr/dapr@v1.7.0-rc.2
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* updating go.mod
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* changes in infra and workflow for cert eventhubs
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* typo fix in local secret store type
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* correcting the typo in policyName
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* bug fixes
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* publish to a topic with no subscriber fix
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* delete azure eventhub that got created as part of test run
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* updated readme
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* removed dummy sidecar and leveraged connectionstring at namespace level for multi topic operations
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* go mod changes and nit fixes
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* fixing iot device issue
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* NIT : CR fixes
* Enabled iothub test and a bit of code refactoring
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* delete the checkpoint container for the temp eventhub
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* Revert "NIT : CR fixes"
This reverts commit 260f5ed686.
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* First iteration for the eventhubs certifications tests
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* Fixing typos, adding more description and publishing with multiple partitions
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* Moved the secret reference in components definition to secretstore.local.env
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* moving to latest dapr/dapr github.com/dapr/dapr@v1.7.0-rc.2
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* updating go.mod
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* changes in infra and workflow for cert eventhubs
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* typo fix in local secret store type
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* correcting the typo in policyName
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* bug fixes
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* publish to a topic with no subscriber fix
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* delete azure eventhub that got created as part of test run
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* updated readme
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* removed dummy sidecar and leveraged connectionstring at namespace level for multi topic operations
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* go mod changes and nit fixes
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* fixing iot device issue
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* NIT : CR fixes
* Enabled iothub test and a bit of code refactoring
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* delete the checkpoint container for the temp eventhub
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* Revert "NIT : CR fixes"
This reverts commit 260f5ed686.
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
* Fix eventhub pubsub certification test infra provisioning
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Fixing the scoping issue for role assignment on eh
Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Fix test infrastructure setup script
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* use more unique ACR resource name
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
* Add script to update Azure SQL firewall rules from GitHub meta API
* Update state.azure.sql test to use unique DB names
- Add use of `databaseName` metadata to state.azure.sql test.
- Add dynamic generation of test `databaseName` to conformance.yml to
avoid multiple test instances from racing.
- Add wait before clean-up of Azure SQL DB instance in conformance.yml
to prevent test flakiness and accumulation of undeleted DBs.
- Remove dynamic Azure SQL firewall rule injection from conformance.yml.
- The workflow relies on IPs used by GitHub Actions to be provisioned
in the firewall rules already.
- Update documentation for managing Azure SQL and testing instructions.
Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
- Add removal of AKV_SPAUTH_SP to generated teardown script.
- Fix extraction of `clientId` and `clientSecret` from provided
credentials without line breaks.
* Fix parameters flag typo in setup-azure-conf-test.sh
* Update Event Hubs conformance tests
- Separate containers and consumer groups used for EventHub pubsub and
bindings conformance tests.
- Update setup-azure-conf-test.sh to reflect new naming targets.
* Add conformance test for EventHubs bindings
* Update EventHubs pubsub to pass conformance tests
- Add conformance tests for Azure EventHubs PubSub component
- Add retry & backoff handling on subscriber handling error to EventHubs
PubSub component for conformance tests.
- Add cancellation context to Azure EventHubs and update Close() to
invoke cancel prior to closing the hub, which cleans up both senders
and receivers.
* Add automation for deploying Azure conformance test resources
- Add .bicep definitions for Azure deployment of conformance test resources.
- Add setup-azure-conf-test.sh script for deploying .bicep definition and
configuring other assets needed for the Azure conformance tests:
- Creates the appropriate service principals and their credentials
for the test.
- Populates the key vault with the test parameters and secrets used by
the GitHub conformance.yml test workflow.
- Generates a .rc file that can be invoked with `source` to configure
the local environment variables and secrets for running conformance
tests described in tests/conformance/README.md.
- Generates a teardown script that can be used to dispose of the
deployed Azure resources when done.
* Move setup-azure-conf-test under azure/ subfolder
* Add documentation for Azure conformance test automation
- Add README.md to .github/infrastructure/conformance/azure describing
use of automation script.
- Update tests/conformance/README.md with reference to Azure
conformance test infrastructure automation.
- Fix spelling and issues in tests/conformance/README.md reported by
markdownlint.