-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into PORT-12483-add-support-for-consumer-groups-t…
…o-ports-kafka-integration
- Loading branch information
Showing
14 changed files
with
238 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: Weekly Kapa Usage Report | ||
|
||
on: | ||
# schedule: | ||
# # Runs at 9:00 AM UTC every Monday | ||
# - cron: '0 9 * * 1' | ||
workflow_dispatch: # Allows manual triggering | ||
|
||
jobs: | ||
generate-and-send-report: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get Current Date | ||
id: date | ||
run: | | ||
echo "start_date=$(date -d '7 days ago' -u +%Y-%m-%dT00:00:00Z)" >> $GITHUB_ENV | ||
echo "end_date=$(date -u +%Y-%m-%dT23:59:59Z)" >> $GITHUB_ENV | ||
- name: Fetch Kapa Analytics | ||
id: fetch-analytics | ||
run: | | ||
response=$(curl -s -X GET \ | ||
"https://api.kapa.ai/query/v1/projects/e64464bc-19b5-4cd2-9779-2930e2ca0b81/analytics/activity/?start_date_time=${{ env.start_date }}&end_date_time=${{ env.end_date }}&aggregation_period=DAY" \ | ||
-H "X-API-KEY: ${{ secrets.KAPA_API_KEY }}") | ||
# Save response to a file for processing | ||
echo "$response" > kapa_response.json | ||
# Extract key metrics and format the message | ||
stats=$(jq -r '.aggregate_statistics' kapa_response.json) | ||
# Create a formatted message | ||
message="📊 *Weekly Kapa.ai Usage Report*\n" | ||
message+="Period: $(date -d '${{ env.start_date }}' '+%B %d') - $(date -d '${{ env.end_date }}' '+%B %d, %Y')\n\n" | ||
message+="*Key Metrics:*\n" | ||
message+="• Total Questions: $(echo $stats | jq -r '.total_questions')\n" | ||
message+="• Unique Users: $(echo $stats | jq -r '.total_unique_users')\n" | ||
message+="• Support Tickets Deflected: $(echo $stats | jq -r '.total_support_tickets_deflected')\n\n" | ||
message+="*Quality Metrics:*\n" | ||
message+="• Upvotes: $(echo $stats | jq -r '.total_upvotes')\n" | ||
message+="• Downvotes: $(echo $stats | jq -r '.total_downvotes')\n" | ||
message+="• Uncertain Responses: $(echo $stats | jq -r '.total_questions_uncertain')\n" | ||
# Calculate success rate | ||
total_votes=$(echo "$stats" | jq -r '.total_upvotes + .total_downvotes') | ||
if [ "$total_votes" -gt 0 ]; then | ||
success_rate=$(echo "scale=1; $(echo $stats | jq -r '.total_upvotes') * 100 / $total_votes" | bc) | ||
message+="\n*Success Rate:* ${success_rate}%\n" | ||
fi | ||
# Add integration breakdown | ||
message+="\n*Questions by Integration:*\n" | ||
# Process time_series data to get total counts per integration | ||
integration_counts=$(jq -r ' | ||
.time_series | | ||
map(.count_by_integration[]) | | ||
group_by(.integration_type) | | ||
map({ | ||
type: .[0].integration_type, | ||
description: .[0].description, | ||
total: map(.count) | add | ||
}) | | ||
sort_by(.total) | | ||
reverse[]' kapa_response.json) | ||
# Add each integration's stats to the message | ||
echo "$integration_counts" | while IFS= read -r integration; do | ||
type=$(echo "$integration" | jq -r '.type') | ||
desc=$(echo "$integration" | jq -r '.description') | ||
count=$(echo "$integration" | jq -r '.total') | ||
if [ "$count" -gt 0 ]; then | ||
message+="• ${desc:-$type}: $count\n" | ||
fi | ||
done | ||
echo "message<<EOF" >> $GITHUB_ENV | ||
echo "$message" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
- name: Send to Slack | ||
uses: act10ns/slack@v2 | ||
with: | ||
status: ${{ job.status }} | ||
message: ${{ env.message }} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
id: security | ||
title: "Security" | ||
description: "" | ||
sidebar_label: Security | ||
sidebar_position: 2 | ||
hide_title: true | ||
--- | ||
|
||
import EnterpriseNote from "/docs/generalTemplates/_enterprise_feature_notice.md"; | ||
|
||
# Security | ||
|
||
This page includes security information about Port API and the interactions of your infrastructure with it. | ||
|
||
## Address Allowlisting | ||
|
||
Port's REST API is served through a network of Application Load Balancers (ALBs) and as such is not served from a closed list of IP addresses. | ||
|
||
For cases where your internal network has strict limitations on the addresses that outbound requests can be made to, you will need to add the following addresses to your network's allowlist: | ||
|
||
- For Port's EU tenant: | ||
- [https://api.getport.io](https://api.getport.io) | ||
- [https://ingest.getport.io](https://ingest.getport.io) | ||
- For Port's US tenant: | ||
- [https://api.us.getport.io](https://api.us.getport.io) | ||
- [https://ingest.us.getport.io](https://ingest.us.getport.io) | ||
|
||
## AWS PrivateLink | ||
|
||
<EnterpriseNote /> | ||
|
||
Port supports AWS PrivateLink to provide secure connectivity between your AWS [VPC](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html) and Port's API. | ||
|
||
AWS [PrivateLink](https://aws.amazon.com/privatelink/) is an AWS service that provides private connectivity between resources in different AWS VPCs. | ||
|
||
With AWS PrivateLink you can make requests to Port's API from your AWS VPC, while ensuring that the traffic remains within the AWS data center, and without exposing your data to the internet. | ||
|
||
### Setup | ||
|
||
To setup an AWS PrivateLink between your VPC and Port, you can follow [this AWS guide](https://docs.aws.amazon.com/vpc/latest/privatelink/create-endpoint-service.html#connect-to-endpoint-service). | ||
|
||
In step 5 of the guide, you are required to provide the **Service name**, which is the address of the PrivateLink address provided by Port, here are the Port API PrivateLink service names: | ||
|
||
| Service | Public Address | PrivateLink Region | PrivateLink Service Name | | ||
| ------------- | ------------------------------------------------------------ | ------------------ | --------------------------------------------------------- | | ||
| Port API EU | [https://api.getport.io](https://api.getport.io) | `eu-west-1` | `com.amazonaws.vpce.eu-west-1.vpce-svc-02addcefd47049d3f` | | ||
| Ingest API EU | [https://ingest.getport.io](https://ingest.getport.io) | `eu-west-1` | `com.amazonaws.vpce.eu-west-1.vpce-svc-01c8de843e5776402` | | ||
| Port API US | [https://api.us.getport.io](https://api.us.getport.io) | `us-east-1` | `com.amazonaws.vpce.us-east-1.vpce-svc-047de27e65a0392a7` | | ||
| Ingest API US | [https://ingest.us.getport.io](https://ingest.us.getport.io) | `us-east-1` | `com.amazonaws.vpce.us-east-1.vpce-svc-052d7ea18ebda9652` | | ||
|
||
**Note:** In case your AWS resources are in a different region than the ones Port's PrivateLinks are hosted at, refer to step 6 of the guide to setup a cross region connection. | ||
|
||
After following the guide, please contact Port's support team using Intercom/Slack/mail to [[email protected]](mailto:[email protected]) and we will finalize the setup. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
| `OCEAN__INTEGRATION__CONFIG__JIRA_HOST` | The URL of your Jira | https://example.atlassian.net | ✅ | | ||
| `OCEAN__INTEGRATION__CONFIG__ATLASSIAN_USER_EMAIL` | The email of the user used to query Jira | [email protected] | ✅ | | ||
| `OCEAN__INTEGRATION__CONFIG__ATLASSIAN_USER_TOKEN` | [Jira API token](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/) generated by the user | | ✅ | | ||
| `OCEAN__INTEGRATION__CONFIG__ATLASSIAN_ORGANIZATION_ID` | Your Atlassian Organization ID is required to sync teams and team members. [Follow the Atlassian documentation](https://confluence.atlassian.com/jirakb/what-it-is-the-organization-id-and-where-to-find-it-1207189876.html) on how to find your Organization ID | | ❌ | | ||
| `OCEAN__PORT__CLIENT_ID` | Your Port client ([How to get the credentials](https://docs.port.io/build-your-software-catalog/custom-integration/api/#find-your-port-credentials)) id | | ✅ | | ||
| `OCEAN__PORT__CLIENT_SECRET` | Your Port client ([How to get the credentials](https://docs.port.io/build-your-software-catalog/custom-integration/api/#find-your-port-credentials)) secret | | ✅ | | ||
| `OCEAN__PORT__BASE_URL` | Your Port API URL - `https://api.getport.io` for EU, `https://api.us.getport.io` for US | | ✅ | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,6 +183,7 @@ This table summarizes the available parameters for the installation. | |
| `port.baseUrl` | Your Port API URL - `https://api.getport.io` for EU, `https://api.us.getport.io` for US | | ✅ | | ||
| `integration.secrets.atlassianUserEmail` | The email of the user used to query Jira | [email protected] | ✅ | | ||
| `integration.secrets.atlassianUserToken` | [Jira API token](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/) generated by the user | | ✅ | | ||
| `integration.config.atlassianOrganizationId` | Your Atlassian Organization ID is required to sync teams and team members. [Follow the Atlassian documentation](https://confluence.atlassian.com/jirakb/what-it-is-the-organization-id-and-where-to-find-it-1207189876.html) on how to find your Organization ID | | ❌ | | ||
| `integration.config.jiraHost` | The URL of your Jira | https://example.atlassian.net | ✅ | | ||
| `integration.config.appHost` | The host of the Port Ocean app. Used to set up the integration endpoint as the target for webhooks created in Jira | https://my-ocean-integration.com | ✅ | | ||
| `integration.eventListener.type` | The event listener type. Read more about [event listeners](https://ocean.getport.io/framework/features/event-listener) | | ✅ | | ||
|
@@ -217,6 +218,7 @@ Make sure to configure the following [Github Secrets](https://docs.github.com/en | |
| `config -> jira_host` | The URL of your Jira | https://example.atlassian.net | ✅ | | ||
| `config -> atlassian_user_email` | The email of the user used to query Jira | [email protected] | ✅ | | ||
| `config -> atlassian_user_token` | [Jira API token](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/) generated by the user | | ✅ | | ||
| `config -> atlassian_organization_id` |Your Atlassian Organization ID is required to sync teams and team members. [Follow the Atlassian documentation](https://confluence.atlassian.com/jirakb/what-it-is-the-organization-id-and-where-to-find-it-1207189876.html) on how to find your Organization ID | | ❌ | | ||
| `initialize_port_resources` | Default true, When set to true the integration will create default blueprints and the port App config Mapping. Read more about [initializePortResources](https://ocean.getport.io/develop-an-integration/integration-configuration/#initializeportresources---initialize-port-resources) | | ❌ | | ||
| `send_raw_data_examples` | Enable sending raw data examples from the third party API to port for testing and managing the integration mapping. Default is true | | ❌ | | ||
| `identifier` | The identifier of the integration that will be installed | | ❌ | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
:::info Enterprise Feature | ||
This feature is part of Port's Enterprise plan. | ||
|
||
If you're interested in accessing this feature, please contact Port's sales team. | ||
::: |
Oops, something went wrong.