### Output from local-cert-standalone.sh Source: https://github.com/worklytics/psoxy/blob/main/infra/modules/azuread-local-cert/README.md Example output from running the local-cert-standalone.sh script. It instructs the user to open the generated markdown file and follow the instructions to complete the setup. ```shell Open TODO_OUTLOOK-CAL_CERTS.md and follow the instructions to complete the setup. ``` -------------------------------- ### Example commands for Psoxy Test Calls Source: https://github.com/worklytics/psoxy/blob/main/docs/guides/testing.md Example commands for the primary testing tool, showing GCP and AWS deployment examples. The GCP example uses an identity token, while the AWS example uses an IAM role ARN. ```shell # GCP deployment example: node cli-call.js -u https://us-central1-acme.cloudfunctions.net/calendar/v3/calendars/primary -t -i user@acme.com # AWS deployment example: node cli-call.js -u https://acme.lambda-url.us-east-1.on.aws/v2/users -r arn:aws:iam::310635719553:role/PsoxyApiCaller ``` -------------------------------- ### Run Gong OAuth setup script Source: https://github.com/worklytics/psoxy/blob/main/docs/sources/gong/gong-metrics/README.md Run the guided script to automate the OAuth setup process for the Gong Metrics connector. The script creates an OAuth app in Gong, configures the required scopes (api:stats:user-actions, api:users:read), obtains access and refresh tokens, and provides the values to store in your secret manager. ```bash ./tools/gong-auth.sh ``` -------------------------------- ### Apply dev examples for AWS and GCP Source: https://github.com/worklytics/psoxy/blob/main/tools/release/release-qa.md Applies the dev examples for AWS and GCP. Review plan logs for unexpected destroys or replacements before running tests. ```shell ./tools/release/qa/apply-example.sh aws vX.Y.Z true ./tools/release/qa/apply-example.sh gcp vX.Y.Z true ``` -------------------------------- ### Install the test tool Source: https://github.com/worklytics/psoxy/blob/main/docs/guides/testing.md Install the Psoxy test tool from within the cloned repository. ```shell ./tools/install-test-tool.sh ``` -------------------------------- ### Set msft_365_connector_settings in terraform.tfvars Source: https://github.com/worklytics/psoxy/blob/main/docs/sources/microsoft-365/README.md Provide real values for example API call placeholders in Terraform-generated setup instructions. Set the example_msft_user_guid key to a real user GUID to generate directly-runnable example calls. ```hcl msft_365_connector_settings = { example_msft_user_guid = "48d31887-5fad-4d73-a9f5-3c356e68a038" } ``` -------------------------------- ### Install AWS CLI Source: https://github.com/worklytics/psoxy/blob/main/docs/prereqs-ubuntu.md Installs the AWS CLI on Ubuntu for deploying to AWS. ```shell sudo apt install awscli ``` -------------------------------- ### Install Java and Maven Source: https://github.com/worklytics/psoxy/blob/main/docs/prereqs-ubuntu.md Installs Java 21 JDK and Maven, then checks the Maven version. Java and Maven are optional as of v0.5.x if using a pre-built JAR. ```shell sudo apt install openjdk-21-jdk sudo apt install maven # check that maven version at least 3.6+ and java 17+ (testing with 21 or later is recommended) mvn -v # if not, get latest direct from Apache Maven # https://maven.apache.org/install.html ``` -------------------------------- ### Install Google Cloud CLI for Google Workspace data sources Source: https://github.com/worklytics/psoxy/blob/main/docs/aws/cloud-shell.md Downloads and installs the Google Cloud SDK (version 435.0.1) on Linux. This is required only if using Google Workspace as a data source. After installation, you must add the SDK path to your ~/.bashrc. ```shell curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-435.0.1-linux-x86_64.tar.gz tar -xvf google-cloud-cli-435.0.1-linux-x86_64.tar.gz sudo ./google-cloud-sdk/install.sh rm google-cloud-cli-435.0.1-linux-x86_64.tar.gz ``` -------------------------------- ### Install Terraform using tfenv Source: https://github.com/worklytics/psoxy/blob/main/docs/aws/cloud-shell.md Installs Terraform via tfenv, a version manager. The commands clone tfenv, create a bin directory, symlink the binaries, and then install and use the latest Terraform version. ```shell git clone https://github.com/tfutils/tfenv.git ~/.tfenv mkdir ~/bin ln -s ~/.tfenv/bin/* ~/bin/ tfenv install tfenv use latest ``` -------------------------------- ### Install and authenticate Google Cloud CLI Source: https://github.com/worklytics/psoxy/blob/main/docs/prereqs-ubuntu.md Downloads and installs the Google Cloud CLI, then sources .bashrc and authenticates with application-default login. Required for GCP deployments or Google Workspace data sources. ```shell curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-384.0.0-linux-x86_64.tar.gz tar -xvf google-cloud-cli-384.0.0-linux-x86_64.tar.gz sudo ./google-cloud-sdk/install.sh # if prompted for location of your .bashrc by the gcloud install script, on EC2 it's '/home/ubuntu/.bashrc' rm google-cloud-cli-384.0.0-linux-x86_64.tar.gz ``` ```shell # source your .bashrc OR restart your terminal so gcloud is found on your $PATH source ~/.bashrc # authenticate with Google Cloud CLI gcloud auth application-default login --no-launch-browser ``` -------------------------------- ### Prepare release candidate with prep.sh Source: https://github.com/worklytics/psoxy/blob/main/docs/development/releases.md Run from main to prepare a release candidate. Follow the steps output by the tool. ```shell ./tools/release/prep.sh v0.4.15 rc-v0.4.16 ``` -------------------------------- ### Run psoxy locally with Maven Source: https://github.com/worklytics/psoxy/blob/main/docs/gcp/development.md Starts the psoxy function locally on http://localhost:8080 using Maven. Requires Java and Maven installed. ```shell cd java/impl/gcp mvn function:run -Drun.functionTarget=co.worklytics.psoxy.Route ``` -------------------------------- ### Configure real example IDs in Terraform for Microsoft OneDrive connector Source: https://github.com/worklytics/psoxy/blob/main/docs/sources/microsoft-365/msft-onedrive/README.md Set these keys in the msft_365_connector_settings Terraform variable to have real, directly-runnable example calls generated by Terraform instead of placeholders. The values are a group GUID, a Drive.id, and a driveItem.id from the drive's root/delta feed. ```hcl msft_365_connector_settings = { example_msft_group_guid = "fbe2bf47-16c8-47cf-b4a5-4b9b187c508b" msft_onedrive_example_drive_id = "b!-RIj2DuyvEyV1T4NlOaMHk8XkS_I8MdFlUCq1BlcjgmhRfAj3-Z8RY2VpuvV_tpd" msft_onedrive_example_item_id = "01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K" } ``` -------------------------------- ### Step-by-step Maven build commands Source: https://github.com/worklytics/psoxy/blob/main/docs/troubleshooting.md Run these commands from the root of your checkout to build the Java gateway-core, core, and AWS implementation modules step-by-step. ```bash # from the root of your checkout of the repository cd java/gateway-core mvn package install cd ../core mvn package install cd ../impl/aws mvn package ``` -------------------------------- ### AWS: Apply and run test-all.sh Source: https://github.com/worklytics/psoxy/blob/main/tools/release/test_plan.md Run these commands from the infra/examples-dev/aws directory to apply the infrastructure and execute the test script. After running, confirm each listed connector and collector works. ```shell cd infra/examples-dev/aws ./apply ./test-all.sh ``` -------------------------------- ### Run available-connectors script to verify connector availability Source: https://github.com/worklytics/psoxy/blob/main/docs/sources/README.md Use to check which connectors are available in the Terraform modules. The first command works only in examples that already include the script; the second command creates the script from the installed module when it is missing. ```shell ./available-connectors ``` ```shell cp .terraform/modules/psoxy/tools/available-connectors.sh available-connectors chmod +x available-connectors ``` -------------------------------- ### GCP: Apply and run test-all.sh Source: https://github.com/worklytics/psoxy/blob/main/tools/release/test_plan.md Run these commands from the infra/examples-dev/gcp directory to apply the infrastructure and execute the test script. After running, confirm each listed connector and collector works. ```shell cd infra/examples-dev/gcp ./apply ./test-all.sh ``` -------------------------------- ### Run prerequisite check script Source: https://github.com/worklytics/psoxy/blob/main/docs/troubleshooting.md Run this script to check for prerequisites before running ./init. It provides feedback and suggestions on missing prerequisites. ```shell ./check-prereqs ``` -------------------------------- ### Token response example Source: https://github.com/worklytics/psoxy/blob/main/docs/sources/atlassian/jira/README.md Example JSON response from the token endpoint. Contains access_token, refresh_token, and scope. ```json { "access_token": "some short live access token", "expires_in": 3600, "token_type": "Bearer", "refresh_token": "some long live token we are going to use", "scope": "read:jira-work offline_access read:jira-user" } ``` -------------------------------- ### Find OneDrive example values (GCP and AWS) Source: https://github.com/worklytics/psoxy/blob/main/docs/guides/psoxy-test-tool.md Run find-msft-onedrive-example-values.js with the msft-onedrive function base URL and flags matching your cli-call.js/test-msft-onedrive.sh usage. Use --source users or --source groups to limit the search, and --max-owners or --page-size to control the scan. ```shell # GCP (including external ALB) node find-msft-onedrive-example-values.js -u https://us-central1-acme.cloudfunctions.net/psoxy-msft-onedrive -f gcp --allow-insecure-tls ``` ```shell # AWS node find-msft-onedrive-example-values.js -u https://acme.lambda-url.us-east-1.on.aws -r ``` -------------------------------- ### Install dependencies with npm i Source: https://github.com/worklytics/psoxy/blob/main/tools/schema-tool/README.md Install the project dependencies before using the CLI. Requires Node.js version >=18 and npm. ```shell npm i ``` -------------------------------- ### Install Trivy with Homebrew Source: https://github.com/worklytics/psoxy/blob/main/docs/development/security-scanning.md Installs Trivy via Homebrew on macOS. Required before running the Trivy configuration scan. ```shell brew install trivy ``` -------------------------------- ### Clone the psoxy-example-aws repository Source: https://github.com/worklytics/psoxy/blob/main/docs/aws/cloud-shell.md Clones the example AWS repository for psoxy into the current directory. This is the first step in setting up the proxy deployment. ```shell git clone https://github.com/Worklytics/psoxy-example-aws.git ``` -------------------------------- ### Prepare Google Workspace API client import Source: https://github.com/worklytics/psoxy/blob/main/docs/guides/deployment-migration.md Find Google Workspace API client resource IDs, show the state to obtain the unique_id, and prepare the import command for the new configuration. ```bash tf state list | grep 'google_service_account.connector-sa' ``` ```bash terraform state show 'module.worklytics_connectors_google_workspace.module.google_workspace_connection["gdirectory"].google_service_account.connector-sa' ``` ```bash terraform import 'module.worklytics_connectors_google_workspace.module.google_workspace_connection["gdirectory"].google_service_account.connector-sa' '' ``` -------------------------------- ### Install tfsec with Homebrew Source: https://github.com/worklytics/psoxy/blob/main/docs/development/security-scanning.md Installs tfsec via Homebrew on macOS. This is older tooling that has been migrated to Trivy, but is still well-known. ```shell brew install tfsec ``` -------------------------------- ### terraform.tfvars example Source: https://github.com/worklytics/psoxy/blob/main/infra/modules/gcp-proxy-bulk/README.md Example terraform.tfvars with actual values. The source_kind must match a configuration file (e.g., hris.yaml) provided in the platform. ```terraform billing_account_id = "0A2AE4-1D396E-1219D9" folder_id = "33576234038" project_id = "psoxy-dev-alice" worklytics_sa_emails = [ "worklytics-3cD92f@worklytics-eu.iam.gserviceaccount.com" ] bucket_prefix = "alice-psoxy-dev" source_kind = "hris" ``` -------------------------------- ### View help for cli-call.js Source: https://github.com/worklytics/psoxy/blob/main/docs/guides/psoxy-test-tool.md Displays help for the primary CLI tool, showing available options for Psoxy Test Calls. Run this to see usage for the main testing script. ```shell node cli-call.js -h ```