Commit 09d2afb8 authored by Daniel Scholl's avatar Daniel Scholl
Browse files

Added Developer Tools

parent 8d88879a
......@@ -105,7 +105,7 @@ __Kubernetes API Access__
> Optional
It can often be helpful to be able to retrieve the cluster context and execute queries directly against the Kubernetes API.
It can often be helpful to be able to retrieve the cluster context and execute queries directly against the Kubernetes API.
```bash
BASE_NAME=$(az group list --query "[?contains(name, '${UNIQUE}sr')].name" -otsv |grep -v MC | rev | cut -c 3- | rev)
......
# ------------------------------------------------------------------------------------------------------
# Common Settings
# ------------------------------------------------------------------------------------------------------
export OSDU_TENANT="opendes"
export OSDU_TENANT2="common"
export OSDU_TENANT3="othertenant2"
export COMPANY_DOMAIN="contoso.com"
export COSMOS_DB_NAME="osdu-db"
export LEGAL_SERVICE_BUS_TOPIC="legaltags"
export RECORD_SERVICE_BUS_TOPIC="recordstopic"
export LEGAL_STORAGE_CONTAINER="legal-service-azure-configuration"
export TENANT_ID="" # <-- Retrieve from Portal
export INVALID_JWT="" # <-- Created
export NO_ACCESS_ID="" # <-- Retrieve from Common KeyVault
export NO_ACCESS_SECRET="" # <-- Retrieve from Common KeyVault
export OTHER_APP_ID=""
export OTHER_APP_OID=""
## These values have to be setup in the Azure Tenant for testing MS Graph Items
export AD_USER_EMAIL="" # integration.test@<your_tenant>.onmicrosoft.com
export AD_USER_OID=""
export AD_GUEST_EMAIL="" # integration.test@email.com
export AD_GUEST_OID=""
# ------------------------------------------------------------------------------------------------------
# Environment Settings
# ------------------------------------------------------------------------------------------------------
export ENV_SUBSCRIPTION_NAME="" # <-- Retrieve from Portal
export ENV_APP_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_SECRET="" # <-- Retrieve from Env KeyVault
export ENV_APPINSIGHTS_KEY="" # <-- Retrieve from Env KeyVault
export ENV_REGISTRY="" # <-- Retrieve from Portal
export ENV_STORAGE="" # <-- Retrieve from Portal
export ENV_STORAGE_KEY="" # <-- Retrieve from Portal
export ENV_STORAGE_CONNECTION="" # <-- Retrieve from Portal
export ENV_COSMOSDB_HOST=""
export ENV_COSMOSDB_KEY="" # <-- Retrieve from Portal
export ENV_SERVICEBUS_NAMESPACE=""
export ENV_SERVICEBUS_CONNECTION="" # <-- Retrieve from Portal
export ENV_KEYVAULT=""
export ENV_HOST=""
export ENV_REGION="centralus"
export ENV_ELASTIC_HOST="" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_PORT="9243" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_USERNAME="" # <-- Retrieve from Env KeyVault
export ENV_ELASTIC_PASSWORD="" # <-- Retrieve from Env KeyVault
# ------------------------------------------------------------------------------------------------------
# Common Settings
# ------------------------------------------------------------------------------------------------------
export OSDU_TENANT="opendes"
export OSDU_TENANT2="common"
export OSDU_TENANT3="othertenant2"
export COMPANY_DOMAIN="contoso.com"
export COSMOS_DB_NAME="osdu-db"
export LEGAL_SERVICE_BUS_TOPIC="legaltags"
export RECORD_SERVICE_BUS_TOPIC="recordstopic"
export LEGAL_STORAGE_CONTAINER="legal-service-azure-configuration"
export TENANT_ID="" # <-- Retrieve from Portal
export INVALID_JWT="" # <-- Created
export NO_ACCESS_ID="" # <-- Retrieve from Common KeyVault
export NO_ACCESS_SECRET="" # <-- Retrieve from Common KeyVault
export OTHER_APP_ID=""
export OTHER_APP_OID=""
## These values have to be setup in the Azure Tenant for testing MS Graph Items
export AD_USER_EMAIL="" # integration.test@<your_tenant>.onmicrosoft.com
export AD_USER_OID=""
export AD_GUEST_EMAIL="" # integration.test@email.com
export AD_GUEST_OID=""
# ------------------------------------------------------------------------------------------------------
# Environment Settings
# ------------------------------------------------------------------------------------------------------
export ENV_SUBSCRIPTION_NAME="" # <-- Retrieve from Portal
export ENV_APP_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_SECRET="" # <-- Retrieve from Env KeyVault
export ENV_APPINSIGHTS_KEY="" # <-- Retrieve from Env KeyVault
export ENV_REGISTRY="" # <-- Retrieve from Portal
export ENV_STORAGE="" # <-- Retrieve from Portal
export ENV_STORAGE_KEY="" # <-- Retrieve from Portal
export ENV_STORAGE_CONNECTION="" # <-- Retrieve from Portal
export ENV_COSMOSDB_HOST=""
export ENV_COSMOSDB_KEY="" # <-- Retrieve from Portal
export ENV_SERVICEBUS_NAMESPACE=""
export ENV_SERVICEBUS_CONNECTION="" # <-- Retrieve from Portal
export ENV_KEYVAULT=""
export ENV_HOST=""
export ENV_REGION="centralus"
export ENV_ELASTIC_HOST="" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_PORT="9243" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_USERNAME="" # <-- Retrieve from Env KeyVault
export ENV_ELASTIC_PASSWORD="" # <-- Retrieve from Env KeyVault
# ------------------------------------------------------------------------------------------------------
# LocalHost Run Settings
# ------------------------------------------------------------------------------------------------------
export AZURE_TENANT_ID="${TENANT_ID}"
export AZURE_CLIENT_ID="${ENV_PRINCIPAL_ID}"
export AZURE_CLIENT_SECRET="${ENV_PRINCIPAL_SECRET}"
export azure_activedirectory_session_stateless="true"
export azure_activedirectory_AppIdUri="api://${ENV_APP_ID}"
export aad_client_id="${ENV_APP_ID}"
export appinsights_key="${ENV_APPINSIGHTS_KEY}"
export KEYVAULT_URI="${ENV_KEYVAULT}"
export cosmosdb_database="${COSMOS_DB_NAME}"
export spring_application_name="entitlements-azure"
export service_domain_name="${COMPANY_DOMAIN}"
export entitlements_app_key="${API_KEY}"
export server_port="8080"
# ------------------------------------------------------------------------------------------------------
# Integration Test Settings
# ------------------------------------------------------------------------------------------------------
export ENTITLEMENT_URL="https://${ENV_HOST}/entitlements/v1/"
export MY_TENANT="${OSDU_TENANT}"
export AZURE_AD_TENANT_ID="${TENANT_ID}"
export INTEGRATION_TESTER="${ENV_PRINCIPAL_ID}"
export ENTITLEMENT_MEMBER_NAME_VALID="${ENV_PRINCIPAL_ID}"
export AZURE_TESTER_SERVICEPRINCIPAL_SECRET="${ENV_PRINCIPAL_SECRET}"
export AZURE_AD_APP_RESOURCE_ID="${ENV_APP_ID}"
export AZURE_AD_OTHER_APP_RESOURCE_ID="${OTHER_APP_ID}"
export AZURE_AD_OTHER_APP_RESOURCE_OID="${OTHER_APP_OID}"
export DOMAIN="${COMPANY_DOMAIN}"
export EXPIRED_TOKEN="${INVALID_JWT}"
export ENTITLEMENT_GROUP_NAME_VALID="integ.test.data.creator"
export ENTITLEMENT_MEMBER_NAME_INVALID="InvalidTestAdmin"
export AZURE_AD_USER_EMAIL="${AD_USER_EMAIL}"
export AZURE_AD_USER_OID="${AD_USER_OID}"
export AZURE_AD_GUEST_EMAIL="${AD_GUEST_EMAIL}"
export AZURE_AD_GUEST_OID="${AD_GUEST_OID}"
# These are optional overrides
#export AZURE_INVALID_EMAIL=""
#export AZURE_INVALID_APP_ID=""
#export AZURE_INVALID_ID=""
# ------------------------------------------------------------------------------------------------------
# Common Settings
# ------------------------------------------------------------------------------------------------------
export OSDU_TENANT="opendes"
export OSDU_TENANT2="common"
export OSDU_TENANT3="othertenant2"
export COMPANY_DOMAIN="contoso.com"
export COSMOS_DB_NAME="osdu-db"
export LEGAL_SERVICE_BUS_TOPIC="legaltags"
export RECORD_SERVICE_BUS_TOPIC="recordstopic"
export LEGAL_STORAGE_CONTAINER="legal-service-azure-configuration"
export TENANT_ID="" # <-- Retrieve from Portal
export INVALID_JWT="" # <-- Created
export NO_ACCESS_ID="" # <-- Retrieve from Common KeyVault
export NO_ACCESS_SECRET="" # <-- Retrieve from Common KeyVault
export OTHER_APP_ID=""
export OTHER_APP_OID=""
## These values have to be setup in the Azure Tenant for testing MS Graph Items
export AD_USER_EMAIL="" # integration.test@<your_tenant>.onmicrosoft.com
export AD_USER_OID=""
export AD_GUEST_EMAIL="" # integration.test@email.com
export AD_GUEST_OID=""
# ------------------------------------------------------------------------------------------------------
# Environment Settings
# ------------------------------------------------------------------------------------------------------
export ENV_SUBSCRIPTION_NAME="" # <-- Retrieve from Portal
export ENV_APP_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_SECRET="" # <-- Retrieve from Env KeyVault
export ENV_APPINSIGHTS_KEY="" # <-- Retrieve from Env KeyVault
export ENV_REGISTRY="" # <-- Retrieve from Portal
export ENV_STORAGE="" # <-- Retrieve from Portal
export ENV_STORAGE_KEY="" # <-- Retrieve from Portal
export ENV_STORAGE_CONNECTION="" # <-- Retrieve from Portal
export ENV_COSMOSDB_HOST=""
export ENV_COSMOSDB_KEY="" # <-- Retrieve from Portal
export ENV_SERVICEBUS_NAMESPACE=""
export ENV_SERVICEBUS_CONNECTION="" # <-- Retrieve from Portal
export ENV_KEYVAULT=""
export ENV_HOST=""
export ENV_REGION="centralus"
export ENV_ELASTIC_HOST="" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_PORT="9243" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_USERNAME="" # <-- Retrieve from Env KeyVault
export ENV_ELASTIC_PASSWORD="" # <-- Retrieve from Env KeyVault
# ------------------------------------------------------------------------------------------------------
# DOCKER COMPOSE SETTINGS
# ------------------------------------------------------------------------------------------------------
export REGISTRY="http://localhost:5000"
# export REGISTRY=${ENV_REGISTRY}
# ------------------------------------------------------------------------------------------------------
# Common Settings
# ------------------------------------------------------------------------------------------------------
export OSDU_TENANT="opendes"
export OSDU_TENANT2="common"
export OSDU_TENANT3="othertenant2"
export COMPANY_DOMAIN="contoso.com"
export COSMOS_DB_NAME="osdu-db"
export LEGAL_SERVICE_BUS_TOPIC="legaltags"
export RECORD_SERVICE_BUS_TOPIC="recordstopic"
export LEGAL_STORAGE_CONTAINER="legal-service-azure-configuration"
export TENANT_ID="" # <-- Retrieve from Portal
export INVALID_JWT="" # <-- Created
export NO_ACCESS_ID="" # <-- Retrieve from Common KeyVault
export NO_ACCESS_SECRET="" # <-- Retrieve from Common KeyVault
export OTHER_APP_ID=""
export OTHER_APP_OID=""
## These values have to be setup in the Azure Tenant for testing MS Graph Items
export AD_USER_EMAIL="" # integration.test@<your_tenant>.onmicrosoft.com
export AD_USER_OID=""
export AD_GUEST_EMAIL="" # integration.test@email.com
export AD_GUEST_OID=""
# ------------------------------------------------------------------------------------------------------
# Environment Settings
# ------------------------------------------------------------------------------------------------------
export ENV_SUBSCRIPTION_NAME="" # <-- Retrieve from Portal
export ENV_APP_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_SECRET="" # <-- Retrieve from Env KeyVault
export ENV_APPINSIGHTS_KEY="" # <-- Retrieve from Env KeyVault
export ENV_REGISTRY="" # <-- Retrieve from Portal
export ENV_STORAGE="" # <-- Retrieve from Portal
export ENV_STORAGE_KEY="" # <-- Retrieve from Portal
export ENV_STORAGE_CONNECTION="" # <-- Retrieve from Portal
export ENV_COSMOSDB_HOST=""
export ENV_COSMOSDB_KEY="" # <-- Retrieve from Portal
export ENV_SERVICEBUS_NAMESPACE=""
export ENV_SERVICEBUS_CONNECTION="" # <-- Retrieve from Portal
export ENV_KEYVAULT=""
export ENV_HOST=""
export ENV_REGION="centralus"
export ENV_ELASTIC_HOST="" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_PORT="9243" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_USERNAME="" # <-- Retrieve from Env KeyVault
export ENV_ELASTIC_PASSWORD="" # <-- Retrieve from Env KeyVault
# ------------------------------------------------------------------------------------------------------
# LocalHost Run Settings
# ------------------------------------------------------------------------------------------------------
export AZURE_TENANT_ID="${TENANT_ID}"
export AZURE_CLIENT_ID="${ENV_PRINCIPAL_ID}"
export AZURE_CLIENT_SECRET="${ENV_PRINCIPAL_SECRET}"
export KEYVAULT_URI="${ENV_KEYVAULT}"
export aad_client_id="${ENV_APP_ID}"
export appinsights_key="${ENV_APPINSIGHTS_KEY}"
export cosmosdb_account="${ENV_COSMOSDB_HOST}"
export cosmosdb_database="${COSMOS_DB_NAME}"
export cosmosdb_key="${ENV_COSMOSDB_KEY}"
export entitlements_service_endpoint="https://${ENV_HOST}/entitlements/v1/"
export entitlements_app_key="${API_KEY}"
export entitlements_service_api_key="${API_KEY}"
export servicebus_namespace_name="${ENV_SERVICEBUS_NAMESPACE}"
export servicebus_connection_string="${ENV_SERVICEBUS_CONNECTION}"
export servicebus_topic_name="${RECORD_SERVICE_BUS_TOPIC}"
export storage_service_url="https://${ENV_HOST}/api/storage/v2/"
export STORAGE_SCHEMA_HOST="https://${ENV_HOST}/api/storage/v2/schemas"
export STORAGE_QUERY_RECORD_HOST="https://${ENV_HOST}/api/storage/v2/records"
export STORAGE_QUERY_RECORD_FOR_CONVERSION_HOST="https://${ENV_HOST}/api/storage/v2/query/records:batch"
export server_port="8083"
# ------------------------------------------------------------------------------------------------------
# Integration Test Settings
# ------------------------------------------------------------------------------------------------------
export AZURE_AD_TENANT_ID="${TENANT_ID}"
export INTEGRATION_TESTER="${ENV_PRINCIPAL_ID}"
export AZURE_TESTER_SERVICEPRINCIPAL_SECRET="${ENV_PRINCIPAL_SECRET}"
export AZURE_AD_APP_RESOURCE_ID="${ENV_APP_ID}"
export aad_client_id="${ENV_APP_ID}"
export STORAGE_HOST="https://${ENV_HOST}/api/storage/v2/"
export ELASTIC_HOST="${ENV_ELASTIC_HOST}"
export ELASTIC_PORT="${ENV_ELASTIC_PORT}"
export ELASTIC_USER_NAME="${ENV_ELASTIC_USERNAME}"
export ELASTIC_PASSWORD="${ENV_ELASTIC_PASSWORD}"
export DEFAULT_DATA_PARTITION_ID_TENANT1="${OSDU_TENANT}"
export DEFAULT_DATA_PARTITION_ID_TENANT2="${OSDU_TENANT2}"
export ENTITLEMENTS_DOMAIN="${COMPANY_DOMAIN}"
export ENVIRONMENT="CLOUD"
export LEGAL_TAG="opendes-public-usa-dataset-7643990"
export OTHER_RELEVANT_DATA_COUNTRIES="US"
# ------------------------------------------------------------------------------------------------------
# Common Settings
# ------------------------------------------------------------------------------------------------------
export OSDU_TENANT="opendes"
export OSDU_TENANT2="common"
export OSDU_TENANT3="othertenant2"
export COMPANY_DOMAIN="contoso.com"
export COSMOS_DB_NAME="osdu-db"
export LEGAL_SERVICE_BUS_TOPIC="legaltags"
export RECORD_SERVICE_BUS_TOPIC="recordstopic"
export LEGAL_STORAGE_CONTAINER="legal-service-azure-configuration"
export TENANT_ID="" # <-- Retrieve from Portal
export INVALID_JWT="" # <-- Created
export NO_ACCESS_ID="" # <-- Retrieve from Common KeyVault
export NO_ACCESS_SECRET="" # <-- Retrieve from Common KeyVault
export OTHER_APP_ID=""
export OTHER_APP_OID=""
## These values have to be setup in the Azure Tenant for testing MS Graph Items
export AD_USER_EMAIL="" # integration.test@<your_tenant>.onmicrosoft.com
export AD_USER_OID=""
export AD_GUEST_EMAIL="" # integration.test@email.com
export AD_GUEST_OID=""
# ------------------------------------------------------------------------------------------------------
# Environment Settings
# ------------------------------------------------------------------------------------------------------
export ENV_SUBSCRIPTION_NAME="" # <-- Retrieve from Portal
export ENV_APP_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_SECRET="" # <-- Retrieve from Env KeyVault
export ENV_APPINSIGHTS_KEY="" # <-- Retrieve from Env KeyVault
export ENV_REGISTRY="" # <-- Retrieve from Portal
export ENV_STORAGE="" # <-- Retrieve from Portal
export ENV_STORAGE_KEY="" # <-- Retrieve from Portal
export ENV_STORAGE_CONNECTION="" # <-- Retrieve from Portal
export ENV_COSMOSDB_HOST=""
export ENV_COSMOSDB_KEY="" # <-- Retrieve from Portal
export ENV_SERVICEBUS_NAMESPACE=""
export ENV_SERVICEBUS_CONNECTION="" # <-- Retrieve from Portal
export ENV_KEYVAULT=""
export ENV_HOST=""
export ENV_REGION="centralus"
export ENV_ELASTIC_HOST="" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_PORT="9243" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_USERNAME="" # <-- Retrieve from Env KeyVault
export ENV_ELASTIC_PASSWORD="" # <-- Retrieve from Env KeyVault
# ------------------------------------------------------------------------------------------------------
# LocalHost Run Settings
# ------------------------------------------------------------------------------------------------------
export AZURE_TENANT_ID="${TENANT_ID}"
export AZURE_CLIENT_ID="${ENV_PRINCIPAL_ID}"
export AZURE_CLIENT_SECRET="${ENV_PRINCIPAL_SECRET}"
export azure_activedirectory_session_stateless="true"
export azure_activedirectory_AppIdUri="api://${ENV_APP_ID}"
export aad_client_id="${ENV_APP_ID}"
export appinsights_key="${ENV_APPINSIGHTS_KEY}"
export KEYVAULT_URI="${ENV_KEYVAULT}"
export cosmosdb_database="${COSMOS_DB_NAME}"
export storage_account="${ENV_STORAGE}"
export azure_storage_container_name="${LEGAL_STORAGE_CONTAINER}"
export azure_storage_enable_https="true"
export servicebus_topic_name="${LEGAL_SERVICE_BUS_TOPIC}"
export servicebus_namespace_name="${ENV_SERVICEBUS_NAMESPACE}"
export entitlements_service_endpoint="${ENV_ENTITLEMENT_HOST}"
export entitlements_service_api_key="${API_KEY}"
export LOG_PREFIX="legal"
export legal_service_region="us"
export server_port="8081"
# ------------------------------------------------------------------------------------------------------
# Integration Test Settings
# ------------------------------------------------------------------------------------------------------
export HOST_URL="https://${ENV_HOST}/api/legal/v1/"
export ENTITLEMENT_URL="https://${ENV_HOST}/entitlements/v1/"
export MY_TENANT="${OSDU_TENANT}"
export AZURE_AD_TENANT_ID="${TENANT_ID}"
export INTEGRATION_TESTER="${ENV_PRINCIPAL_ID}"
export AZURE_TESTER_SERVICEPRINCIPAL_SECRET="${ENV_PRINCIPAL_SECRET}"
export AZURE_AD_APP_RESOURCE_ID="${ENV_APP_ID}"
export AZURE_LEGAL_STORAGE_ACCOUNT="${ENV_STORAGE}"
export AZURE_LEGAL_STORAGE_KEY="${ENV_STORAGE_KEY}"
export AZURE_LEGAL_SERVICEBUS="${ENV_SERVICEBUS_CONNECTION}"
export AZURE_LEGAL_TOPICNAME="${LEGAL_SERVICE_BUS_TOPIC}"
# ------------------------------------------------------------------------------------------------------
# Common Settings
# ------------------------------------------------------------------------------------------------------
export OSDU_TENANT="opendes"
export OSDU_TENANT2="common"
export OSDU_TENANT3="othertenant2"
export COMPANY_DOMAIN="contoso.com"
export COSMOS_DB_NAME="osdu-db"
export LEGAL_SERVICE_BUS_TOPIC="legaltags"
export RECORD_SERVICE_BUS_TOPIC="recordstopic"
export LEGAL_STORAGE_CONTAINER="legal-service-azure-configuration"
export TENANT_ID="" # <-- Retrieve from Portal
export INVALID_JWT="" # <-- Created
export NO_ACCESS_ID="" # <-- Retrieve from Common KeyVault
export NO_ACCESS_SECRET="" # <-- Retrieve from Common KeyVault
export OTHER_APP_ID=""
export OTHER_APP_OID=""
## These values have to be setup in the Azure Tenant for testing MS Graph Items
export AD_USER_EMAIL="" # integration.test@<your_tenant>.onmicrosoft.com
export AD_USER_OID=""
export AD_GUEST_EMAIL="" # integration.test@email.com
export AD_GUEST_OID=""
# ------------------------------------------------------------------------------------------------------
# Environment Settings
# ------------------------------------------------------------------------------------------------------
export ENV_SUBSCRIPTION_NAME="" # <-- Retrieve from Portal
export ENV_APP_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_SECRET="" # <-- Retrieve from Env KeyVault
export ENV_APPINSIGHTS_KEY="" # <-- Retrieve from Env KeyVault
export ENV_REGISTRY="" # <-- Retrieve from Portal
export ENV_STORAGE="" # <-- Retrieve from Portal
export ENV_STORAGE_KEY="" # <-- Retrieve from Portal
export ENV_STORAGE_CONNECTION="" # <-- Retrieve from Portal
export ENV_COSMOSDB_HOST=""
export ENV_COSMOSDB_KEY="" # <-- Retrieve from Portal
export ENV_SERVICEBUS_NAMESPACE=""
export ENV_SERVICEBUS_CONNECTION="" # <-- Retrieve from Portal
export ENV_KEYVAULT=""
export ENV_HOST=""
export ENV_REGION="centralus"
export ENV_ELASTIC_HOST="" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_PORT="9243" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_USERNAME="" # <-- Retrieve from Env KeyVault
export ENV_ELASTIC_PASSWORD="" # <-- Retrieve from Env KeyVault
# ------------------------------------------------------------------------------------------------------
# LocalHost Run Settings
# ------------------------------------------------------------------------------------------------------
export AZURE_TENANT_ID="${TENANT_ID}"
export AZURE_CLIENT_ID="${ENV_PRINCIPAL_ID}"
export AZURE_CLIENT_SECRET="${ENV_PRINCIPAL_SECRET}"
export KEYVAULT_URI="${ENV_KEYVAULT}"
export aad_client_id="${ENV_APP_ID}"
export appinsights_key="${ENV_APPINSIGHTS_KEY}"
export APPLICATIONINSIGHTS_CONNECTION_STRING="InstrumentationKey=${ENV_APPINSIGHTS_KEY}"
export cosmosdb_account="${ENV_COSMOSDB_HOST}"
export cosmosdb_database="${COSMOS_DB_NAME}"
export cosmosdb_key="${ENV_COSMOSDB_KEY}"
export azure_activedirectory_AppIdUri="api://${ENV_APP_ID}"
export entitlements_service_endpoint="https://${ENV_HOST}/entitlements/v1/"
export entitlements_service_api_key="${API_KEY}"
export LOG_PREFIX="search"
export search_service_port="8080"
export ELASTIC_CACHE_EXPIRATION="1"
export MAX_CACHE_VALUE_SIZE="60"
export search_service_spring_logging_level="debug"
export ENVIRONMENT="evt"
export server_port="8084"
# ------------------------------------------------------------------------------------------------------
# Integration Test Settings
# ------------------------------------------------------------------------------------------------------
export SEARCH_HOST="https://${ENV_HOST}/api/search/v2/"
export AZURE_AD_TENANT_ID="${TENANT_ID}"
export INTEGRATION_TESTER="${ENV_PRINCIPAL_ID}"
export AZURE_TESTER_SERVICEPRINCIPAL_SECRET="${ENV_PRINCIPAL_SECRET}"
export AZURE_AD_APP_RESOURCE_ID="${ENV_APP_ID}"
export INDEXER_HOST=
export STORAGE_HOST="https://${ENV_HOST}/api/storage/v2/"
export ELASTIC_HOST="${ENV_ELASTIC_HOST}"
export ELASTIC_PORT="${ENV_ELASTIC_PORT}"
export ELASTIC_USER_NAME="${ENV_ELASTIC_USERNAME}"
export ELASTIC_PASSWORD="${ENV_ELASTIC_PASSWORD}"
export DEFAULT_DATA_PARTITION_ID_TENANT1="${OSDU_TENANT}"
export DEFAULT_DATA_PARTITION_ID_TENANT2="${OSDU_TENANT3}"
export ENTITLEMENTS_DOMAIN="${COMPANY_DOMAIN}"
# ------------------------------------------------------------------------------------------------------
# Common Settings
# ------------------------------------------------------------------------------------------------------
export OSDU_TENANT="opendes"
export OSDU_TENANT2="common"
export OSDU_TENANT3="othertenant2"
export COMPANY_DOMAIN="contoso.com"
export COSMOS_DB_NAME="osdu-db"
export LEGAL_SERVICE_BUS_TOPIC="legaltags"
export RECORD_SERVICE_BUS_TOPIC="recordstopic"
export LEGAL_STORAGE_CONTAINER="legal-service-azure-configuration"
export TENANT_ID="" # <-- Retrieve from Portal
export INVALID_JWT="" # <-- Created
export NO_ACCESS_ID="" # <-- Retrieve from Common KeyVault
export NO_ACCESS_SECRET="" # <-- Retrieve from Common KeyVault
export OTHER_APP_ID=""
export OTHER_APP_OID=""
## These values have to be setup in the Azure Tenant for testing MS Graph Items
export AD_USER_EMAIL="" # integration.test@<your_tenant>.onmicrosoft.com
export AD_USER_OID=""
export AD_GUEST_EMAIL="" # integration.test@email.com
export AD_GUEST_OID=""
# ------------------------------------------------------------------------------------------------------
# Environment Settings
# ------------------------------------------------------------------------------------------------------
export ENV_SUBSCRIPTION_NAME="" # <-- Retrieve from Portal
export ENV_APP_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_ID="" # <-- Retrieve from Env KeyVault
export ENV_PRINCIPAL_SECRET="" # <-- Retrieve from Env KeyVault
export ENV_APPINSIGHTS_KEY="" # <-- Retrieve from Env KeyVault
export ENV_REGISTRY="" # <-- Retrieve from Portal
export ENV_STORAGE="" # <-- Retrieve from Portal
export ENV_STORAGE_KEY="" # <-- Retrieve from Portal
export ENV_STORAGE_CONNECTION="" # <-- Retrieve from Portal
export ENV_COSMOSDB_HOST=""
export ENV_COSMOSDB_KEY="" # <-- Retrieve from Portal
export ENV_SERVICEBUS_NAMESPACE=""
export ENV_SERVICEBUS_CONNECTION="" # <-- Retrieve from Portal
export ENV_KEYVAULT=""
export ENV_HOST=""
export ENV_REGION="centralus"
export ENV_ELASTIC_HOST="" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_PORT="9243" # <-- Retrieve from Env KeyVault (http://{hostname}:9243)
export ENV_ELASTIC_USERNAME="" # <-- Retrieve from Env KeyVault
export ENV_ELASTIC_PASSWORD="" # <-- Retrieve from Env KeyVault
# ------------------------------------------------------------------------------------------------------
# LocalHost Run Settings
# ------------------------------------------------------------------------------------------------------
export AZURE_TENANT_ID="${TENANT_ID}"
export AZURE_CLIENT_ID="${ENV_PRINCIPAL_ID}"
export AZURE_CLIENT_SECRET="${ENV_PRINCIPAL_SECRET}"
export KEYVAULT_URI="${ENV_KEYVAULT}"
export aad_client_id="${ENV_APP_ID}"
export appinsights_key="${ENV_APPINSIGHTS_KEY}"
export cosmosdb_account="${ENV_COSMOSDB_HOST}"
export cosmosdb_database="${COSMOS_DB_NAME}"
export cosmosdb_key="${ENV_COSMOSDB_KEY}"
export entitlements_app_key="${API_KEY}"
export entitlements_service_api_key="${API_KEY}"
export entitlements_service_endpoint="https://${ENV_HOST}/entitlements/v1/"
export legal_service_endpoint="https://${ENV_HOST}/api/legal/v1/"
export legal_service_region="${ENV_REGION}"
export search_service_endpoint="https://${ENV_HOST}/api/search/v2/query"
export servicebus_namespace_name="${ENV_SERVICEBUS_NAMESPACE}"
export servicebus_connection_string="${ENV_SERVICEBUS_CONNECTION}"
export servicebus_topic_name="${RECORD_SERVICE_BUS_TOPIC}"
export storage_account="${ENV_STORAGE}"
export storage_account_key="${ENV_STORAGE_KEY}"
export server_port="8082"
# ------------------------------------------------------------------------------------------------------
# Integration Test Settings
# ------------------------------------------------------------------------------------------------------
export STORAGE_URL="https://${ENV_HOST}/api/storage/v2/"
export LEGAL_URL="https://${ENV_HOST}/api/legal/v1/"
export TENANT_NAME="${OSDU_TENANT}"
export AZURE_AD_TENANT_ID="${TENANT_ID}"
export INTEGRATION_TESTER="${ENV_PRINCIPAL_ID}"
export TESTER_SERVICEPRINCIPAL_SECRET="${ENV_PRINCIPAL_SECRET}"
export AZURE_STORAGE_ACCOUNT="${ENV_STORAGE}"
export AZURE_AD_APP_RESOURCE_ID="${ENV_APP_ID}"
export NO_DATA_ACCESS_TESTER="${NO_ACCESS_ID}"
export NO_DATA_ACCESS_TESTER_SERVICEPRINCIPAL_SECRET="${NO_ACCESS_SECRET}"
export DOMAIN="${COMPANY_DOMAIN}"
export PUBSUB_TOKEN="az"
export DEPLOY_ENV="empty"
# HTTP Rest Scripts
These are HTTP Rest Scripts that can make testing and executing API calls easier. These scripts are compatable with the VS Code Extension [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client).
[Rest Client Settings](https://github.com/Huachao/vscode-restclient#environment-variables) can be set to create environments and saved in [VS Code Settings](https://vscode.readthedocs.io/en/latest/getstarted/settings/).
__Create a Client Secret__
The application created for OSDU by default does not have a Client Secret and one must be manually created.
```bash
# This logs your local Azure CLI in using the configured service principal.
az login --service-principal -u $ARM_CLIENT_ID -p $ARM_CLIENT_SECRET --tenant $ARM_TENANT_ID
GROUP=$(az group list --query "[?contains(name, '${UNIQUE}cr')].name" -otsv)
ENV_VAULT=$(az keyvault list --resource-group $GROUP --query [].name -otsv)
CLIENT_SECRET=$(az ad app credential reset --id $(az keyvault secret show --id https://${ENV_VAULT}.vault.azure.net/secrets/aad-client-id --query value -otsv) --query password -otsv)
```
__Retrieve Environment Settings__
```bash
# This will print settings that can be used in VS Code Preferences for the environment
cat << EOF
"rest-client.environmentVariables": {
"${UNIQUE}": {