diff --git a/.github/workflows/onboarding-portal.yml b/.github/workflows/onboarding-portal.yml new file mode 100644 index 0000000..e50e094 --- /dev/null +++ b/.github/workflows/onboarding-portal.yml @@ -0,0 +1,30 @@ +name: Cloud onboarding portal +on: + pull_request: + paths: ['site/**', 'install/**', '.github/workflows/onboarding-portal.yml'] + push: + branches: [main] + paths: ['site/**', 'install/**', '.github/workflows/onboarding-portal.yml'] +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + defaults: + run: + working-directory: site + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 24 + cache: npm + cache-dependency-path: site/package-lock.json + - run: npm ci --ignore-scripts + - run: npm run build + - run: npm test + - run: node --check public/app.js + - uses: actions/upload-artifact@v4 + with: + name: cloud-onboarding-pages + path: site/dist diff --git a/.gitignore b/.gitignore index cb75b67..d52027f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ .idea/ .vscode/ node_modules/ +.wrangler/ diff --git a/site/.gitignore b/site/.gitignore new file mode 100644 index 0000000..d391312 --- /dev/null +++ b/site/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +dist/ +.wrangler/ diff --git a/site/artifacts/azure-compliance.sh b/site/artifacts/azure-compliance.sh new file mode 100644 index 0000000..28c8cf8 --- /dev/null +++ b/site/artifacts/azure-compliance.sh @@ -0,0 +1,737 @@ +#!/usr/bin/env bash +# Bash 3.2 (still shipped by macOS) treats an explicitly declared empty array +# as an unset variable under `set -u`, which can abort the best-effort partial +# authorization path precisely when a permission family grants zero entries. +# Every scalar used below has an explicit default; retain fail-fast and +# pipe-failure behavior while allowing a legitimate empty result set. +set -eo pipefail + +TIER="posture" +PERMISSION_PROFILE="legacy" +SCOPE_KIND="management-group" +MANAGEMENT_GROUP="" +SUBSCRIPTIONS="" +WORKSPACE_IDS="" +BILLING_SCOPES="" +APP_NAME="Transilience Managed Compliance" +UNINSTALL="false" +DRY_RUN="false" +EXTERNAL_ID="" +COMPLETE_URL="" +RETURN_URL="" +# Connect-everything defaults for the one-click Cloud Shell case: +# ALL_SUBSCRIPTIONS: assess every subscription the caller can access (all 6+ +# in the tenant), not just the current one. +# ENTRA: posture onboarding stays on the fast Azure-resource path. Entra +# directory access is opt-in because admin consent is a separate concern +# and can add a minute of retries before the first CSPM run starts. +ALL_SUBSCRIPTIONS="false" +ENTRA="false" + +usage() { + cat <<'EOF' +Transilience Azure read-only compliance installer + +Usage: + azure-compliance.sh [options] + +Options: + --tier posture|logs|complete + --profile azure-full-evidence-v1 Request the complete, versioned read-only + evidence profile used by the app + --scope management-group|subscriptions + --management-group ID Required for management-group scope + --subscriptions ID1,ID2 Narrow to specific subscriptions + --all-subscriptions Assess every accessible subscription (default + when no scope target is supplied) + --entra / --no-entra Grant/skip read-only Entra ID (Microsoft + Graph) directory access. Default: --no-entra + --workspace-ids RESOURCE_ID,... Optional; narrows log roles to workspaces + --billing-scopes RESOURCE_ID,... Optional billing account/profile scopes on + which Billing Reader should be assigned + --app-name NAME Default: Transilience Managed Compliance + --external-id TOKEN Optional one-time platform callback token + --complete-url HTTPS_URL Optional platform completion callback + --return-url HTTPS_URL Security OS Integrations page to open after + automatic completion + --uninstall Remove role assignments and the dedicated app + --dry-run Print the plan without changing Azure + --help + +Tiers: + posture Reader + Security Reader; base read-only Entra Graph + (Directory/AuditLog/Policy/RoleManagement .Read.All) + logs Posture PLUS Log Analytics Reader + Microsoft Sentinel Reader, and the + log-monitoring Graph permissions User.Read.All, ThreatHunting.Read.All, + DeviceManagementManagedDevices.Read.All, Policy.Read.ConditionalAccess + — i.e. Microsoft Defender / Entra sign-in & MFA-CA / Intune log access + complete Azure roles above + +Profiles: + azure-full-evidence-v1 + All applicable read-only Azure RBAC, Microsoft Graph, and + Microsoft Defender for Endpoint permissions used for evidence + collection. A denied permission does not discard the credential: + the callback records a partial connection and lists what is + missing so the grant can be repaired and the installer re-run. + +By default (no scope target) the installer assesses EVERY subscription you can +access. Entra ID directory access is opt-in with --entra so the first CSPM run +is not delayed by an unrelated admin-consent step. Use --tier logs --entra to +also grant the log-monitoring roles + Graph permissions above. Pass +--subscriptions / --management-group to narrow the scope. +EOF +} + +while [[ $# -gt 0 ]]; do + case "$1" in + --tier) TIER="$2"; shift 2 ;; + --profile) PERMISSION_PROFILE="$2"; shift 2 ;; + --scope) SCOPE_KIND="$2"; shift 2 ;; + --management-group) MANAGEMENT_GROUP="$2"; shift 2 ;; + --subscriptions) SUBSCRIPTIONS="$2"; shift 2 ;; + --workspace-ids) WORKSPACE_IDS="$2"; shift 2 ;; + --billing-scopes) BILLING_SCOPES="$2"; shift 2 ;; + --app-name) APP_NAME="$2"; shift 2 ;; + --external-id) EXTERNAL_ID="$2"; shift 2 ;; + --complete-url) COMPLETE_URL="$2"; shift 2 ;; + --return-url) RETURN_URL="$2"; shift 2 ;; + --all-subscriptions) ALL_SUBSCRIPTIONS="true"; shift ;; + --entra) ENTRA="true"; shift ;; + --no-entra) ENTRA="false"; shift ;; + --uninstall) UNINSTALL="true"; shift ;; + --dry-run) DRY_RUN="true"; shift ;; + --help|-h) usage; exit 0 ;; + *) echo "Unknown option: $1" >&2; usage >&2; exit 2 ;; + esac +done + +case "$TIER" in posture|logs|complete) ;; *) echo "Invalid tier: $TIER" >&2; exit 2 ;; esac +case "$PERMISSION_PROFILE" in + legacy) ;; + azure-full-evidence-v1) TIER="complete"; ENTRA="true" ;; + *) echo "Invalid profile: $PERMISSION_PROFILE" >&2; exit 2 ;; +esac +case "$SCOPE_KIND" in management-group|subscriptions) ;; *) echo "Invalid scope: $SCOPE_KIND" >&2; exit 2 ;; esac +if [[ -n "$EXTERNAL_ID" || -n "$COMPLETE_URL" ]]; then + [[ -n "$EXTERNAL_ID" && -n "$COMPLETE_URL" ]] || { echo "--external-id and --complete-url must be supplied together" >&2; exit 2; } + case "$COMPLETE_URL" in + https://*.transilience.cloud/*|https://transilience.cloud/*|https://*.transilience.ai/*|https://transilience.ai/*|https://api.settlingforless.com/*|https://transilience-customer-prod--transilience-onboarding*.modal.run/*|https://transilience-customer-dev--transilience-onboarding*.modal.run/*) ;; + *) echo "Completion URL is not an approved Transilience HTTPS endpoint" >&2; exit 2 ;; + esac +fi +if [[ -n "$RETURN_URL" ]]; then + case "$RETURN_URL" in + https://*.transilience.cloud/*|https://transilience.cloud/*) ;; + *) echo "Return URL is not an approved Transilience HTTPS endpoint" >&2; exit 2 ;; + esac +fi + +# Zero-input default: when no explicit scope target is supplied (the one-click +# Cloud Shell case), assess EVERY enabled subscription the caller can access. +# Pass --subscriptions ID1,ID2 to narrow, or --management-group ID to scope to +# a management group (which also covers future subscriptions under it). +if [[ "$SCOPE_KIND" == "management-group" && -z "$MANAGEMENT_GROUP" && -z "$SUBSCRIPTIONS" ]]; then + SCOPE_KIND="subscriptions" + ALL_SUBSCRIPTIONS="true" +fi +if [[ "$SCOPE_KIND" == "subscriptions" && "$ALL_SUBSCRIPTIONS" == "true" && -z "$SUBSCRIPTIONS" ]]; then + command -v az >/dev/null || { echo "Azure CLI (az) is required." >&2; exit 1; } + az account show >/dev/null 2>&1 || az login >/dev/null + # Every enabled subscription in the signed-in tenant the caller can see. + TENANT_FOR_SUBS="$(az account show --query tenantId -o tsv)" + SUBSCRIPTIONS="$(az account list --all --query "[?tenantId=='$TENANT_FOR_SUBS' && state=='Enabled'].id" -o tsv | paste -sd, -)" + [[ -n "$SUBSCRIPTIONS" ]] || { + echo "No accessible subscriptions found. As a Global Admin, enable 'Access management for Azure resources' (Entra ID > Properties) to get access across the tenant, then re-run — or pass --subscriptions ID1,ID2." >&2 + exit 2 + } + SUB_COUNT="$(awk -F, '{print NF}' <<< "$SUBSCRIPTIONS")" + echo "No scope supplied; assessing all $SUB_COUNT accessible subscription(s)." +fi +if [[ "$SCOPE_KIND" == "subscriptions" && -z "$SUBSCRIPTIONS" ]]; then + command -v az >/dev/null || { echo "Azure CLI (az) is required." >&2; exit 1; } + az account show >/dev/null 2>&1 || az login >/dev/null + SUBSCRIPTIONS="$(az account show --query id -o tsv)" + [[ -n "$SUBSCRIPTIONS" ]] || { echo "Could not determine the current subscription; pass --subscriptions." >&2; exit 2; } + echo "Defaulting to the current subscription: $SUBSCRIPTIONS" +fi + +declare -a BASE_SCOPES=() +declare -a SUBSCRIPTION_LIST=() +if [[ "$SCOPE_KIND" == "management-group" ]]; then + [[ -n "$MANAGEMENT_GROUP" ]] || { echo "--management-group is required" >&2; exit 2; } + BASE_SCOPES+=("/providers/Microsoft.Management/managementGroups/$MANAGEMENT_GROUP") +else + [[ -n "$SUBSCRIPTIONS" ]] || { echo "--subscriptions is required" >&2; exit 2; } + IFS=',' read -r -a RAW_SUBSCRIPTION_LIST <<< "$SUBSCRIPTIONS" + for subscription in "${RAW_SUBSCRIPTION_LIST[@]}"; do + subscription="${subscription//[[:space:]]/}" + if [[ -n "$subscription" ]]; then + SUBSCRIPTION_LIST+=("$subscription") + BASE_SCOPES+=("/subscriptions/$subscription") + fi + done +fi + +declare -a LOG_SCOPES=() +if [[ -n "$WORKSPACE_IDS" ]]; then + IFS=',' read -r -a RAW_WORKSPACE_LIST <<< "$WORKSPACE_IDS" + for workspace in "${RAW_WORKSPACE_LIST[@]}"; do + workspace="${workspace## }"; workspace="${workspace%% }" + [[ -n "$workspace" ]] && LOG_SCOPES+=("$workspace") + done +else + LOG_SCOPES=("${BASE_SCOPES[@]}") +fi + +# Versioned permission contract. Keep the names (rather than GUIDs) in source: +# Entra application-role GUIDs can be resolved from the tenant's Microsoft +# first-party service principals and the names make the requested access +# reviewable. Every entry is an application/read permission; no delegated or +# write permission is requested. +declare -a FULL_EVIDENCE_BASE_RBAC_ROLES=( + "Reader" + "Security Reader" + "Monitoring Reader" + "Backup Reader" + "Key Vault Reader" + "Cost Management Reader" +) +declare -a FULL_EVIDENCE_LOG_RBAC_ROLES=( + "Log Analytics Reader" + "Microsoft Sentinel Reader" +) +declare -a FULL_EVIDENCE_GRAPH_PERMISSIONS=( + "Directory.Read.All" + "User.Read.All" + "Group.Read.All" + "Application.Read.All" + "Device.Read.All" + "Organization.Read.All" + "Domain.Read.All" + "AdministrativeUnit.Read.All" + "RoleManagement.Read.Directory" + "RoleEligibilitySchedule.Read.Directory" + "RoleAssignmentSchedule.Read.Directory" + "RoleManagementPolicy.Read.Directory" + "RoleManagement.Read.All" + "Policy.Read.All" + "Policy.Read.ConditionalAccess" + "Policy.Read.AuthenticationMethod" + "Policy.Read.PermissionGrant" + "Policy.Read.DeviceConfiguration" + "CrossTenantInformation.ReadBasic.All" + "AuditLog.Read.All" + "Reports.Read.All" + "ReportSettings.Read.All" + "AuditLogsQuery.Read.All" + "AccessReview.Read.All" + "EntitlementManagement.Read.All" + "LifecycleWorkflows.Read.All" + "Agreement.Read.All" + "OnPremDirectorySynchronization.Read.All" + "SecurityEvents.Read.All" + "SecurityAlert.Read.All" + "SecurityIncident.Read.All" + "ThreatHunting.Read.All" + "IdentityRiskyUser.Read.All" + "IdentityRiskEvent.Read.All" + "IdentityRiskyServicePrincipal.Read.All" + "SecurityActions.Read.All" + "ThreatIndicators.Read.All" + "InformationProtectionPolicy.Read.All" + "DeviceManagementConfiguration.Read.All" + "DeviceManagementManagedDevices.Read.All" + "DeviceManagementApps.Read.All" + "DeviceManagementServiceConfig.Read.All" + "DeviceManagementRBAC.Read.All" +) +declare -a FULL_EVIDENCE_DEFENDER_PERMISSIONS=( + "Machine.Read.All" + "Vulnerability.Read.All" + "SecurityRecommendation.Read.All" + "Software.Read.All" + "Score.Read.All" + "Alert.Read.All" +) + +ACTION="install" +[[ "$UNINSTALL" == "true" ]] && ACTION="uninstall" +echo "Transilience Azure installer" +echo " Action: $ACTION" +echo " Tier: $TIER" +echo " Profile: $PERMISSION_PROFILE" +echo " Scope: $SCOPE_KIND" +printf ' Targets:\n'; printf ' - %s\n' "${BASE_SCOPES[@]}" +if [[ "$TIER" != "posture" ]]; then + printf ' Log targets:\n'; printf ' - %s\n' "${LOG_SCOPES[@]}" +fi + +if [[ "$DRY_RUN" == "true" ]]; then + echo + echo "Dry run only. Planned Azure RBAC access:" + if [[ "$PERMISSION_PROFILE" == "azure-full-evidence-v1" ]]; then + printf ' - %s\n' "${FULL_EVIDENCE_BASE_RBAC_ROLES[@]}" + printf ' - %s\n' "${FULL_EVIDENCE_LOG_RBAC_ROLES[@]}" + echo " - Management Group Reader (management-group scope only)" + echo " - Billing Reader (--billing-scopes only)" + echo " - Azure Kubernetes Service RBAC Reader (discovered AKS clusters)" + echo " - App Configuration Data Reader (discovered App Configuration stores)" + echo " Microsoft Graph application permissions: ${#FULL_EVIDENCE_GRAPH_PERMISSIONS[@]} read-only permissions" + printf ' - %s\n' "${FULL_EVIDENCE_GRAPH_PERMISSIONS[@]}" + echo " Microsoft Defender for Endpoint application permissions:" + printf ' - %s\n' "${FULL_EVIDENCE_DEFENDER_PERMISSIONS[@]}" + else + echo " - Reader" + echo " - Security Reader" + if [[ "$TIER" != "posture" ]]; then + echo " - Log Analytics Reader" + echo " - Microsoft Sentinel Reader" + fi + fi + if [[ "$ENTRA" == "true" && "$PERMISSION_PROFILE" != "azure-full-evidence-v1" ]]; then + echo " Microsoft Graph (Entra) read-only permissions:" + echo " - Directory.Read.All, AuditLog.Read.All, Policy.Read.All, RoleManagement.Read.Directory" + if [[ "$TIER" != "posture" ]]; then + echo " - User.Read.All, ThreatHunting.Read.All, DeviceManagementManagedDevices.Read.All, Policy.Read.ConditionalAccess (log monitoring)" + fi + fi + exit 0 +fi + +command -v az >/dev/null || { echo "Azure CLI (az) is required." >&2; exit 1; } +command -v jq >/dev/null || { echo "jq is required (it is preinstalled in Azure Cloud Shell)." >&2; exit 1; } +az account show >/dev/null 2>&1 || az login >/dev/null + +TENANT_ID="$(az account show --query tenantId -o tsv)" +APP_ID="$(az ad app list --display-name "$APP_NAME" --query "[?displayName=='$APP_NAME'].appId | [0]" -o tsv)" + +if [[ "$UNINSTALL" == "true" ]]; then + if [[ -z "$APP_ID" ]]; then + echo "Dedicated app is already absent: $APP_NAME" + exit 0 + fi + SP_OBJECT_ID="$(az ad sp list --filter "appId eq '$APP_ID'" --query '[0].id' -o tsv)" + if [[ -n "$SP_OBJECT_ID" ]]; then + # This service principal is dedicated to Transilience, so remove every + # assignment it owns, including resource-scoped and optional billing roles. + az role assignment delete --assignee "$SP_OBJECT_ID" --all --only-show-errors 2>/dev/null || true + az ad sp delete --id "$SP_OBJECT_ID" --only-show-errors 2>/dev/null || true + fi + az ad app delete --id "$APP_ID" --only-show-errors + echo "Azure offboarding is complete. Deleted the dedicated Transilience app and its scoped role assignments." + exit 0 +fi + +if [[ -z "$APP_ID" ]]; then + APP_ID="$(az ad app create --display-name "$APP_NAME" --sign-in-audience AzureADMyOrg --query appId -o tsv)" + echo "Created app registration: $APP_ID" +else + echo "Reusing app registration: $APP_ID" +fi + +SP_OBJECT_ID="$(az ad sp list --filter "appId eq '$APP_ID'" --query '[0].id' -o tsv)" +if [[ -z "$SP_OBJECT_ID" ]]; then + for _ in 1 2 3 4 5 6; do + # A newly-created application can take several seconds to replicate to the + # service-principal endpoint. Treat that expected 404 as retryable instead + # of letting `set -e` abort an otherwise valid first-time installation. + az ad sp create --id "$APP_ID" --only-show-errors >/dev/null 2>&1 || true + SP_OBJECT_ID="$(az ad sp list --filter "appId eq '$APP_ID'" --query '[0].id' -o tsv)" + [[ -n "$SP_OBJECT_ID" ]] && break + sleep 5 + done + [[ -n "$SP_OBJECT_ID" ]] || { echo "Enterprise application did not become available in time" >&2; exit 1; } + echo "Created enterprise application: $SP_OBJECT_ID" +fi + +role_assignment_id() { + az role assignment list --assignee "$SP_OBJECT_ID" --role "$1" --scope "$2" \ + --include-inherited --query '[0].id' -o tsv 2>/dev/null || true +} + +declare -a RBAC_GRANTED=() +declare -a RBAC_FAILED=() +declare -a RBAC_NOT_APPLICABLE=() +declare -a GRAPH_GRANTED=() +declare -a GRAPH_MISSING=() +declare -a DEFENDER_GRANTED=() +declare -a DEFENDER_MISSING=() +declare -a USABLE_SUBSCRIPTIONS=() + +assign_role() { + local role="$1" scope="$2" attempt + local permission="${role}@${scope}" + if [[ -n "$(role_assignment_id "$role" "$scope")" ]]; then + RBAC_GRANTED+=("$permission") + echo "Verified: $role at $scope" + return 0 + fi + if az role assignment create \ + --assignee-object-id "$SP_OBJECT_ID" \ + --assignee-principal-type ServicePrincipal \ + --role "$role" \ + --scope "$scope" \ + --only-show-errors >/dev/null 2>&1; then + # Azure RBAC is eventually consistent. Do not report a successful create + # as missing just because the verification read races replication. + for attempt in 1 2 3 4; do + if [[ -n "$(role_assignment_id "$role" "$scope")" ]]; then + RBAC_GRANTED+=("$permission") + echo "Verified: $role at $scope" + return 0 + fi + sleep 2 + done + fi + RBAC_FAILED+=("$permission") + echo "WARNING: Could not grant $role at $scope; continuing so the usable credential can still be returned." >&2 + return 1 +} + +if [[ "$PERMISSION_PROFILE" == "azure-full-evidence-v1" ]]; then + for scope in "${BASE_SCOPES[@]}"; do + for role in "${FULL_EVIDENCE_BASE_RBAC_ROLES[@]}"; do + assign_role "$role" "$scope" || true + done + if [[ "$SCOPE_KIND" == "management-group" ]]; then + assign_role "Management Group Reader" "$scope" || true + fi + done + for scope in "${LOG_SCOPES[@]}"; do + for role in "${FULL_EVIDENCE_LOG_RBAC_ROLES[@]}"; do + assign_role "$role" "$scope" || true + done + done +else + for scope in "${BASE_SCOPES[@]}"; do + assign_role "Reader" "$scope" || true + assign_role "Security Reader" "$scope" || true + done + if [[ "$TIER" != "posture" ]]; then + for scope in "${LOG_SCOPES[@]}"; do + assign_role "Log Analytics Reader" "$scope" || true + assign_role "Microsoft Sentinel Reader" "$scope" || true + done + fi +fi + +# Resolve the subscriptions under a management-group target before discovering +# resource-scoped roles. Failure to enumerate does not destroy the credential; +# it produces a partial connection with no runnable subscriptions. +if [[ "$SCOPE_KIND" == "management-group" ]]; then + SUBSCRIPTION_IDS_JSON="$(az account management-group subscription show-sub-under-mg \ + --name "$MANAGEMENT_GROUP" --query '[].name' -o json 2>/dev/null || echo '[]')" + while IFS= read -r subscription; do + [[ -n "$subscription" ]] && SUBSCRIPTION_LIST+=("$subscription") + done < <(jq -r '.[]' <<< "$SUBSCRIPTION_IDS_JSON") +else + SUBSCRIPTION_IDS_JSON="$(printf '%s\n' "${SUBSCRIPTION_LIST[@]}" | jq -R . | jq -s .)" +fi + +if [[ "$PERMISSION_PROFILE" == "azure-full-evidence-v1" ]]; then + # These two roles are meaningful only on matching resources, so discover and + # assign them rather than widening their scope unnecessarily. + AKS_FOUND="false" + APPCONFIG_FOUND="false" + for subscription in "${SUBSCRIPTION_LIST[@]}"; do + while IFS= read -r resource_id; do + [[ -z "$resource_id" ]] && continue + AKS_FOUND="true" + assign_role "Azure Kubernetes Service RBAC Reader" "$resource_id" || true + done < <(az resource list --subscription "$subscription" \ + --resource-type Microsoft.ContainerService/managedClusters \ + --query '[].id' -o tsv 2>/dev/null || true) + while IFS= read -r resource_id; do + [[ -z "$resource_id" ]] && continue + APPCONFIG_FOUND="true" + assign_role "App Configuration Data Reader" "$resource_id" || true + done < <(az resource list --subscription "$subscription" \ + --resource-type Microsoft.AppConfiguration/configurationStores \ + --query '[].id' -o tsv 2>/dev/null || true) + done + [[ "$AKS_FOUND" == "true" ]] || RBAC_NOT_APPLICABLE+=("Azure Kubernetes Service RBAC Reader (no AKS clusters discovered)") + [[ "$APPCONFIG_FOUND" == "true" ]] || RBAC_NOT_APPLICABLE+=("App Configuration Data Reader (no App Configuration stores discovered)") + if [[ -n "$BILLING_SCOPES" ]]; then + IFS=',' read -r -a RAW_BILLING_SCOPES <<< "$BILLING_SCOPES" + for scope in "${RAW_BILLING_SCOPES[@]}"; do + scope="${scope//[[:space:]]/}" + [[ -n "$scope" ]] && assign_role "Billing Reader" "$scope" || true + done + else + RBAC_NOT_APPLICABLE+=("Billing Reader (no billing scope supplied)") + fi + if [[ "$SCOPE_KIND" != "management-group" ]]; then + RBAC_NOT_APPLICABLE+=("Management Group Reader (subscription scope selected)") + fi +fi + +# A subscription is runnable when the service principal can read its resource +# inventory. Security/log/API permissions may still be partial and are reported +# independently. Management-group Reader inheritance is honored by the query. +for subscription in "${SUBSCRIPTION_LIST[@]}"; do + if [[ -n "$(role_assignment_id "Reader" "/subscriptions/$subscription")" ]]; then + USABLE_SUBSCRIPTIONS+=("$subscription") + fi +done + +# --- Entra (Microsoft Graph) read-only application permissions --------------- +# Grant this dedicated app tenant-wide READ access to Entra ID directory data +# (users, groups, roles, sign-in/audit logs, conditional-access policies), then +# admin-consent it so the service principal can use it app-only. All Graph +# permissions here are *.Read.All (read-only). Requires a Global Administrator +# or Privileged Role Administrator to consent; the script is idempotent. +GRAPH_APP_ID="00000003-0000-0000-c000-000000000000" # Microsoft Graph +DEFENDER_APP_ID="fc780465-2017-40d4-a0c5-307022471b92" # WindowsDefenderATP +declare -a GRAPH_PERMISSIONS=( + "Directory.Read.All" + "AuditLog.Read.All" + "Policy.Read.All" + "RoleManagement.Read.Directory" +) +# Additional read-only Graph permissions for LOG MONITORING — Microsoft Defender +# (advanced hunting), Entra sign-in / MFA / Conditional Access, and Intune. Added +# on top of the base set for the `logs` and `complete` tiers so the one-click +# connect covers what the Transilience log-monitoring pipeline reads (this is the +# self-service replacement for the manual "Onboard Azure for Log Monitoring" steps). +declare -a LOG_GRAPH_PERMISSIONS=( + "User.Read.All" + "ThreatHunting.Read.All" + "DeviceManagementManagedDevices.Read.All" + "Policy.Read.ConditionalAccess" +) +if [[ "$TIER" != "posture" ]]; then + GRAPH_PERMISSIONS+=("${LOG_GRAPH_PERMISSIONS[@]}") +fi +if [[ "$PERMISSION_PROFILE" == "azure-full-evidence-v1" ]]; then + GRAPH_PERMISSIONS=("${FULL_EVIDENCE_GRAPH_PERMISSIONS[@]}") +fi + +declare -a GRAPH_PERMISSION_IDS=() +declare -a DEFENDER_PERMISSION_IDS=() + +resolve_and_request_permissions() { + local resource_app_id="$1" label="$2" kind="$3" + local resource_json resource_object_id permission permission_id + local permissions=() + if [[ "$kind" == "graph" ]]; then + permissions=("${GRAPH_PERMISSIONS[@]}") + else + permissions=("${FULL_EVIDENCE_DEFENDER_PERMISSIONS[@]}") + fi + resource_json="$(az ad sp show --id "$resource_app_id" -o json 2>/dev/null || true)" + if [[ -z "$resource_json" ]]; then + az ad sp create --id "$resource_app_id" --only-show-errors >/dev/null 2>&1 || true + resource_json="$(az ad sp show --id "$resource_app_id" -o json 2>/dev/null || true)" + fi + resource_object_id="$(jq -r '.id // empty' <<< "$resource_json")" + if [[ -z "$resource_object_id" ]]; then + for permission in "${permissions[@]}"; do + if [[ "$kind" == "graph" ]]; then + GRAPH_MISSING+=("${label}:${permission}") + else + DEFENDER_MISSING+=("${label}:${permission}") + fi + done + return 0 + fi + for permission in "${permissions[@]}"; do + permission_id="$(jq -r --arg permission "$permission" \ + '.appRoles[]? | select(.value == $permission and .isEnabled == true and (.allowedMemberTypes | index("Application"))) | .id' \ + <<< "$resource_json" | head -1)" + if [[ -z "$permission_id" ]]; then + if [[ "$kind" == "graph" ]]; then + GRAPH_MISSING+=("${label}:${permission}") + else + DEFENDER_MISSING+=("${label}:${permission}") + fi + continue + fi + if [[ "$kind" == "graph" ]]; then + GRAPH_PERMISSION_IDS+=("${permission}|${permission_id}|${resource_object_id}") + else + DEFENDER_PERMISSION_IDS+=("${permission}|${permission_id}|${resource_object_id}") + fi + az ad app permission add --id "$APP_ID" --api "$resource_app_id" \ + --api-permissions "${permission_id}=Role" --only-show-errors >/dev/null 2>&1 || true + done +} + +verify_api_permissions() { + local label="$1" kind="$2" assignments_json entry permission permission_id resource_object_id + local permission_ids=() + if [[ "$kind" == "graph" ]]; then + permission_ids=("${GRAPH_PERMISSION_IDS[@]}") + else + permission_ids=("${DEFENDER_PERMISSION_IDS[@]}") + fi + assignments_json="$(az rest --method GET \ + --url "https://graph.microsoft.com/v1.0/servicePrincipals/${SP_OBJECT_ID}/appRoleAssignments?\$select=resourceId,appRoleId" \ + -o json 2>/dev/null || echo '{"value":[]}')" + for entry in "${permission_ids[@]}"; do + IFS='|' read -r permission permission_id resource_object_id <<< "$entry" + if jq -e --arg resource "$resource_object_id" --arg permission "$permission_id" \ + '.value | any(.resourceId == $resource and .appRoleId == $permission)' \ + <<< "$assignments_json" >/dev/null; then + if [[ "$kind" == "graph" ]]; then + GRAPH_GRANTED+=("${label}:${permission}") + else + DEFENDER_GRANTED+=("${label}:${permission}") + fi + else + if [[ "$kind" == "graph" ]]; then + GRAPH_MISSING+=("${label}:${permission}") + else + DEFENDER_MISSING+=("${label}:${permission}") + fi + fi + done +} + +ENTRA_GRANTED="false" +if [[ "$ENTRA" == "true" ]]; then + echo "Configuring Microsoft Graph read-only application access…" + resolve_and_request_permissions "$GRAPH_APP_ID" "Microsoft Graph" graph + if [[ "$PERMISSION_PROFILE" == "azure-full-evidence-v1" ]]; then + echo "Configuring Microsoft Defender for Endpoint read-only application access…" + resolve_and_request_permissions "$DEFENDER_APP_ID" "Microsoft Defender for Endpoint" defender + fi + # Admin-consent the application permissions (grants app-role assignments on + # the Graph service principal). Retry briefly — the app permission list can + # take a moment to propagate before consent succeeds. + CONSENT_OK="false" + for _ in 1 2 3 4 5 6; do + if az ad app permission admin-consent --id "$APP_ID" --only-show-errors 2>/dev/null; then + CONSENT_OK="true"; break + fi + sleep 10 + done + [[ "$CONSENT_OK" == "true" ]] && sleep 5 + verify_api_permissions "Microsoft Graph" graph + if [[ "$PERMISSION_PROFILE" == "azure-full-evidence-v1" ]]; then + verify_api_permissions "Microsoft Defender for Endpoint" defender + fi + if [[ "$CONSENT_OK" == "true" && "${#GRAPH_MISSING[@]}" -eq 0 ]]; then + ENTRA_GRANTED="true" + echo "Microsoft Graph read access granted and verified." + else + echo "WARNING: Entra permissions were added but admin consent did not complete." >&2 + echo " Grant consent in the portal (App registrations > $APP_NAME > API permissions > Grant admin consent), or re-run as a Global Administrator." >&2 + fi +fi + +umask 077 +CREDENTIAL_FILE="transilience-azure-credentials.json" +while IFS= read -r key_id; do + [[ -n "$key_id" ]] && az ad app credential delete --id "$APP_ID" --key-id "$key_id" --only-show-errors +done < <(az ad app credential list --id "$APP_ID" --query "[?displayName=='transilience-onboarding'].keyId" -o tsv) +CREDENTIAL_JSON="$(az ad app credential reset --id "$APP_ID" --append --display-name transilience-onboarding --years 1 -o json)" +jq --arg tenantId "$TENANT_ID" --arg tier "$TIER" --arg profile "$PERMISSION_PROFILE" --arg scope "$SCOPE_KIND" \ + '{tenantId:$tenantId,clientId:.appId,clientSecret:.password,tier:$tier,permissionProfile:$profile,scope:$scope}' \ + <<< "$CREDENTIAL_JSON" > "$CREDENTIAL_FILE" + +array_json() { + if [[ "$#" -eq 0 ]]; then + echo '[]' + else + printf '%s\n' "$@" | jq -R . | jq -s . + fi +} + +RBAC_GRANTED_JSON="$(array_json "${RBAC_GRANTED[@]}")" +RBAC_FAILED_JSON="$(array_json "${RBAC_FAILED[@]}")" +RBAC_NOT_APPLICABLE_JSON="$(array_json "${RBAC_NOT_APPLICABLE[@]}")" +GRAPH_GRANTED_JSON="$(array_json "${GRAPH_GRANTED[@]}")" +GRAPH_MISSING_JSON="$(array_json "${GRAPH_MISSING[@]}")" +DEFENDER_GRANTED_JSON="$(array_json "${DEFENDER_GRANTED[@]}")" +DEFENDER_MISSING_JSON="$(array_json "${DEFENDER_MISSING[@]}")" +USABLE_SUBSCRIPTIONS_JSON="$(array_json "${USABLE_SUBSCRIPTIONS[@]}")" + +AUTHORIZATION_STATUS="complete" +if [[ "${#RBAC_FAILED[@]}" -gt 0 || "${#GRAPH_MISSING[@]}" -gt 0 || "${#DEFENDER_MISSING[@]}" -gt 0 ]]; then + AUTHORIZATION_STATUS="partial" +fi +if [[ "$PERMISSION_PROFILE" == "azure-full-evidence-v1" && "${#USABLE_SUBSCRIPTIONS[@]}" -eq 0 ]]; then + AUTHORIZATION_STATUS="partial" +fi + +# Write the local handoff files before attempting the callback. Customers may +# need to transfer the credential through an approved secure channel when the +# callback is unavailable, and keeping the same files after callback success +# makes the customer procedure deterministic. +jq -n \ + --arg tenantId "$TENANT_ID" \ + --arg clientId "$APP_ID" \ + --arg servicePrincipalObjectId "$SP_OBJECT_ID" \ + --arg tier "$TIER" \ + --arg permissionProfile "$PERMISSION_PROFILE" \ + --arg authorizationStatus "$AUTHORIZATION_STATUS" \ + --arg scope "$SCOPE_KIND" \ + --arg credentialsFile "$CREDENTIAL_FILE" \ + --argjson subscriptionIds "$SUBSCRIPTION_IDS_JSON" \ + --argjson usableSubscriptionIds "$USABLE_SUBSCRIPTIONS_JSON" \ + --argjson rbacGranted "$RBAC_GRANTED_JSON" \ + --argjson rbacFailed "$RBAC_FAILED_JSON" \ + --argjson rbacNotApplicable "$RBAC_NOT_APPLICABLE_JSON" \ + --argjson graphPermissionsGranted "$GRAPH_GRANTED_JSON" \ + --argjson graphPermissionsMissing "$GRAPH_MISSING_JSON" \ + --argjson defenderPermissionsGranted "$DEFENDER_GRANTED_JSON" \ + --argjson defenderPermissionsMissing "$DEFENDER_MISSING_JSON" \ + '{tenantId:$tenantId,clientId:$clientId,servicePrincipalObjectId:$servicePrincipalObjectId,tier:$tier,permissionProfile:$permissionProfile,authorizationStatus:$authorizationStatus,scope:$scope,credentialsFile:$credentialsFile,subscriptionIds:$subscriptionIds,usableSubscriptionIds:$usableSubscriptionIds,rbacGranted:$rbacGranted,rbacFailed:$rbacFailed,rbacNotApplicable:$rbacNotApplicable,graphPermissionsGranted:$graphPermissionsGranted,graphPermissionsMissing:$graphPermissionsMissing,defenderPermissionsGranted:$defenderPermissionsGranted,defenderPermissionsMissing:$defenderPermissionsMissing}' \ + > transilience-azure-install-manifest.json + +AUTO_REGISTERED="false" +if [[ -n "$COMPLETE_URL" ]]; then + CLIENT_SECRET="$(jq -r '.clientSecret' "$CREDENTIAL_FILE")" + CALLBACK_BODY="$(jq -n \ + --arg external_id "$EXTERNAL_ID" \ + --arg azure_tenant_id "$TENANT_ID" \ + --arg client_id "$APP_ID" \ + --arg client_secret "$CLIENT_SECRET" \ + --arg scope_mode "$SCOPE_KIND" \ + --arg management_group "$MANAGEMENT_GROUP" \ + --arg permission_profile "$PERMISSION_PROFILE" \ + --arg authorization_status "$AUTHORIZATION_STATUS" \ + --argjson entra_enabled "$ENTRA_GRANTED" \ + --argjson subscription_ids "$SUBSCRIPTION_IDS_JSON" \ + --argjson usable_subscription_ids "$USABLE_SUBSCRIPTIONS_JSON" \ + --argjson rbac_granted "$RBAC_GRANTED_JSON" \ + --argjson rbac_failed "$RBAC_FAILED_JSON" \ + --argjson rbac_not_applicable "$RBAC_NOT_APPLICABLE_JSON" \ + --argjson graph_permissions_granted "$GRAPH_GRANTED_JSON" \ + --argjson graph_permissions_missing "$GRAPH_MISSING_JSON" \ + --argjson defender_permissions_granted "$DEFENDER_GRANTED_JSON" \ + --argjson defender_permissions_missing "$DEFENDER_MISSING_JSON" \ + '{external_id:$external_id,azure_tenant_id:$azure_tenant_id,client_id:$client_id,client_secret:$client_secret,subscription_ids:$subscription_ids,usable_subscription_ids:$usable_subscription_ids,scope_mode:$scope_mode,management_group:$management_group,entra_enabled:$entra_enabled,permission_profile:$permission_profile,authorization_status:$authorization_status,rbac_granted:$rbac_granted,rbac_failed:$rbac_failed,rbac_not_applicable:$rbac_not_applicable,graph_permissions_granted:$graph_permissions_granted,graph_permissions_missing:$graph_permissions_missing,defender_permissions_granted:$defender_permissions_granted,defender_permissions_missing:$defender_permissions_missing}')" + RESPONSE_FILE="$(mktemp)" + HTTP_CODE="$(curl -sS --retry 2 --connect-timeout 10 -o "$RESPONSE_FILE" -w '%{http_code}' -X POST "$COMPLETE_URL" -H 'content-type: application/json' -d "$CALLBACK_BODY")" + if [[ "$HTTP_CODE" != 2* ]]; then + echo "Completion callback failed with HTTP $HTTP_CODE" >&2 + cat "$RESPONSE_FILE" >&2 + rm -f "$RESPONSE_FILE" + echo "The credential and install manifest remain in Cloud Shell for approved secure handoff." >&2 + exit 1 + fi + rm -f "$RESPONSE_FILE" + AUTO_REGISTERED="true" + echo "Transilience connection activated automatically ($AUTHORIZATION_STATUS authorization)." + echo "The credential and install manifest remain in Cloud Shell for approved secure handoff." +fi + +echo +echo "Azure onboarding is complete." +echo "Authorization status: $AUTHORIZATION_STATUS" +if [[ "$AUTHORIZATION_STATUS" == "partial" ]]; then + echo "Some read-only grants were unavailable. The credential was retained and the missing grants are listed in transilience-azure-install-manifest.json." >&2 +fi +echo "A non-secret summary is in transilience-azure-install-manifest.json." +echo "Download $CREDENTIAL_FILE and move it only through the approved secure handoff." +echo "Reader and Data Access was intentionally excluded because it permits storage-key data access." +if [[ "$AUTO_REGISTERED" == "true" ]]; then + echo + echo "Connection complete. Transilience security apps and scans are starting automatically." + if [[ -n "$RETURN_URL" ]]; then + echo "Return to Security OS to follow live activity:" + echo " $RETURN_URL" + fi +fi diff --git a/site/artifacts/transilience-security-audit.yaml b/site/artifacts/transilience-security-audit.yaml new file mode 100644 index 0000000..97e4c4d --- /dev/null +++ b/site/artifacts/transilience-security-audit.yaml @@ -0,0 +1,415 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: 'Transilience Managed Compliance - SecurityAudit Read-Only Onboarding' + +Metadata: + AWS::CloudFormation::Interface: + ParameterGroups: + - Label: + default: "Transilience Configuration" + Parameters: + - CustomerEmail + - CustomerName + ParameterLabels: + CustomerEmail: + default: "Your Email Address" + CustomerName: + default: "Your Company Name" + +Parameters: + CustomerEmail: + Type: String + Default: "" + Description: Optional contact email for legacy launches; TPSE resolves the verified signup email from ConnectToken + AllowedPattern: "(^$)|(^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$)" + ConstraintDescription: Must be blank or a valid email address + + CustomerName: + Type: String + Description: Your company or organization name + MinLength: 2 + MaxLength: 100 + + ConnectToken: + Type: String + Default: "" + Description: One-time, non-credentialed correlation token (auto-filled by Transilience; do not modify) + + TransilienceBackendUrl: + Type: String + Default: "https://transilience-customer-prod--transilience-onboarding-onbo-d5f413.modal.run/onboarding/create" + Description: Transilience backend API endpoint (do not modify) + + TransilienceBackendApiKey: + Type: String + Default: "mcs-onboarding-2026-05-13-static-key" + Description: Transilience backend API key (do not modify) + NoEcho: true + +Resources: + #============================================================================ + # OIDC Identity Provider for Modal.com — created IDEMPOTENTLY via a custom + # resource. A raw AWS::IAM::OIDCProvider with DeletionPolicy: Retain made + # every REINSTALL fail: the retained provider survives stack deletion, and + # the next stack create 409s with EntityAlreadyExists. The Lambda below + # creates the provider only if missing, succeeds if it already exists, and + # leaves it in place on stack delete (same retain semantics, no 409). + #============================================================================ + OidcSetupLambdaRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Principal: + Service: lambda.amazonaws.com + Action: sts:AssumeRole + ManagedPolicyArns: + - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + Policies: + - PolicyName: EnsureModalOidcProvider + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Action: + - iam:CreateOpenIDConnectProvider + - iam:GetOpenIDConnectProvider + - iam:TagOpenIDConnectProvider + Resource: !Sub 'arn:aws:iam::${AWS::AccountId}:oidc-provider/oidc.modal.com' + Tags: + - Key: Purpose + Value: Transilience-Managed-Compliance + + OidcSetupFunction: + Type: AWS::Lambda::Function + Properties: + Description: Idempotently ensures the oidc.modal.com IAM OIDC provider exists + Runtime: python3.12 + Handler: index.handler + Role: !GetAtt OidcSetupLambdaRole.Arn + Timeout: 30 + MemorySize: 128 + Code: + ZipFile: | + import json + import boto3 + import cfnresponse + + OIDC_URL = 'https://oidc.modal.com' + CLIENT_ID = 'oidc.modal.com' + THUMBPRINT = '9e99a48a9960b14926bb7f3b02e22da2b0ab7280' + + def handler(event, context): + print(json.dumps({ + 'RequestType': event.get('RequestType'), + 'StackId': event.get('StackId'), + 'LogicalResourceId': event.get('LogicalResourceId') + })) + account_id = context.invoked_function_arn.split(':')[4] + provider_arn = f"arn:aws:iam::{account_id}:oidc-provider/oidc.modal.com" + # Stable physical id so CloudFormation never replaces this resource. + physical_id = provider_arn + + if event.get('RequestType') == 'Delete': + # Leave the provider in place — it may be shared with other + # stacks/roles. This preserves the old Retain semantics. + cfnresponse.send(event, context, cfnresponse.SUCCESS, + {'ProviderArn': provider_arn}, physical_id) + return + + try: + iam = boto3.client('iam') + try: + resp = iam.create_open_id_connect_provider( + Url=OIDC_URL, + ClientIDList=[CLIENT_ID], + ThumbprintList=[THUMBPRINT], + Tags=[ + {'Key': 'Purpose', 'Value': 'Transilience-Managed-Compliance'}, + {'Key': 'CreatedBy', 'Value': 'Transilience-CloudFormation'}, + ], + ) + provider_arn = resp['OpenIDConnectProviderArn'] + print(f"Created OIDC provider: {provider_arn}") + except iam.exceptions.EntityAlreadyExistsException: + print(f"OIDC provider already exists: {provider_arn}") + + cfnresponse.send(event, context, cfnresponse.SUCCESS, + {'ProviderArn': provider_arn}, physical_id) + except Exception as e: + print(f"Error: {e}") + cfnresponse.send(event, context, cfnresponse.FAILED, + {'Error': str(e)}, physical_id) + Tags: + - Key: Purpose + Value: Transilience-Managed-Compliance + + ModalOIDCProvider: + Type: Custom::TransilienceOidcProvider + Properties: + ServiceToken: !GetAtt OidcSetupFunction.Arn + + #============================================================================ + # IAM Role for Transilience Access + # Name is stack-scoped so multiple stacks can coexist in the same account. + #============================================================================ + TransilienceComplianceRole: + Type: AWS::IAM::Role + # The trust policy references the oidc.modal.com provider ARN, so the + # provider must exist before IAM validates the role. + DependsOn: ModalOIDCProvider + Properties: + Description: Role for Transilience Managed Compliance service to access AWS resources + MaxSessionDuration: 3600 + AssumeRolePolicyDocument: + Version: '2012-10-17' + Statement: + - Sid: AllowModalOIDCAssumeRole + Effect: Allow + Principal: + Federated: !Sub "arn:aws:iam::${AWS::AccountId}:oidc-provider/oidc.modal.com" + Action: sts:AssumeRoleWithWebIdentity + Condition: + StringEquals: + "oidc.modal.com:aud": "oidc.modal.com" + StringLike: + "oidc.modal.com:sub": + - "modal:workspace_id:ac-v1CZ9TWcqA7282i3kcFYa9:*" + ManagedPolicyArns: + - arn:aws:iam::aws:policy/SecurityAudit + # SecurityAudit intentionally covers security-configuration metadata and + # does not grant Billing/Cost Explorer data access. The Cloud Cost + # Analysis pack uses only this read operation; keep it separate and + # least-privilege instead of attaching the broad Billing policy. + Policies: + - PolicyName: TransilienceCostExplorerReadOnly + PolicyDocument: + Version: '2012-10-17' + Statement: + - Sid: ReadExactCostAndUsageWindows + Effect: Allow + Action: + - ce:GetCostAndUsage + Resource: '*' + Tags: + - Key: Purpose + Value: Transilience-Managed-Compliance + - Key: CreatedBy + Value: Transilience-CloudFormation + - Key: CustomerEmail + Value: !Ref CustomerEmail + + #============================================================================ + # Lambda Execution Role for the Registration Function + # Name is stack-scoped to avoid conflicts. + #============================================================================ + RegistrationLambdaRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Principal: + Service: lambda.amazonaws.com + Action: sts:AssumeRole + ManagedPolicyArns: + - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + Tags: + - Key: Purpose + Value: Transilience-Registration + + #============================================================================ + # Lambda Function to Register with Transilience Backend + # Name is stack-scoped to avoid conflicts. + #============================================================================ + RegistrationFunction: + Type: AWS::Lambda::Function + Properties: + Description: Registers AWS account with Transilience backend on stack creation + Runtime: python3.12 + Handler: index.handler + Role: !GetAtt RegistrationLambdaRole.Arn + Timeout: 120 + MemorySize: 128 + Environment: + Variables: + BACKEND_URL: !Ref TransilienceBackendUrl + BACKEND_API_KEY: !Ref TransilienceBackendApiKey + Code: + ZipFile: | + import json + import urllib.request + import urllib.error + import os + import cfnresponse + + def handler(event, context): + """ + CloudFormation Custom Resource handler. + Sends account registration data to Transilience backend. + """ + print(json.dumps({ + 'RequestType': event.get('RequestType'), + 'StackId': event.get('StackId'), + 'LogicalResourceId': event.get('LogicalResourceId') + })) + + request_type = event.get('RequestType', '') + onboarding_request_type = ( + 'Create' if request_type == 'Update' else request_type + ) + + try: + properties = event.get('ResourceProperties', {}) + account_id = properties.get('AccountId') + role_arn = properties.get('RoleArn') + role_name = properties.get('RoleName') + customer_email = properties.get('CustomerEmail') + customer_name = properties.get('CustomerName') + customer_name = ''.join((customer_name or '').strip().split()) + connect_token = properties.get('ConnectToken') + stack_id = event.get('StackId', '') + region = properties.get('Region') + + payload = { + 'account_id': account_id, + 'role_arn': role_arn, + 'role_name': role_name, + 'customer_email': customer_email, + 'customer_name': customer_name, + 'connect_token': connect_token, + 'stack_id': stack_id, + 'region': region, + 'request_type': onboarding_request_type, + 'cloudformation_request_type': request_type, + 'provider': 'aws', + 'source': 'cloudformation-onboarding' + } + + print(json.dumps({ + 'backend_url': os.environ.get('BACKEND_URL'), + 'account_id': account_id, + 'role_arn': role_arn, + 'customer_name': customer_name, + 'stack_id': stack_id, + 'region': region, + 'request_type': request_type + })) + + backend_url = os.environ.get('BACKEND_URL') + backend_api_key = os.environ.get('BACKEND_API_KEY') + + req = urllib.request.Request( + backend_url, + data=json.dumps(payload).encode('utf-8'), + headers={ + 'Content-Type': 'application/json', + 'User-Agent': 'Transilience-CloudFormation-Onboarding/1.0', + 'X-API-Key': backend_api_key + }, + method='POST' + ) + + # Clerk persistence and initial app scheduling can exceed + # the former 25-second timeout. Keep the HTTP timeout below + # the Lambda timeout while allowing that work to finish. + with urllib.request.urlopen(req, timeout=90) as response: + response_body = response.read().decode('utf-8') + print(f"Backend response: {response_body}") + + cfnresponse.send(event, context, cfnresponse.SUCCESS, { + 'Message': ( + 'Successfully disconnected from Transilience' + if request_type == 'Delete' + else 'Successfully registered with Transilience' + ), + 'AccountId': account_id, + 'RoleArn': role_arn + }) + + except urllib.error.HTTPError as e: + error_body = e.read().decode('utf-8') if e.fp else str(e) + print(f"HTTP Error: {e.code} - {error_body}") + if request_type == 'Delete': + cfnresponse.send(event, context, cfnresponse.SUCCESS, { + 'Message': f'Stack deletion continuing; disconnect callback failed: {error_body}', + 'Warning': 'Disconnect the AWS account in Security OS if it still appears connected.' + }) + else: + cfnresponse.send(event, context, cfnresponse.FAILED, { + 'Message': f'Role created but registration failed: {error_body}', + 'Warning': 'Please contact support@transilience.ai' + }, reason=f'Onboarding registration failed with HTTP {e.code}') + + except Exception as e: + print(f"Error: {str(e)}") + if request_type == 'Delete': + cfnresponse.send(event, context, cfnresponse.SUCCESS, { + 'Message': f'Stack deletion continuing; disconnect callback failed: {str(e)}', + 'Warning': 'Disconnect the AWS account in Security OS if it still appears connected.' + }) + else: + cfnresponse.send(event, context, cfnresponse.FAILED, { + 'Message': f'Role created but registration encountered an error: {str(e)}', + 'Warning': 'Please contact support@transilience.ai' + }, reason='Onboarding registration failed') + Tags: + - Key: Purpose + Value: Transilience-Registration + + #============================================================================ + # Custom Resource to Trigger Registration + #============================================================================ + AccountRegistration: + Type: Custom::TransilienceRegistration + DependsOn: + - TransilienceComplianceRole + Properties: + ServiceToken: !GetAtt RegistrationFunction.Arn + AccountId: !Ref AWS::AccountId + RoleArn: !GetAtt TransilienceComplianceRole.Arn + RoleName: !Ref TransilienceComplianceRole + CustomerEmail: !Ref CustomerEmail + CustomerName: !Ref CustomerName + ConnectToken: !Ref ConnectToken + Region: !Ref AWS::Region + Timestamp: !Sub "${AWS::StackName}-${AWS::Region}" + CallbackRevision: "2026-08-24-source-reconciled" + +#============================================================================ +# Outputs +#============================================================================ +Outputs: + AccountId: + Description: AWS Account ID that was onboarded + Value: !Ref AWS::AccountId + Export: + Name: !Sub "${AWS::StackName}-AccountId" + + RoleArn: + Description: ARN of the Transilience Compliance Role + Value: !GetAtt TransilienceComplianceRole.Arn + Export: + Name: !Sub "${AWS::StackName}-RoleArn" + + RoleName: + Description: Name of the Transilience Compliance Role + Value: !Ref TransilienceComplianceRole + Export: + Name: !Sub "${AWS::StackName}-RoleName" + + OIDCProviderArn: + Description: ARN of the Modal OIDC Provider + Value: !GetAtt ModalOIDCProvider.ProviderArn + Export: + Name: !Sub "${AWS::StackName}-OIDCProviderArn" + + OnboardingStatus: + Description: Status of the onboarding registration + Value: !GetAtt AccountRegistration.Message + + PermissionsSummary: + Description: Summary of permissions granted + Value: "SecurityAudit" diff --git a/site/build.mjs b/site/build.mjs new file mode 100644 index 0000000..00d7a3d --- /dev/null +++ b/site/build.mjs @@ -0,0 +1,137 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import crypto from 'node:crypto'; +import {marked} from 'marked'; +import {sourceCommit, reviewed, origin, repo, groups, sourcePages, customPages, problems} from './content.mjs'; +import {screenshotAssets, setupRoutes, setupGuide, simpleHomeHTML} from './guides.mjs'; + +const out = new URL('./dist/', import.meta.url); +fs.mkdirSync(out, {recursive:true}); +const root = new URL('../', import.meta.url); +const assetVersion=crypto.createHash('sha256').update(['public/app.js','public/styles.css','public/setup.css'].map(name=>fs.readFileSync(new URL(name,import.meta.url),'utf8')).join('\n')).digest('hex').slice(0,12); +export const esc = s => String(s).replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); +const slug = s => s.toLowerCase().replace(/<[^>]+>/g,'').replace(/[^a-z0-9\s-]/g,'').trim().replace(/\s+/g,'-'); +const icons = { + aws:'', + azure:'', + arrow:'' +}; +const card = (url,kicker,title,text,icon='')=>`${icon?icons[icon]:''}${kicker}${icons.arrow}

${title}

${text}

Explore this path
`; +const tableRows = (text, heading) => { + const section = text.split('## '+heading+'\n')[1]?.split('\n## ')[0]; + if(!section) throw new Error('Missing permissions section '+heading); + return section.split('\n').filter(l=>l.startsWith('|')).slice(2).map(l=>l.split('|').slice(1,-1).map(v=>v.trim().replaceAll('`',''))); +}; +const azure = fs.readFileSync(new URL('install/azure.md',root),'utf8'); +const rbac = tableRows(azure,'Azure RBAC roles'); +const graph = tableRows(azure,'Microsoft Graph application permissions'); +const mde = tableRows(azure,'Microsoft Defender for Endpoint application permissions'); +const permissions = [ + {provider:'AWS',plane:'Connector · base',name:'SecurityAudit',scope:'Selected AWS account',why:'Read security configuration and audit metadata.',boundary:'Base CloudFormation and manual profile; no unrestricted service-data reading.'}, + {provider:'AWS',plane:'Connector · base',name:'ce:GetCostAndUsage',scope:'Cost Explorer API',why:'Read cost-and-usage data for cost analysis.',boundary:'Included by the CloudFormation stack as one inline read action.'}, + {provider:'AWS',plane:'Connector · optional',name:'AmazonEC2ContainerRegistryReadOnly',scope:'Approved ECR resources/account',why:'Read ECR evidence where required.',boundary:'Manual guide option; not in the base CloudFormation template. Includes image-pull permissions; review data exposure.'}, + ...rbac.map(([name,scope,why])=>({provider:'Azure',plane:'Azure RBAC',name,scope,why,boundary:/Billing|Management Group|Kubernetes|App Configuration/.test(name)?'Conditional: review the role-specific scope; not a blanket subscription grant for every role.':'Scoped to the customer-approved installation boundary.'})), + ...graph.map(([name,why])=>({provider:'Azure',plane:'Microsoft Graph',name,scope:'Tenant-wide · application permission',why,boundary:'Requires authorized admin consent. Product licensing and telemetry availability still apply.'})), + ...mde.map(([name,why])=>({provider:'Azure',plane:'Defender for Endpoint',name,scope:'Tenant-wide · application permission',why,boundary:'Requires authorized admin consent and endpoint data in the customer tenant.'})) +]; +const manifest = ['transilience-security-audit.yaml','azure-compliance.sh'].map(name=>{ + const bytes = fs.readFileSync(new URL('artifacts/'+name,import.meta.url)); + return {name,sha256:crypto.createHash('sha256').update(bytes).digest('hex'),bytes:bytes.length,reviewed,upstream:'https://transiliencepublic.s3.us-east-1.amazonaws.com/cloudformation-templates/'+(name.endsWith('.sh')?'install-scripts/':'')+name}; +}); + +const widgets = { + 'aws-paths':()=>`
${card('/aws/cloudformation/','Recommended','CloudFormation','Review one stack, launch your private connection link, and verify the result.','aws')}${card('/aws/manual/','Console walkthrough','Manual AWS setup','Create the provider, role, and explicit trust conditions in your own account.','aws')}
`, + 'azure-paths':()=>`
${card('/azure/cloud-shell/','Recommended','Cloud Shell installer','Inspect the script, choose your scope, and run the customer-specific command.','azure')}${card('/azure/manual/','Console walkthrough','Manual Azure setup','Approve the application, Azure roles, and API consent step by step.','azure')}
`, + planner:()=>`
01 — Choose your path

Let’s make this straightforward.

Planning only. No cloud API calls. No credentials collected.

`, + engineer:()=>`
Optional — Human access

Prepare an engineer-access request.

This creates a local, non-secret request for your AWS administrator. It does not send email, create a user, or assign permissions.

Fields stay in this page’s memory, not local storage. Downloads remain on your device. No password or access key belongs here.

`, + checklist:()=>`
Local checklist — Not a live health check

Finish with evidence, not assumptions.

Only completion flags are saved on this device. Reset before another customer. Verify live status in the authenticated Transilience workspace.

`, + troubleshooting:()=>`
${problems.map(([cloud,title,answer,link])=>`
${cloud}${title}

${answer}

Open the relevant guide →
`).join('')}
`, + downloads:()=>`
${manifest.map(m=>`
${m.name.endsWith('.sh')?'Azure · Bash installer':'AWS · CloudFormation'}

${m.name.endsWith('.sh')?'Azure installer':'AWS audit-role stack'}

Production review snapshot · ${Math.ceil(m.bytes/1024)} KB

Download ${m.name.endsWith('.sh')?'script':'YAML'} ↓
Inspect SHA-256 fingerprint${m.sha256}
`).join('')}
Download the snapshot manifest (.json) ↓` +}; +const permissionsWidget = ()=>`
${rbac.length}Azure role types
${graph.length}Graph permissions
${mde.length}Defender permissions

${permissions.length} permission entries

${permissions.map(p=>``).join('')}
Permission / roleScopeWhy it is requested
${p.provider} · ${p.plane}${esc(p.name)}${esc(p.scope)}${esc(p.why)}${esc(p.boundary)}
`; + +const permissionPage = {path:'/permissions/', title:'Every permission. A reason.',description:'Search the actual onboarding manifest. See the scope, purpose, and boundary before approving access.',label:'Review · permission explorer',widget:'permissions',body:` +## Read the profile, not just “read-only” + +AWS CloudFormation and manual setup have a shared audit core, but their optional evidence permissions differ. The Azure full-evidence profile combines resource-scoped RBAC with tenant-wide app-only consent. The table above is generated from the source Azure guide, not a shortened marketing list. + +The 12 Azure role types include conditional grants: Management Group Reader only for that installation model, Billing Reader only for supplied billing scopes, and AKS/App Configuration data roles only on discovered relevant resources. This is **not** a promise that every role is assigned in every environment. + +## Permissions do not create data + +Licensing, retention, diagnostic settings, workspace configuration, and endpoint onboarding determine which evidence exists. Record data that is unavailable separately from access that was denied. Validate both in the [connection checks](/verify/). + +## Review current upstream definitions + +AWS and Microsoft may change managed policy and role definitions. Review them at approval time. This portal records the documented Transilience request, not a frozen definition of every cloud provider action. + +- [AWS SecurityAudit](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/SecurityAudit.html) +- [AWS ReadOnlyAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/ReadOnlyAccess.html) +- [AWS ViewOnlyAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/ViewOnlyAccess.html) +- [Microsoft Graph permissions](https://learn.microsoft.com/en-us/graph/permissions-reference) +- [Azure built-in roles](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles) +- [Defender for Endpoint APIs](https://learn.microsoft.com/en-us/defender-endpoint/api/exposed-apis-list) +`}; +widgets.permissions = permissionsWidget; + +const linkMap = Object.fromEntries(sourcePages.map(p=>[p.file,p.path])); +linkMap['install/aws.md']='/aws/'; +function renderMarkdown(md,file) { + md=md.replace(/^# .+\n/,''); + md=md.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(_,alt,url)=>{ + const resolved=path.posix.normalize(path.posix.join(path.posix.dirname(file||'install/azure.md'),url)); + const safe=resolved.startsWith('assets/')&&screenshotAssets.includes(resolved.slice(7)); + return safe?`
${esc(alt)}
${esc(alt)} · navigation reference only
`:`

Console navigation reference: ${esc(alt)} ↗. This source screenshot is not embedded; use your approved values, not screenshot examples.

`; + }); + md=md.replace(/\[([^\]]+)\]\(([^)]+\.md)(#[^)]*)?\)/g,(_,title,url,hash='')=>{ + const resolved=path.posix.normalize(path.posix.join(path.posix.dirname(file||'install/azure.md'),url)); + return `[${title}](${linkMap[resolved]||repo+'/blob/'+sourceCommit+'/'+resolved}${hash})`; + }); + const headings=[]; const counts=new Map(); + const renderer=new marked.Renderer(); + renderer.heading=function({tokens,depth}){ + const text=this.parser.parseInline(tokens);let id=slug(text);const n=counts.get(id)||0;counts.set(id,n+1);if(n)id+='-'+n; + if(depth===2)headings.push({text:text.replace(/<[^>]+>/g,''),id}); + return `${text}#`; + }; + const html=marked.parse(md,{renderer,gfm:true}).replace(//g,'
').replace(/<\/table>/g,'
'); + return {html,headings}; +} +const brand = `transiliencecloud onboarding`; +const allPages=[...sourcePages,...customPages,permissionPage]; +const nav = active=>groups.map(([label,links])=>``).join(''); +function shell(p,content,toc=[]){ +return `${esc(p.title)} | Transilience cloud onboarding
${brand}
${content}
${toc.length?``:''}

Find your next step.

Search runs locally. No queries leave your browser. Esc to close.

`; +} +const home = {path:'/',title:'Connect your cloud.',description:'Choose AWS or Azure, pick Audit, Logs or Both, then install and verify with screenshots.'}; +function writeRoute(url,html){const dir=new URL('.'+url,out);fs.mkdirSync(dir,{recursive:true});fs.writeFileSync(new URL('index.html',dir),html);} +writeRoute('/',shell(home,simpleHomeHTML)); +const searchIndex=[{url:'/',title:home.title,description:home.description,text:'Cloud onboarding start AWS Azure recommended path'}]; +for(const p of allPages){ + let md=p.file?fs.readFileSync(new URL(p.file,root),'utf8'):p.body; + const {html,headings}=renderMarkdown(md,p.file); + const label=p.label||p.cloud; + const source=p.file?`
Source-backed guideView original in Git ↗
`:''; + const caution=p.file?`
Use your approved customer-specific values. This public guide cannot issue tokens or connect an account. Never paste a cloud secret or connection token here. Embedded screenshots are navigation references, not live connection evidence.
`:''; + const body=`
${label}

${p.title}

${p.description}

${source}${p.widget?widgets[p.widget]():''}${caution}
${html}
${p.path==='/verify/'?'Finish with a live check':'Keep moving'}

${p.path==='/verify/'?'Verify in your authenticated workspace.':'Make the next step a confident one.'}

${p.path==='/verify/'?'Troubleshoot a missing signal':'Verify the connection'} →
`; + const simple=setupRoutes[p.path]; + const rendered=simple?`${setupGuide(p.path)}
Complete technical reference, advanced permissions & revocation${source}
Reference includes broader access profiles. Follow the permission bucket selected above. Do not grant every role or API permission in this reference for a narrow Audit or Logs approval.
${caution}
${html}
`:body; + writeRoute(p.path,shell(simple?{...p,title:simple.title}:p,rendered,simple?[]:headings)); + searchIndex.push({url:p.path,title:simple?.title||p.title,description:p.description,text:((simple?setupGuide(p.path).replace(/<[^>]+>/g,'')+' ':'')+md.replace(/<[^>]+>/g,'').replace(/[#*`|]/g,'')).slice(0,50000)}); +} +const notFound={path:'/404/',title:'Let’s get you back on the right path.',description:'This onboarding guide could not be found.'}; +fs.writeFileSync(new URL('404.html',out),shell(notFound,`
404 — Guide not found

${notFound.title}

The address may have changed. Start with a cloud or search the guides.

Back to onboarding →
`)); +for(const name of ['app.js','styles.css','setup.css','favicon.svg','_headers'])fs.copyFileSync(new URL('public/'+name,import.meta.url),new URL(name,out)); +fs.cpSync(new URL('public/screenshots/',import.meta.url),new URL('screenshots/',out),{recursive:true}); +for(const file of screenshotAssets){ + const target=new URL('screenshots/'+file,out);fs.mkdirSync(new URL('.',target),{recursive:true}); + fs.copyFileSync(new URL('assets/'+file,root),target); +} +fs.mkdirSync(new URL('downloads/',out),{recursive:true}); +for(const m of manifest)fs.copyFileSync(new URL('artifacts/'+m.name,import.meta.url),new URL('downloads/'+m.name,out)); +fs.writeFileSync(new URL('downloads/manifest.json',out),JSON.stringify({sourceCommit,reviewed,artifacts:manifest},null,2)); +fs.writeFileSync(new URL('search-index.json',out),JSON.stringify(searchIndex)); +fs.writeFileSync(new URL('permissions.json',out),JSON.stringify({sourceCommit,rbacCount:rbac.length,graphCount:graph.length,mdeCount:mde.length,permissions},null,2)); +fs.writeFileSync(new URL('robots.txt',out),`User-agent: *\nAllow: /\nSitemap: ${origin}/sitemap.xml\n`); +fs.writeFileSync(new URL('sitemap.xml',out),`${[home,...allPages].map(p=>`${origin+p.path}`).join('')}`); +console.log(`Built ${allPages.length+1} pages; ${permissions.length} permission entries (${graph.length} Graph, ${mde.length} Defender, ${rbac.length} Azure roles); ${manifest.length} verified review artifacts.`); diff --git a/site/content.mjs b/site/content.mjs new file mode 100644 index 0000000..4ccd131 --- /dev/null +++ b/site/content.mjs @@ -0,0 +1,291 @@ +export const sourceCommit = '079477426ae1df1a94f9ff43472826ba16e281c9'; +export const reviewed = '14 October 2026'; +export const origin = 'https://cloudonboarding.transilience.dev'; +export const repo = 'https://github.com/transilienceai/docs'; +export const groups = [ + ['Get started', [['/', 'Connect your cloud']]], + ['Cloud · AWS', [['/aws/cloudformation/', 'CloudFormation'], ['/aws/manual/', 'Manual setup'], ['/aws/organization/', 'Multiple accounts'], ['/aws/user-access/', 'Engineer access']]], + ['Cloud · Azure', [['/azure/cloud-shell/', 'Cloud Shell / script'], ['/azure/manual/', 'Manual setup']]], + ['Help & reference', [['/verify/', 'Verify connection'], ['/troubleshooting/', 'Troubleshooting'], ['/permissions/', 'Permissions'], ['/downloads/', 'Templates & scripts'], ['/security/', 'Security & revocation']]] +]; +export const sourcePages = [ + {path:'/aws/cloudformation/',title:'Connect AWS with CloudFormation',description:'Review the stack. Launch your customer-specific connection. Verify the result.',file:'install/aws-cloudformation.md',cloud:'AWS',label:'Recommended · automated',next:'/verify/'}, + {path:'/aws/manual/',title:'Connect AWS, step by step',description:'Create the OIDC provider and scoped audit role in your own AWS console.',file:'install/aws-manual-onboarding.md',cloud:'AWS',label:'Manual · console',next:'/verify/'}, + {path:'/azure/cloud-shell/',title:'Connect Azure with Cloud Shell',description:'One dedicated app, explicit scopes, and an inspectable record of every grant.',file:'install/azure.md',cloud:'Azure',label:'Recommended · automated',next:'/verify/'}, + {path:'/azure/manual/',title:'Connect Azure, step by step',description:'Create the app, assign Azure roles, and consent to the approved API permissions.',file:'install/azure-subscriptions-and-logs.md',cloud:'Azure',label:'Manual · console',next:'/verify/'} +]; +export const customPages = [ +{path:'/plan/',title:'Your cloud. Your scope. Your plan.',description:'Choose a path before you grant access. Nothing here connects to your cloud or sends your information.',label:'Interactive planner',widget:'planner',body:` +## A connection that fits your environment + +Automated installation and manual setup lead to the same objective: approved evidence access in the right customer organization. They do not necessarily grant identical permissions. Review the selected method’s access profile before installing. + +### Bring these to the installation + +- Your customer organization in Transilience, and a current connection link or command from **Integrations** or your authorized Transilience contact. +- The AWS account IDs or Azure tenant and subscription IDs that you have approved for assessment. +- An administrator who can create the connector identity and approve its permissions. Azure may require two administrators with different responsibilities. +- Your data-access approval and a named owner for credential rotation and offboarding. + +### Keep human and service access separate + +The assessment connector is a service identity. If an engineer also needs interactive access, use the separate [AWS engineer-access guide](/aws/user-access/) and an individually approved work email. A human login does not replace the connector. + +### Know where the boundary is + +This public portal is documentation, not a credential broker. It cannot create a tenant-specific connection token, verify a live installation, or receive cloud secrets. The planner stays in your browser. Installation and verification happen in your cloud account and your authenticated Transilience workspace. +`}, +{path:'/aws/',title:'Connect AWS with confidence.',description:'A short-lived identity for the platform. An explicit scope for your accounts. You stay in control.',label:'Amazon Web Services',widget:'aws-paths',body:` +## Choose how you connect + +**CloudFormation is the preferred Managed Compliance path.** Start from the customer-specific Quick Create link, not a generic template URL. The stack grants SecurityAudit plus the single Cost Explorer read action, and registers the connection with Transilience. + +Prefer to approve each console action? The manual path creates the OIDC provider and audit role yourself. Its guide includes optional ECR read access when that evidence is in scope; it is not identical to the base CloudFormation profile. + +## Understand the identity model + +Customer AWS account → account-local OIDC provider → dedicated audit role → approved Transilience workload. The documented connector uses Modal-issued OIDC tokens exchanged for short-lived AWS credentials. Hosting these instructions on Cloudflare does **not** change that workload identity or its trust policy. + +No IAM user or long-lived AWS access key is required for the automated assessment connector. Only the installer needs permissions to create the approved IAM, OIDC, Lambda, and CloudFormation resources. Transilience’s audit role does not inherit the installer’s administrative permissions. + +## One account or an organization? + +The base stack assesses the account where it is deployed. It does not silently enroll your AWS Organization. Read the [multi-account design](/aws/organization/) before deploying a central-security-account setup. + +## Need to give a person access too? + +Use [Invite an engineer](/aws/user-access/) for an individual work-email invitation, account assignment, and permission-set selection. This is optional and separate from the platform connector. +`}, +{path:'/aws/organization/',title:'Make every account boundary explicit.',description:'Select a multi-account design that is easy to approve, inspect, and revoke.',label:'AWS · organization design',body:` +## Choose an account model + +| Model | Where the role lives | What you must approve | +|---|---|---| +| Standalone | In the assessed account | Its account-local provider, trust conditions, and audit policy. | +| Direct role in each account | A dedicated role and OIDC provider in every approved account | The exact account list and a reviewed deployment in each. | +| Central security account | The OIDC entry role in the central account; separate audit roles in approved members | Both sides of each trust relationship and an explicit list of member-role ARNs. | + +## Direct account-by-account enrollment + +1. Record every approved 12-digit account ID and the regions to assess. +2. Obtain the right customer-specific onboarding link for the selected design. +3. Deploy and verify one account first; then enroll the remaining approved accounts. +4. Record the role ARN and integration status for each account, not just a total. +5. Confirm an initial evidence run in each account. A connected management account does not prove member coverage. + +The base CloudFormation template does not create a StackSet or member-account roles automatically. Do not assume that enabling AWS Organizations discovery grants assessment access everywhere. + +## Central security-account enrollment + +The entry role needs an explicit permission to assume each approved member role. Each member must trust the exact approved central role. Use the [manual guide’s central-account policy examples](/aws/manual/#5-configure-multi-account-access-when-required) and replace all placeholders with reviewed values. + +Avoid wildcard member-role resources. Review service control policies, permissions boundaries, role trust, and session restrictions. An allow in one policy is not proof that effective access exists. + +## Keep a coverage register + +Track account ID, owner, environment, regions, role ARN, onboarding method, permission profile, last successful collection, and offboarding owner. Label excluded accounts explicitly. Send this non-secret register through your approved collaboration channel; never include tokens or session credentials. +`}, +{path:'/aws/user-access/',title:'Invite an engineer. Not a shared identity.',description:'Give an approved person the access they need—without sharing passwords, access keys, or your administrator account.',label:'AWS · optional human access',widget:'engineer',body:` +## Recommended: AWS IAM Identity Center + +This human-access path is separate from the OIDC assessment connector. Use a named Transilience engineer’s approved work email. Your administrator creates or provisions the person; this portal does not send an invitation or grant access. + +1. In **IAM Identity Center → Settings**, confirm your identity source. For an external identity provider, provision the engineer through that provider’s approved process instead of creating a duplicate local user. +2. For the built-in Identity Center directory, open **Users → Add user**, enter the individual’s email, and select AWS’s email invitation option. AWS—not this website—sends the setup email. Current AWS documentation specifies a seven-day invitation window. +3. Put the engineer in a customer-approved group. Assign that group only to the selected AWS accounts and a reviewed permission set. Use a short session duration, for example one hour. +4. Require MFA through the configured identity source. Validate effective access with the engineer before marking the request complete. + +[AWS user invitations](https://docs.aws.amazon.com/singlesignon/latest/userguide/addusers.html) · [Account and permission-set assignments](https://docs.aws.amazon.com/singlesignon/latest/userguide/assignusers.html) + +## Choose the least access that answers the question + +| Profile | Appropriate use | Important boundary | +|---|---|---| +| SecurityAudit | Security configuration and posture review | Recommended starting point; not an unrestricted log or data reader. | +| ViewOnlyAccess | Basic resource visibility | Intentionally narrower; may not support a full assessment. | +| ReadOnlyAccess | Broader investigation approved by the customer | Can expose service data and sensitive content; review every allowed service. | + +AWS-managed policies evolve. Review their current policy JSON and the permission set’s effective policies, including boundaries and account controls. Do not grant AdministratorAccess as a shortcut. Add narrowly scoped log, billing, or ECR permissions only after a separate need-and-scope review. + +[AWS IAM access best practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) · [SecurityAudit policy](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/SecurityAudit.html) + +## Exception: an IAM console-only user + +Use this only when your customer cannot use federation and has approved the exception. IAM user creation is **not** an email invitation workflow. + +1. Create one named IAM user for the approved person; use your naming standard and approved read-only group/policy. +2. Enable console access, require password change at next sign-in, and require MFA before routine use. Do not create an access key. +3. Deliver the console sign-in URL and temporary password through separate approved secure channels. Never put the password in email, this portal, a Slack message, or the access-request download. +4. Set an expiry/review date and record the exception owner. Disable the user when the engagement ends, remove any access keys, and review outstanding sessions. + +The email in the request identifies the intended person; assigning an email-shaped IAM username does not make AWS send that person an invitation. + +[AWS console-password administration](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_admin-change-user.html) + +## Revoke and review + +Remove account/permission-set assignments and group membership when the engagement ends. For an external identity provider, remove the source identity’s access as well. Handle active sessions according to your incident/offboarding policy; deleting a user or password is not a blanket guarantee that all issued credentials are invalidated immediately. +`}, +{path:'/azure/',title:'Bring Azure into view.',description:'Resource posture, identity, endpoint, and log evidence—with the grants laid out before you begin.',label:'Microsoft Azure',widget:'azure-paths',body:` +## Choose your installation path + +The guided Cloud Shell installer creates a dedicated, single-tenant **Transilience Managed Compliance** application. The manual guide walks your administrators through the same categories of access in the Azure and Entra consoles. + +The documented full-evidence profile is **azure-full-evidence-v1** with **--entra**. Azure RBAC is scoped to the subscriptions or management group you select; Graph and Defender for Endpoint application permissions are tenant-wide and require admin consent. These are different approval boundaries. + +## Decide scope before running the installer + +By default, the guided installer discovers every enabled subscription visible to the signed-in administrator. Narrow it deliberately with the supported subscription-list or management-group options. Verify the intended tenant before creating an application. + +An Entra consent administrator may not have Azure RBAC assignment rights, and a subscription Owner may not be able to consent to Graph permissions. Agree the split of responsibilities in advance. Partial grants must be recorded as partial coverage, not a fully healthy connection. + +## What you will review + +- **Azure roles:** resource inventory, Defender for Cloud, monitoring, backup, Key Vault metadata, cost, Log Analytics, and Sentinel reading. Conditional roles apply only to the relevant management groups, billing scopes, AKS clusters, and App Configuration stores. +- **Microsoft Graph:** identity, policies, sign-ins, audit, risk, Intune, and security evidence. These are app-only permissions, not delegated access to the installing administrator. +- **Defender for Endpoint:** endpoint, vulnerability, software, score, recommendation, and alert evidence. +- **A dedicated application credential:** a one-year secret in the current installer. Track expiry and use only the approved secure handoff. + +Use the [permission explorer](/permissions/#azure-permissions) to search the complete permission manifest. Read-only evidence may include personal data, logs, and configuration values; treat approval as a data-access decision, not just a no-write guarantee. + +## Access is not the same as telemetry + +Granting API permissions does not license a product, onboard endpoints, create a Sentinel workspace, or configure diagnostic export. [Verify evidence coverage](/verify/) after connecting and record unlicensed, unconfigured, or excluded data sources explicitly. +`}, +{path:'/verify/',title:'Connected is a milestone. Evidence is the proof.',description:'Check deployment, registration, effective permissions, and the first real collection independently.',label:'Finish · verification',widget:'checklist',body:` +## AWS: four independent checks + +1. **Deployment:** the CloudFormation stack is CREATE_COMPLETE, or the manually created provider and role exist in the correct account. +2. **Trust and permissions:** the provider is account-local; audience and approved workspace subject conditions are present; audit and any separately approved optional policies match the intended profile. +3. **Registration:** Transilience Integrations shows the correct account ID and role ARN, with a successful onboarding status. Manual setup requires the approved non-secret role-ARN handoff and registration. +4. **Evidence:** request an initial collection in the authenticated Transilience workspace. Confirm collection time, account, region, source coverage, and any access-denied errors. The public portal cannot perform that test for you. + +### Read-only identity sanity check + +Run in your **customer administrator’s own** approved CLI session. This checks the identity you are currently using; it does not test Transilience’s OIDC role assumption or grant access. + +~~~bash +aws sts get-caller-identity --query '{Account:Account,Arn:Arn}' --output json +~~~ + +## Azure: prove each evidence plane + +1. **Tenant and identity:** verify the tenant ID, application/client ID, service principal, and selected subscriptions against your approved scope. +2. **Azure RBAC:** inspect role assignments at each approved subscription, management group, and any explicitly supplied workspace or billing scope. +3. **Consent:** inspect the Application permissions and Granted status for Microsoft Graph and Defender for Endpoint. Permission names alone do not prove consent succeeded. +4. **Registration and credential:** confirm secure callback receipt or approved secret handoff, integration status, and a recorded rotation owner and expiry. +5. **Evidence:** validate resource counts, security posture, identity/log data, endpoint evidence, and timestamps. Empty results can mean no data, no licence, missing configuration, wrong scope, or insufficient effective permissions. + +### Read-only tenant sanity check + +~~~bash +az account show --query '{tenantId:tenantId,subscriptionId:id,name:name}' --output json +~~~ + +This checks the signed-in administrator’s current context, not the app’s effective access. Never print an access token or client secret as a diagnostic step. + +## Record a useful handoff + +Keep the non-secret account/tenant IDs, approved scopes, role ARN or app ID, permission profile, installation time, first successful collection time, missing evidence, rotation owner, and offboarding owner. Do not include passwords, access tokens, session credentials, or the secret-bearing Azure credentials file. + +## A checklist is not a live health test + +The checklist on this page stores only local completion flags. It never calls AWS, Azure, or the Transilience backend. Clear it when starting a different customer’s setup. The authenticated workspace remains the source for live connection and collection status. +`}, +{path:'/troubleshooting/',title:'Find the boundary. Fix the cause.',description:'Use the first failed step to narrow the problem. Don’t add broad permissions just to make an error disappear.',label:'Support · troubleshooting',widget:'troubleshooting',body:` +## Bring a clean support bundle + +Include provider, onboarding method, non-secret account/tenant identifiers, approved scope, stack ID or app ID, first error with timestamp, and the non-secret install manifest. Redact tokens, secrets, authorization headers, customer log contents, and personal data not needed to investigate. + +## Do not “fix” these with AdministratorAccess + +An access-denied error can come from an account control policy, missing scope, wrong identity, role trust, missing consent, or a product with no configured data. More permissions in the wrong place do not solve an identity or registration problem. + +## Need a fresh connection link? + +Use the authenticated Transilience workspace or your authorized contact to obtain one. Do not recycle another customer’s Quick Create link, invent a callback URL, or paste a one-time connection token into this site. +`}, +{path:'/security/',title:'An access model you can explain.',description:'Know what is granted, where secrets belong, and how to turn access off.',label:'Trust · security & revocation',body:` +## The portal does not collect credentials + +This is a static documentation site. Planner selections and access-request fields stay in the current browser page. Only optional checklist completion flags and display preferences are stored locally. There are no credential fields, analytics SDKs, contact-form submissions, or backend installers here. + +Generated access requests contain only the non-secret fields you choose to include. Review the file before sharing it. An email address identifies an engineer; it is not a secret transport or proof of approval. + +## Three distinct trust boundaries + +| Boundary | Identity | Approval and revocation | +|---|---|---| +| AWS assessment connector | Dedicated role with approved Modal OIDC trust | Customer controls role, trust conditions, and policies. Delete the stack or revoke the dedicated role/trust. | +| Azure assessment connector | Dedicated, single-tenant Entra application | Customer controls scoped Azure roles, tenant-wide API consent, and app credential. Remove app and residual assignments. | +| Optional engineer access | Individually approved human identity | Customer controls IdP/Identity Center invitation, MFA, account assignments, session limits, and offboarding. | + +The source onboarding documents describe the Managed Compliance connector. Moving this website to Cloudflare does not migrate a connector runtime, replace an OIDC issuer, or change the organization that can assume a role. + +## Read-only does not mean low sensitivity + +Inventory can expose network layout and identities. Logs may contain personal data. Broad AWS ReadOnlyAccess may expose service data. Azure App Configuration Data Reader can read configuration values. Key Vault Reader is for metadata, not secret values. Approve the evidence required for the use case and document exclusions. + +## AWS offboarding + +For the stack-based path, delete only the verified customer stack. The documented template removes its dedicated role and registration resources and sends a disconnect callback. The shared OIDC provider is intentionally retained: do not remove it until you have checked other dependencies. For a manual setup, revoke/remove the dedicated role and its policies, then confirm disconnected status and that a new collection cannot authenticate. + +Handle active AWS sessions according to your security policy; changing a role or deleting a password does not imply every previously issued credential is immediately unusable. + +## Azure rotation and offboarding + +The current installer creates a one-year client secret. Record expiry and an owner. Rotate via the approved connection workflow before expiry; verify a new successful collection before retiring the old credential. Do not rerun or improvise secret-reset commands without checking the effect on the existing integration. + +To offboard, remove the dedicated app registration/service principal, remove any residual Azure RBAC assignments, and verify the integration is disconnected and subsequent authentication fails. Request a reviewed tenant-scoped uninstall command if using the installer’s uninstall path. + +## Keep secrets out of support channels + +Never email or paste a client secret, ConnectToken, session token, password, or AWS access key. The Azure credentials JSON is secret-bearing even if its filename looks like a normal report. The installation manifest is non-secret, but still inspect it before sharing. Use only the secure handoff channel supplied for your organization. +`}, +{path:'/downloads/',title:'Inspect first. Install with intent.',description:'Review the production template and installer. Keep customer-specific connection values in the approved workflow.',label:'Resources · templates & scripts',widget:'downloads',body:` +## These are review snapshots, not generic connection links + +The downloadable files are byte-for-byte snapshots of Transilience’s publicly hosted production assets fetched on 14 October 2026. Each has a SHA-256 fingerprint. They contain installation logic, not your organization’s connection token. Compare the upstream asset again before a new deployment; production code can change. + +### AWS CloudFormation + +Review the YAML and its IAM trust/policies. To install, start with the customer-specific Quick Create link from Integrations so the organization, one-time token, and callback are correct. Do not upload this template with guessed connection values. + +[Current upstream template](https://transiliencepublic.s3.us-east-1.amazonaws.com/cloudformation-templates/transilience-security-audit.yaml) · [Installation guide](/aws/cloudformation/) + +### Azure Cloud Shell script + +Download and inspect the Bash installer; do not pipe unfamiliar remote code straight into a shell. The full-evidence profile includes Azure roles and tenant-wide application consent, and it creates a dedicated app secret. Run only the exact reviewed customer-specific command and approved scope. The script is for **Azure Cloud Shell Bash**, not a PowerShell session. + +[Current upstream installer](https://transiliencepublic.s3.us-east-1.amazonaws.com/cloudformation-templates/install-scripts/azure-compliance.sh) · [Cloud Shell guide](/azure/cloud-shell/) + +### Review a downloaded file’s fingerprint + +~~~bash +# macOS +shasum -a 256 transilience-security-audit.yaml +shasum -a 256 azure-compliance.sh +# Linux / Azure Cloud Shell +sha256sum transilience-security-audit.yaml azure-compliance.sh +~~~ + +Compare the output to the fingerprints above. A matching fingerprint confirms the snapshot’s bytes, not that permissions are appropriate for your account. + +## Prefer a manual installation? + +Follow the [AWS console procedure](/aws/manual/) or [Azure portal procedure](/azure/manual/) instead. All trust-policy placeholders must be replaced with current approved values; never copy example tenant or workspace IDs from screenshots. +`} +]; + +export const problems = [ + ['AWS','Stack failed or rolled back','Open CloudFormation Events and find the first CREATE_FAILED resource. Check installer IAM/Lambda rights, named-IAM acknowledgement, SCPs, and an existing failed stack. For ROLLBACK_COMPLETE, delete only that failed stack and obtain a fresh customer-specific link.','/aws/cloudformation/'], + ['AWS','Stack complete, integration disconnected','Inspect OnboardingStatus and the registration error. Compare AccountId and RoleArn with the intended account. Refresh Integrations. Share the stack ID and redacted first error, never the ConnectToken.','/aws/cloudformation/'], + ['AWS','OIDC or AssumeRoleWithWebIdentity denied','Verify the account-local provider ARN, audience, current approved workspace subject, and effective policy controls. Do not remove trust conditions or use a wildcard-only subject to bypass the failure.','/aws/manual/'], + ['AWS','Only the management account has evidence','A base stack does not deploy member roles. Compare your approved account list with installed roles and successful per-account collections. Review both sides of central-to-member trust.','/aws/organization/'], + ['AWS','The engineer did not receive an invitation','Confirm the Identity Center identity source and exact work email. An external IdP uses its own provisioning flow. An IAM console-only user does not receive an Identity Center invitation merely because its username is an email address.','/aws/user-access/'], + ['Azure','Admin consent is incomplete','Use an authorized Entra consent administrator. Inspect Application (not Delegated) permissions and Granted status for Graph and Defender for Endpoint. Keep partial grant results; repair only the missing approvals.','/azure/manual/'], + ['Azure','Subscription roles are missing','Check the signed-in administrator’s role-assignment rights at every approved scope. Entra administration alone does not confer Azure RBAC rights. Check deny assignments and inherited scope.','/azure/cloud-shell/'], + ['Azure','Callback or secure handoff failed','Inspect the non-secret install manifest and callback error. The owner-readable credentials file remains in Cloud Shell and contains a secret: transfer it only through the approved secure channel. Do not attach it to support tickets.','/azure/cloud-shell/'], + ['Azure','Connected but no endpoint, Sentinel, or sign-in data','Check the correct tenant/workspace, effective grants, product licensing, endpoint onboarding, diagnostic configuration, and time range. An API permission alone does not create telemetry.','/verify/'], + ['Azure','App credential expired','Use the approved rotation workflow, verify a new collection, then retire the old credential. Never post the replacement secret in email or Slack.','/security/'] +]; diff --git a/site/deployment.json b/site/deployment.json new file mode 100644 index 0000000..cff7172 --- /dev/null +++ b/site/deployment.json @@ -0,0 +1,43 @@ +{ + "provider": "Cloudflare Pages", + "account": "TransilienceAI", + "accountId": "a67cd8e63ae24260ddecdcbadd4910aa", + "project": "transilience-cloud-onboarding", + "productionBranch": "main", + "domain": "cloudonboarding.transilience.dev", + "pagesDomain": "transilience-cloud-onboarding.pages.dev", + "dns": { + "type": "CNAME", + "name": "cloudonboarding.transilience.dev", + "target": "transilience-cloud-onboarding.pages.dev", + "proxied": true + }, + "workflow": { + "install": "cd site && npm ci --ignore-scripts", + "validate": "npm run build && npm test && node --check public/app.js", + "localPreview": "npm run preview", + "deploy": "npm run deploy", + "authentication": "Use an already authorized Wrangler session or a narrowly scoped Cloudflare Pages deployment token. Never commit a credential.", + "automaticDeployments": false, + "ci": "The GitHub workflow validates and uploads the static Pages artifact; production publication is explicit." + }, + "boundaries": { + "staticOnly": true, + "workerFunctions": false, + "durableObjects": false, + "credentialCollection": false, + "customerProvisioning": false, + "emailSending": false, + "localOnlyQA": "test/responsive-preview.html is served only by the local preview server and is excluded from dist." + }, + "maintenance": [ + "The simple setup pages follow Permissions → Install → Verify; source install guides and installer snapshots remain unchanged.", + "Audit, Logs and Both are instruction buckets, not backend permission overrides. Automated logs-only limitations must remain visible.", + "Publish only the reviewed screenshot allowlist in guides.mjs; review screenshots.json before changing it.", + "Review changes to the source install guides and update sourceCommit in content.mjs when adopting a newer reviewed baseline.", + "Refresh public production installer snapshots only after reviewing their trust model, permission manifest, and callback behavior.", + "Run all checks and desktop/mobile browser QA before publishing.", + "Verify the custom-domain HTTPS response, security headers, download hashes, and actual rendered page after deployment.", + "Do not replace customer-specific connector values with values from screenshots or invent a new workload identity because the portal is hosted on Cloudflare." + ] +} diff --git a/site/guides.mjs b/site/guides.mjs new file mode 100644 index 0000000..6bd0abe --- /dev/null +++ b/site/guides.mjs @@ -0,0 +1,84 @@ +// A short, permission-first view over the unchanged technical source guides. +// These choices describe real installation paths, not a permission-changing API. +export const screenshotAssets = [ + 'aws-manual-onboarding/03-iam-identity-providers.png', + 'aws-manual-onboarding/05-configure-oidc-provider.png', + 'aws-manual-onboarding/08-web-identity.png', + 'aws-manual-onboarding/09-security-audit-policy.png', + 'azure-manual-onboarding/10-reader-role.png', + 'azure-manual-onboarding/12-sentinel-reader.png', + 'azure-manual-onboarding/13-log-analytics-reader.png', + 'azure-manual-onboarding/21-policy-read-all.png', +]; +export const setupRoutes = { + '/aws/cloudformation/': {cloud:'AWS', method:'CloudFormation', title:'AWS · CloudFormation', time:'Automated setup'}, + '/aws/manual/': {cloud:'AWS', method:'Manual', title:'AWS · Manual setup', time:'AWS console'}, + '/azure/cloud-shell/': {cloud:'Azure', method:'Cloud Shell', title:'Azure · Cloud Shell', time:'Bash installer'}, + '/azure/manual/': {cloud:'Azure', method:'Manual', title:'Azure · Manual setup', time:'Azure portal'}, +}; +const image = (file, caption, compact=false) => `
${caption}
${caption}Click to enlarge · example screen, use your own approved values
`; +const awsPolicy = () => image('aws-manual-onboarding/09-security-audit-policy.png','AWS IAM: select SecurityAudit for the Audit bucket. Do not select a FullAccess policy.'); +const azureReader = () => image('azure-manual-onboarding/10-reader-role.png','Azure IAM: select Reader for resource inventory and configuration.'); +const azureLogs = () => image('azure-manual-onboarding/12-sentinel-reader.png','Azure IAM: select Microsoft Sentinel Reader on the approved log workspace.'); +const policyList = (items) => ``; +const panel = (bucket, content) => `
${content}
`; +const note = (heading,body) => `
${heading}

${body}

`; +const link = (url,label,primary=false) => `${label} `; +const code = text => `
${text.replaceAll('&','&').replaceAll('<','<').replaceAll('>','>')}
`; + +function permissions(cloud) { + const audit = cloud==='AWS' + ? [['SecurityAudit','Security configuration, inventory and posture.'],['ce:GetCostAndUsage','CloudFormation adds this single cost-read operation. Manual setup does not add it by default.']] + : [['Reader','Resource inventory and configuration in approved subscriptions.'],['Security Reader','Defender for Cloud security posture and findings.']]; + const logs = cloud==='AWS' + ? [['Scoped S3 reads','Only approved log buckets and prefixes; not every bucket.'],['Scoped CloudWatch Logs reads','Only the approved log groups. KMS decrypt requires a separate, exact-key grant when needed.']] + : [['Log Analytics Reader','Read the approved workspace logs. Review the role’s effective permissions.'],['Microsoft Sentinel Reader','Read security incidents and configuration in the approved workspace.']]; + return panel('audit',policyList(audit)+note('Audit does not mean unrestricted log access.','No broad service-data read policy, administrator access, or response actions are part of this selection.')) + +panel('logs',policyList(logs)+note('Logs only · use the scoped manual path.','The existing automated installers do not provide a true logs-only deployment. Do not use a broader installer and assume it grants only logs.')) + +panel('both',policyList([...audit,...logs])+note('Audit + Logs','Install the audit connection and approve the specific log sources. Identity, endpoint and tenant-wide API access remain separate, explicit approvals.')); +} + +function installAWS(method) { + const start = link('https://transilience.ai/install/aws/','Open AWS installer',true); + const manualLogs = link('/aws/manual/?permissions=logs#install','Set up Logs manually',true); + if(method==='CloudFormation') return panel('audit',`
  1. Open the AWS installer. Use the connection link for your Transilience organization.
  2. In Quick create stack, confirm the AWS account, template, stack name and prefilled company values. Do not change the connection token.
  3. Review the IAM acknowledgement, then choose Create stack.
${start}${link('/downloads/transilience-security-audit.yaml','Review stack YAML')}
${note('Your customer-specific link is required.','This documentation page does not collect the connection token or create a cloud connection. The generic template alone cannot register your account.')}`) + +panel('logs',`

For logs only, use a dedicated OIDC role with explicit bucket, prefix and log-group scope. The standard audit stack always includes SecurityAudit.

${manualLogs}`) + +panel('both',`
  1. Install the Audit stack using your organization’s AWS connection link.
  2. Have your administrator add the approved log-source policy to the connector role. The base stack does not include it.
  3. Review and test each approved S3 prefix and CloudWatch log group.
${start}${link('/aws/manual/?permissions=both#log-permissions','Add scoped log access')}
`); + const identity = `
  1. In IAM → Identity providers → Add provider, choose OpenID Connect. Provider URL: https://oidc.modal.com. Audience: oidc.modal.com.
  2. In IAM → Roles → Create role → Web identity, select that provider and audience. Use a dedicated, customer-approved role name.
  3. Restrict the trust policy to the current Transilience-approved workspace subjects. Keep both audience and subject conditions. Use the exact policy in the technical reference below.
${image('aws-manual-onboarding/05-configure-oidc-provider.png','AWS IAM: choose OpenID Connect, then enter the Modal provider URL and audience.')}`; + const scoped = `

Add only the approved log sources

  1. Agree the exact log bucket names, prefixes, regions, CloudWatch log groups and retention window with Transilience.
  2. Have your administrator review a customer-specific policy: S3 bucket-location and prefix-restricted listing, object reads on the approved prefix, and read/query operations on the approved log groups.
  3. For encrypted objects, approve decrypt access only to the required KMS key, with its key policy and service conditions reviewed.
  4. Register the role ARN and approved source list through your authenticated workspace or authorized Transilience contact. Do not grant ReadOnlyAccess or s3:* as a shortcut.
${note('No universal log policy','A working least-privilege policy depends on your source ARNs, bucket policy, encryption and query method. Obtain the reviewed policy for this connection; this page does not invent wildcard access.')}
`; + // Shared identity and one log target keep IDs unique across the bucket panels. + return identity+panel('audit',`

Attach the Audit permissions

Attach SecurityAudit. Add ECR read access only if explicitly approved; ECR image reading is a separate data-access decision.

${awsPolicy()}`) + +panel('logs',`

Do not attach SecurityAudit for Logs only. Complete the scoped log-access steps below.

`) + +panel('both',`

Attach Audit, then scoped Logs permissions

Attach SecurityAudit, then add the customer-approved log-source policy below.

${awsPolicy()}`) + +``; +} + +function installAzure(method) { + if(method==='Cloud Shell') { + const command=(tier,entra)=>code(`bash azure-compliance.sh --tier ${tier} --${entra?'':'no-'}entra \\\n --scope subscriptions --subscriptions '' --dry-run`); + const shared=`
  1. Open your customer-specific Azure setup command in the authenticated Transilience workspace. Confirm the tenant and approved subscriptions.
  2. In the Azure portal, choose Cloud Shell → Bash. Download and inspect the installer before running it.
  3. Use the selected flags below to review a dry-run plan. Keep the secure callback values from your organization’s command; do not paste them into this website.
${image('azure-cloud-shell.png','Azure portal toolbar: the terminal icon opens Cloud Shell. Choose Bash.',true)}
${link('https://www.transilience.ai/install/azure/','Open Azure installer',true)}${link('/downloads/azure-compliance.sh','Review installer script')}
`; + return shared+panel('audit',`

Audit flags

${command('posture',false)}

Replace the subscription placeholder. Review the plan; remove --dry-run only when approved. Keep --no-entra unless directory access is separately approved.

${azureReader()}`) + +panel('logs',`${note('Switch to manual for Logs only','The script’s --tier logs also grants Reader and Security Reader. It is not a logs-only profile.')}${link('/azure/manual/?permissions=logs#install','Set up Logs manually',true)}`) + +panel('both',`

Audit + Logs flags

${command('logs',false)}

Use --workspace-ids with the approved workspace resource IDs to narrow log-role assignment. Review the dry-run plan; remove --dry-run only when approved.

Optional identity logs: use --entra instead of --no-entra only after a separate administrator approves the tenant-wide Graph application permissions. The extended azure-full-evidence-v1 profile is broader still; review its full manifest before selecting it.

${azureLogs()}`); + } + return `
  1. In the approved tenant, open Microsoft Entra ID → App registrations → New registration. Create Transilience Managed Compliance as a single-tenant app.
  2. Assign the selected permissions to its enterprise service principal at the scopes below. Keep the same application identity throughout.
  3. Record the tenant ID, application ID and approved scopes. Transfer any time-limited client secret only through the secure workspace handoff, never this public page, email or chat.
` + +panel('audit',`

Audit: subscription-scoped roles

In each approved subscription’s Access control (IAM) → Add role assignment, assign Reader and Security Reader to the app.

${azureReader()}`) + +panel('logs',`

Logs: workspace-scoped roles

Open each approved workspace’s Access control (IAM). Assign Log Analytics Reader and, for Sentinel workspaces, Microsoft Sentinel Reader. Do not add subscription-wide audit roles for a logs-only approval.

${azureLogs()}${image('azure-manual-onboarding/13-log-analytics-reader.png','Azure IAM: choose Log Analytics Reader, not a Contributor role.')}`) + +panel('both',`

Both: subscription Audit + workspace Logs

Assign Reader and Security Reader at the approved subscription scopes. Add Log Analytics Reader and Microsoft Sentinel Reader at the approved workspaces.

${azureReader()}${azureLogs()}`) + +note('Entra, Defender and Intune are separate API approvals.','Workspace RBAC does not grant tenant-wide Graph or Defender permissions. If those sources are required, review the exact application permissions and administrator consent in the technical reference. Do not blindly grant the full-evidence profile for a narrow request.'); +} + +function verify(cloud,method) { + const aws=cloud==='AWS'; + const shots=aws&&method==='CloudFormation'?panel('audit',awsPolicy())+panel('both',awsPolicy())+panel('logs',image('aws-manual-onboarding/05-configure-oidc-provider.png','AWS IAM: review the OIDC provider used by the dedicated log-reader role.')):''; + const first=aws && method==='CloudFormation'?'Confirm CREATE_COMPLETE and copy the RoleArn from the stack’s Outputs tab.':aws?'Confirm the role exists and its trust policy checks the approved audience and subjects.':'Confirm the app identity, intended tenant and successful role assignments at each approved scope.'; +return `${shots}
Done when evidence arrives.

Creating a role or app is not the same as a verified connection.

${link('/verify/','Verification checklist')}
`; +} + +export function setupGuide(route) { + const g=setupRoutes[route]; + const buckets=[['audit','Audit','Inventory & security posture'],['logs','Logs','Security events & investigations'],['both','Both','Audit + log collection']]; + return `
${g.cloud} / ${g.method}

${g.title}

Choose what to connect. Follow the steps. Verify your first data.

${g.time} · customer-controlled access
1

Choose your permission bucket

Only approve the evidence you need.

Permission bucket${buckets.map(([id,label,description])=>``).join('')}
${permissions(g.cloud)}

This selects instructions only. Nothing is granted or sent from this page. Detailed permission reference ↗

2

Install Audit

In your ${g.cloud==='AWS'?'AWS account':'Azure tenant'}, with your administrator.

${g.cloud==='AWS'?installAWS(g.method):installAzure(g.method)}
3

Verify the connection

Check real data in the correct customer workspace.

${verify(g.cloud,g.method)}

Screenshots are navigation references from existing documentation, not proof of a live installation. Never copy an example identity or expand permissions because another role appears in a screenshot.

`; +} + +export const simpleHomeHTML = `
Cloud onboarding

Connect your cloud.

Pick your cloud and setup method. Then choose Audit, Logs, or Both.

Amazon Web Services

One AWS account or an approved multi-account setup.

CloudFormationInstall with a reviewed stackRecommendedManual setupConfigure the role in the AWS consoleMultiple accounts? →

Microsoft Azure

Your tenant, selected subscriptions and log workspaces.

Cloud ShellRun the reviewed Bash installerRecommendedManual setupConfigure the app and roles in Azure
1 → 2 → 3

Permissions → Install → Verify
Short instructions and screenshots on every setup page. Technical detail is there when you need it.

No secrets collected. No access granted by this website. Security & revocation

`; diff --git a/site/package-lock.json b/site/package-lock.json new file mode 100644 index 0000000..bab7177 --- /dev/null +++ b/site/package-lock.json @@ -0,0 +1,30 @@ +{ + "name": "transilience-cloud-onboarding", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "transilience-cloud-onboarding", + "version": "1.0.0", + "dependencies": { + "marked": "^16.4.2" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/marked": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz", + "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + } + } +} diff --git a/site/package.json b/site/package.json new file mode 100644 index 0000000..073b217 --- /dev/null +++ b/site/package.json @@ -0,0 +1,16 @@ +{ + "name": "transilience-cloud-onboarding", + "version": "1.0.0", + "private": true, + "type": "module", + "scripts": { + "build": "node build.mjs", + "test": "node --test test/*.test.mjs", + "preview": "node serve.mjs", + "deploy": "npm run build && npm test && CLOUDFLARE_ACCOUNT_ID=a67cd8e63ae24260ddecdcbadd4910aa npx wrangler@4.129.0 pages deploy dist --project-name transilience-cloud-onboarding --branch main" + }, + "dependencies": { + "marked": "^16.4.2" + }, + "engines": { "node": ">=22" } +} diff --git a/site/public/_headers b/site/public/_headers new file mode 100644 index 0000000..2ddb71e --- /dev/null +++ b/site/public/_headers @@ -0,0 +1,14 @@ +/* + Content-Security-Policy: default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self'; connect-src 'self'; font-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; object-src 'none'; upgrade-insecure-requests + Referrer-Policy: no-referrer + X-Content-Type-Options: nosniff + X-Frame-Options: DENY + Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=() + Strict-Transport-Security: max-age=31536000 + Cache-Control: public, max-age=300, must-revalidate +/downloads/*.sh + Content-Disposition: attachment + Content-Type: text/plain; charset=utf-8 +/downloads/*.yaml + Content-Disposition: attachment + Content-Type: text/plain; charset=utf-8 diff --git a/site/public/app.js b/site/public/app.js new file mode 100644 index 0000000..f7e5622 --- /dev/null +++ b/site/public/app.js @@ -0,0 +1,101 @@ +/* Static portal: no cloud API calls, credential fields, telemetry, or form submissions. */ +const $ = s => document.querySelector(s); +const $$ = s => [...document.querySelectorAll(s)]; +function node(tag,text,className){const el=document.createElement(tag);if(text)el.textContent=text;if(className)el.className=className;return el;} +const menu=$('#menu-toggle'); +menu?.addEventListener('click',()=>{const open=menu.getAttribute('aria-expanded')!=='true';menu.setAttribute('aria-expanded',String(open));$('#sidebar').classList.toggle('is-open',open);}); +document.addEventListener('keydown',e=>{if(e.key==='Escape'){menu?.setAttribute('aria-expanded','false');$('#sidebar')?.classList.remove('is-open');}}); +document.addEventListener('click',e=>{if(!e.target.closest('#sidebar')&&!e.target.closest('#menu-toggle')){menu?.setAttribute('aria-expanded','false');$('#sidebar')?.classList.remove('is-open');}}); + +// The bucket is a local documentation selection, never an access grant. +const setupGuide=$('[data-setup-guide]'); +if(setupGuide){ + const allowed=['audit','logs','both']; + function showBucket(value,updateUrl=false){ + const bucket=allowed.includes(value)?value:'audit'; + $$('input[name="permissions"]').forEach(input=>{input.checked=input.value===bucket;}); + $$('[data-permission-panel]').forEach(panel=>{panel.hidden=panel.dataset.permissionPanel!==bucket;}); + $$('[data-verify-bucket]').forEach(panel=>{panel.hidden=panel.dataset.verifyBucket!==bucket;}); + $$('[data-log-scope]').forEach(panel=>{panel.hidden=bucket==='audit';}); + $$('[data-selected-bucket]').forEach(label=>{label.textContent={audit:'Audit',logs:'Logs',both:'Audit + Logs'}[bucket];}); + // Switching setup method within a cloud keeps the instruction selection. + const prefix=setupGuide.dataset.cloud==='AWS'?'/aws/':'/azure/'; + $$('#sidebar a').forEach(link=>{const url=new URL(link.href);if(url.pathname.startsWith(prefix)){url.searchParams.set('permissions',bucket);link.href=url.pathname+url.search+url.hash;}}); + // Deep links and Back retain the selected bucket without storing any identity. + if(updateUrl){const url=new URL(location.href);url.searchParams.set('permissions',bucket);history.replaceState(null,'',url);} + } + showBucket(new URL(location.href).searchParams.get('permissions')); + $$('input[name="permissions"]').forEach(input=>input.addEventListener('change',()=>showBucket(input.value,true))); + window.addEventListener('popstate',()=>showBucket(new URL(location.href).searchParams.get('permissions'))); +} + +// Search downloads only the public guide index. Input and queries never leave the page. +let indexPromise; +const dialog=$('#search-dialog'), search=$('#site-search'), results=$('#search-results'); +async function showSearch(){ + dialog.showModal();search.focus(); + indexPromise??=fetch('/search-index.json').then(r=>{if(!r.ok)throw new Error('Index unavailable');return r.json();}); + try{await indexPromise;updateSearch();}catch{results.replaceChildren(node('p','Search is temporarily unavailable. Use the guide navigation.','empty'));} +} +async function updateSearch(){ + if(!indexPromise)return;let index;try{index=await indexPromise;}catch{return;} + const terms=search.value.trim().toLowerCase().split(/\s+/).filter(Boolean); + const ranked=index.map(item=>{const title=(item.title+' '+item.description).toLowerCase();const text=(title+' '+item.text).toLowerCase();return {...item,score:terms.every(t=>text.includes(t))?terms.reduce((s,t)=>s+(title.includes(t)?10:1),0):-1};}).filter(item=>item.score>=0).sort((a,b)=>b.score-a.score).slice(0,8); + results.replaceChildren(); + if(!ranked.length){results.append(node('p','No matching guides. Try “consent”, “role”, or “CloudFormation”.','empty'));return;} + if(!terms.length)results.append(node('p','Popular starting points','small muted')); + for(const item of ranked){const row=node('div');row.setAttribute('role','listitem');const a=node('a');a.href=item.url;a.append(node('strong',item.title),node('span',item.description));row.append(a);results.append(row);} +} +$('#open-search')?.addEventListener('click',showSearch); +$('#close-search')?.addEventListener('click',()=>dialog.close()); +search?.addEventListener('input',updateSearch); +search?.addEventListener('keydown',e=>{if(e.key==='ArrowDown'){$('#search-results a')?.focus();e.preventDefault();}}); +results?.addEventListener('keydown',e=>{const links=$$('#search-results a'),i=links.indexOf(document.activeElement);if(e.key==='ArrowDown'){links[Math.min(i+1,links.length-1)]?.focus();e.preventDefault();}if(e.key==='ArrowUp'){if(i<=0)search.focus();else links[i-1].focus();e.preventDefault();}}); +document.addEventListener('keydown',e=>{const editing=/INPUT|TEXTAREA|SELECT/.test(document.activeElement?.tagName);if((e.key.toLowerCase()==='k'&&(e.metaKey||e.ctrlKey))||(e.key==='/'&&!editing)){e.preventDefault();showSearch();}}); +dialog?.addEventListener('click',e=>{if(e.target===dialog){const r=dialog.getBoundingClientRect();if(e.clientXr.right||e.clientYr.bottom)dialog.close();}}); + +for(const pre of $$('pre')){ + const code=pre.querySelector('code');if(!code)continue; + const copy=node('button','Copy','copy-code');copy.type='button';copy.setAttribute('aria-label','Copy code block');pre.prepend(copy); + copy.addEventListener('click',async()=>{try{await navigator.clipboard.writeText(code.textContent);copy.textContent='Copied ✓';}catch{copy.textContent='Select & copy';const range=document.createRange();range.selectNodeContents(code);getSelection().removeAllRanges();getSelection().addRange(range);}setTimeout(()=>copy.textContent='Copy',2000);}); +} + +const plans={ + aws:{automated:{title:'AWS CloudFormation',url:'/aws/cloudformation/',steps:['Confirm your approved account ID and installer permissions.','Review the audit-role stack and your organization-specific Quick Create link.','Create the stack, confirm Outputs, then verify the first evidence collection.']},manual:{title:'AWS manual console setup',url:'/aws/manual/',steps:['Obtain current approved Transilience workspace IDs and your account design.','Create the OIDC provider and audit role with explicit audience and subject restrictions.','Hand off the non-secret role ARN through the approved workflow and verify evidence.']}}, + azure:{automated:{title:'Azure Cloud Shell installer',url:'/azure/cloud-shell/',steps:['Confirm tenant, selected subscriptions, and who can approve RBAC and tenant-wide consent.','Inspect the installer, then run your exact customer-specific Bash command.','Review the non-secret grant manifest, secure callback, and first evidence collection.']},manual:{title:'Azure manual portal setup',url:'/azure/manual/',steps:['Create the dedicated single-tenant application in the approved tenant.','Assign the scoped read roles and consent to Graph and Defender application permissions.','Securely hand off the credential, register the connection, and verify each evidence source.']}} +}; +function updatePlan(){const cloud=$('#plan-cloud').value,method=$('#plan-method').value,multiple=$('#plan-scope').value==='multiple';const plan=plans[cloud][method],out=$('#plan-result');out.replaceChildren(node('span','Your recommended route','eyebrow'),node('h3',plan.title));const list=node('ol');plan.steps.forEach(s=>list.append(node('li',s)));out.append(list);if(multiple){const notice=node('p',cloud==='aws'?'Multiple accounts need explicit per-account roles or an approved central-to-member trust design. The base stack does not enroll an organization.':'Default discovery includes enabled subscriptions visible to the installer. Narrow the approved subscription list or management-group boundary before running.');out.append(notice);if(cloud==='aws'){const a=node('a','Review multi-account design →','text-link');a.href='/aws/organization/';out.append(a,node('br'));}}const a=node('a','Open my setup guide →','button primary');a.href=plan.url;out.append(a);} +if($('#plan-cloud')){['#plan-cloud','#plan-method','#plan-scope'].forEach(s=>$(s).addEventListener('change',updatePlan));updatePlan();} + +function updatePermissions(){const query=$('#permission-search').value.toLowerCase().trim();const provider=$('#permission-provider').value;const plane=$('#permission-plane').value;let count=0;for(const row of $$('[data-permission]')){const visible=(!query||row.textContent.toLowerCase().includes(query))&&(provider==='all'||row.dataset.provider===provider)&&(plane==='all'||row.dataset.plane===plane);row.hidden=!visible;if(visible)count++;}$('#permission-count').textContent=`${count} of ${$$('[data-permission]').length} permission entries`;$('#permission-empty').hidden=count!==0;} +if($('#permission-search')){['#permission-search','#permission-provider','#permission-plane'].forEach(s=>$(s).addEventListener(s.includes('search')?'input':'change',updatePermissions));} + +const checklist={aws:['Confirmed the intended AWS account IDs and assessment scope.','Reviewed the exact access profile and current approved OIDC trust conditions.','Verified stack completion (or manual role creation) in the correct account.','Confirmed successful registration and the correct role ARN in Transilience.','Validated a real collection, timestamps, regions, and missing evidence.','Recorded the connection owner, optional human-access review date, and offboarding plan.'],azure:['Confirmed the intended Entra tenant and approved subscription/workspace scopes.','Reviewed Azure RBAC, Graph, and Defender application permissions separately.','Verified effective Azure role assignments and tenant-wide admin consent.','Confirmed secure credential handoff and recorded expiry and rotation owner.','Validated a real collection and distinguished missing licences/data from denied access.','Recorded missing grants, evidence exclusions, and the offboarding owner.']}; +function savedChecks(cloud){try{return JSON.parse(localStorage.getItem('transilience-onboarding-checks-'+cloud)||'[]');}catch{return [];}} +function renderChecks(){const cloud=$('#check-cloud').value;const stored=savedChecks(cloud);const saved=Array.isArray(stored)?stored:[];const box=$('#check-items');box.replaceChildren();checklist[cloud].forEach((text,i)=>{const label=node('label',null,'check-row');const input=node('input');input.type='checkbox';input.checked=saved.includes(i);input.dataset.check=i;input.addEventListener('change',()=>{const values=$$('#check-items input:checked').map(c=>Number(c.dataset.check));try{localStorage.setItem('transilience-onboarding-checks-'+cloud,JSON.stringify(values));}catch{/* Browsers may disable local storage. UI still works for this page. */}updateProgress();});label.append(input,node('span',text));box.append(label);});updateProgress();} +function updateProgress(){const total=checklist[$('#check-cloud').value].length,n=$$('#check-items input:checked').length;$('#check-progress').style.width=(n/total*100)+'%';$('#check-status').textContent=`${n} of ${total} local checks complete.${n===total?' Checklist finished—this is not a live connection test.':''}`;} +if($('#check-cloud')){$('#check-cloud').addEventListener('change',renderChecks);$('#reset-checklist').addEventListener('click',()=>{try{localStorage.removeItem('transilience-onboarding-checks-'+$('#check-cloud').value);}catch{}renderChecks();});renderChecks();} + +const profileNotes={SecurityAudit:'Recommended starting point for security-configuration review. Does not guarantee access to every log or service-data source.',ViewOnlyAccess:'Basic visibility only. Expect assessment gaps and review them with the customer; do not present this as full security-evidence access.',ReadOnlyAccess:'Broader read access can expose service data and sensitive content. Customer approval must explicitly cover that data exposure.'}; +let accessRequest; +function invalidateRequest(){accessRequest=undefined;$('#request-result').hidden=true;} +function updateProfile(){const method=$('#engineer-method').value,profile=$('#engineer-profile').value;$('#profile-notice').textContent=profileNotes[profile]+(method.startsWith('IAM console')?' IAM exception: no automatic email invite. Require MFA, password reset at next login, secure password handoff, and no access keys.':' AWS/your IdP sends the actual invitation after administrator approval.');invalidateRequest();} +if($('#engineer-form')){ + const date=new Date();date.setDate(date.getDate()+30);$('#engineer-expiry').value=date.toISOString().slice(0,10);$('#engineer-expiry').min=new Date().toISOString().slice(0,10); + ['#engineer-profile','#engineer-method'].forEach(s=>$(s).addEventListener('change',updateProfile));updateProfile(); + $('#engineer-form').addEventListener('input',invalidateRequest); + $('#engineer-accounts').addEventListener('input',()=>$('#engineer-accounts').setCustomValidity('')); + $('#engineer-form').addEventListener('submit',e=>{ + e.preventDefault();const accountInput=$('#engineer-accounts'),accountIds=[...new Set(accountInput.value.split(',').map(a=>a.trim()).filter(Boolean))]; + if(!accountIds.length||accountIds.some(id=>!/^\d{12}$/.test(id))){accountInput.setCustomValidity('Enter one or more 12-digit AWS account IDs, separated by commas.');accountInput.reportValidity();return;} + accountInput.setCustomValidity(''); + if(!$('#engineer-form').reportValidity())return; + const method=$('#engineer-method').value,profile=$('#engineer-profile').value; + accessRequest={status:'DRAFT — NOT SENT — NO ACCESS GRANTED',engineerWorkEmail:$('#engineer-email').value.trim(),awsAccountIds:accountIds,accessMethod:method,managedPolicy:profile,managedPolicyArn:'arn:aws:iam::aws:policy/'+profile,purpose:$('#engineer-purpose').value.trim(),reviewOrExpiryDate:$('#engineer-expiry').value,administratorReviewRequired:true,mfaRequired:true,recommendedSessionDuration:'1 hour (Identity Center)',createAccessKeys:false,credentialDelivery:'Never include passwords, keys, or tokens in this request. Use approved secure channels.',nextStep:method.startsWith('IAM Identity')?'Customer administrator provisions the named person, sends the AWS/IdP invitation, and approves scoped account/group assignments.':'Customer administrator documents the IAM-user exception, requires password reset and MFA, and uses approved separate channels for the console URL and temporary password.',policyReview:profileNotes[profile]}; + $('#request-preview').textContent=JSON.stringify(accessRequest,null,2);$('#request-result').hidden=false;$('#request-result').scrollIntoView({behavior:matchMedia('(prefers-reduced-motion: reduce)').matches?'instant':'smooth',block:'nearest'}); + }); + $('#download-request').addEventListener('click',()=>{if(!accessRequest)return;const url=URL.createObjectURL(new Blob([JSON.stringify(accessRequest,null,2)+'\n'],{type:'application/json'}));const a=node('a');a.href=url;a.download='transilience-aws-engineer-access-request.json';document.body.append(a);a.click();a.remove();setTimeout(()=>URL.revokeObjectURL(url),1000);}); +} + +// Highlight the section in view without polling or backend requests. +if('IntersectionObserver' in window){const observer=new IntersectionObserver(entries=>{for(const entry of entries){if(entry.isIntersecting){$$('.toc a').forEach(a=>a.removeAttribute('aria-current'));const link=$$('.toc a').find(a=>a.hash==='#'+entry.target.id);link?.setAttribute('aria-current','location');}}},{rootMargin:'-15% 0px -70% 0px'});$$('.prose h2[id]').forEach(h=>observer.observe(h));} diff --git a/site/public/favicon.svg b/site/public/favicon.svg new file mode 100644 index 0000000..3cc56fe --- /dev/null +++ b/site/public/favicon.svg @@ -0,0 +1 @@ + diff --git a/site/public/screenshots/azure-cloud-shell.png b/site/public/screenshots/azure-cloud-shell.png new file mode 100644 index 0000000..523885a Binary files /dev/null and b/site/public/screenshots/azure-cloud-shell.png differ diff --git a/site/public/setup.css b/site/public/setup.css new file mode 100644 index 0000000..9d1d155 --- /dev/null +++ b/site/public/setup.css @@ -0,0 +1,30 @@ +/* Permission-first setup pages. Full technical reference remains available. */ +.nav-group p{color:#414957;font-size:11px;letter-spacing:.06em} +.nav-group:nth-child(2) a,.nav-group:nth-child(3) a{margin-left:12px;border-left:1px solid #e2dce9;border-radius:0 7px 7px 0;padding-left:17px} +.nav-group a[aria-current]{border-left-color:var(--purple)} +.doc-page:has(.setup-guide){max-width:920px} +.start-heading{margin:26px 0 40px;max-width:740px} +.start-heading h1{font-size:clamp(40px,4vw,58px);margin-bottom:20px} +.start-heading p{font-size:17px;max-width:650px} +.start-clouds{display:grid;grid-template-columns:1fr 1fr;gap:24px} +.start-cloud{border:1px solid var(--line);border-radius:15px;padding:30px;background:#fff} +.cloud-monogram{width:48px;height:48px;display:flex;align-items:center;justify-content:center;border-radius:11px;font-size:23px;font-weight:800;margin-bottom:22px} +.aws-mark{color:#9b610d;background:#fff3df}.azure-mark{color:#1673b6;background:#eaf5ff} +.start-cloud h2{font-size:25px;margin-bottom:12px}.start-cloud>p{font-size:14px;color:var(--muted);min-height:46px} +.start-method{display:flex;align-items:center;gap:14px;padding:20px 0;color:var(--ink);border-bottom:1px solid var(--line)} +.start-method:hover{text-decoration:none;color:var(--purple)}.start-method>span:first-child{flex:1}.start-method strong{font-size:16px;display:block}.start-method small{font-size:12px;color:var(--muted);display:block;margin-top:7px} +.recommended{font-size:9px;font-weight:700;color:var(--purple);background:var(--violet);padding:4px 7px;border-radius:5px} +.start-cloud>.text-link{display:inline-block;margin-top:20px}.start-explainer{display:flex;gap:22px;align-items:center;background:#f8f6fb;border:1px solid #ece6f4;border-radius:12px;margin:28px 0 22px;padding:24px}.start-explainer p{font-size:13px;color:var(--muted);margin:0;line-height:1.9}.start-explainer strong{color:var(--ink)}.start-explainer .step-number{white-space:nowrap;font-size:12px;padding:9px} +.compact-heading{margin-bottom:25px}.compact-heading h1{font-size:clamp(32px,3.1vw,44px);margin:13px 0 15px}.compact-heading>p{font-size:15px}.guide-badge{display:inline-block;font-size:11px;color:#6a5b7c;background:#f5f1fb;border-radius:5px;padding:5px 9px;margin-top:16px} +.step-links{display:flex;gap:0;max-width:590px;margin:0 0 12px;border:1px solid var(--line);border-radius:10px;background:#fbfbfd} +.step-links a{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;font-size:12px;font-weight:650;color:#5e526c;padding:13px 15px;border-right:1px solid var(--line)}.step-links a:last-child{border:0}.step-links span{background:#e9e2f3;color:var(--purple);width:21px;height:21px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;font-size:10px} +.setup-section{padding:32px 0;border-bottom:1px solid var(--line);scroll-margin-top:108px}.step-heading{display:flex;align-items:start;gap:15px;margin-bottom:23px}.step-heading>span{width:29px;height:29px;display:flex;align-items:center;justify-content:center;border:1px solid #d3c2e7;border-radius:8px;color:var(--purple);font-size:12px;font-weight:700;flex-shrink:0}.step-heading h2{font-size:23px;margin:3px 0 8px}.step-heading p{font-size:13px;color:var(--muted);margin:0}.setup-section h3{font-size:17px;line-height:1.5;margin:22px 0 12px}.setup-section p,.setup-instructions{font-size:14px;line-height:1.9;color:#58616e}.setup-section strong{color:var(--ink)} +.permission-buckets{margin:0;padding:0;border:0;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.bucket{position:relative;display:flex;align-items:start;gap:9px;min-height:105px;border:1px solid #dce0e7;border-radius:10px;padding:18px 15px;cursor:pointer;background:white}.bucket:has(input:checked){border:2px solid var(--purple);padding:17px 14px;background:#faf7ff;box-shadow:0 0 0 3px #6b42b807}.bucket input{accent-color:var(--purple);margin:6px 0 0;flex-shrink:0;width:15px;height:15px}.bucket-label{display:grid;gap:7px}.bucket-label strong{font-size:15px;line-height:1.4}.bucket-label>span{font-size:11px;color:var(--muted);line-height:1.6}.bucket-check{display:none;margin-left:auto;color:var(--purple);font-size:12px}.bucket:has(input:checked) .bucket-check{display:block} +.access-summary{margin-top:20px}.access-list{list-style:none;padding:0;margin:0;border:1px solid var(--line);border-radius:9px;overflow:hidden}.access-list li{display:grid;grid-template-columns:minmax(140px,1fr) 2.1fr;gap:22px;padding:12px 16px;border-bottom:1px solid var(--line);font-size:12px;line-height:1.75}.access-list li:last-child{border-bottom:0}.access-list strong{font-size:12px;color:#3f354b}.access-list span{color:var(--muted)}.access-summary+.small{font-size:11px;line-height:1.9;margin-bottom:0} +.setup-note{background:#f9f7fc;border-left:3px solid #b89ad9;padding:13px 16px;border-radius:0 7px 7px 0;margin:18px 0}.setup-note strong{font-size:12px;color:#5a426f;display:block}.setup-note p{font-size:12px;line-height:1.85;margin:5px 0 0;color:#756480}.setup-instructions{padding-left:22px;margin:0 0 20px}.setup-instructions li{padding-left:7px;margin-bottom:15px}.setup-instructions li::marker{font-weight:700;color:#9472b3}.setup-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin:24px 0}.setup-actions .button{font-size:12px}.setup-section code:not(pre code){font-size:.88em;background:#f0edf5;border-radius:3px;padding:2px 4px;overflow-wrap:anywhere}.setup-section pre{max-width:100%;margin:18px 0}.setup-section pre code{font-size:12px;line-height:1.8} +.setup-screenshot{margin:25px 0;border:1px solid #e0e4ea;border-radius:10px;overflow:hidden;background:#fafbfc}.setup-screenshot a{display:block;background:white;padding:8px;cursor:zoom-in}.setup-screenshot img{display:block;width:100%;height:auto;max-height:550px;object-fit:contain;object-position:left top}.setup-screenshot figcaption{font-size:11px;line-height:1.75;padding:11px 15px;color:#5c6470;border-top:1px solid var(--line)}.setup-screenshot figcaption span{display:block;color:#94919a;font-size:10px;margin-top:3px}.setup-screenshot.compact img{width:auto;max-width:100%;min-height:40px}.setup-screenshot.compact a{padding:22px}.setup-screenshot.compact{max-width:530px} +.finish-checks{padding-left:21px;font-size:14px;line-height:1.9;color:#5b6470}.finish-checks li{margin:10px 0}.finish-checks li::marker{color:var(--mint)}.finish-banner{display:flex;align-items:center;gap:18px;padding:20px;border:1px solid #cde4d9;border-radius:9px;background:#f4faf7;margin:24px 0 0}.finish-banner>span{color:var(--mint);font-size:22px}.finish-banner strong{font-size:13px}.finish-banner p{font-size:12px;margin:5px 0 0;color:#688675}.finish-banner .button{margin-left:auto;flex-shrink:0;font-size:11px} +.full-reference{margin:28px 0;border:1px solid var(--line);border-radius:10px;background:#fcfcfe}.full-reference>summary{padding:20px;font-size:13px;font-weight:650;cursor:pointer;color:#675278}.full-reference>article,.full-reference>.source-bar,.full-reference>.callout{margin-left:22px;margin-right:22px}.full-reference .prose{padding-bottom:20px}.screenshot-disclaimer{font-size:11px;color:#90939d;line-height:1.9;margin:24px 0} +@media(max-width:650px){.bucket .bucket-check{display:none!important}.bucket:has(input:checked) .bucket-check{display:block!important}} +@media(max-width:1100px){.start-clouds{gap:16px}.start-cloud{padding:24px}.recommended{display:none}.bucket{padding:16px 12px}.bucket:has(input:checked){padding:15px 11px}.bucket-check{display:none!important}} +@media(max-width:650px){.start-clouds{grid-template-columns:1fr}.start-heading{margin-top:8px;margin-bottom:28px}.start-heading h1{font-size:40px}.start-heading p{font-size:15px}.start-cloud>p{min-height:0}.recommended{display:block}.start-explainer{padding:20px;gap:15px;align-items:start}.start-explainer .step-number{font-size:10px}.step-links a{font-size:11px;padding:12px 8px;gap:7px}.compact-heading h1{font-size:32px}.setup-section{padding:26px 0}.step-heading h2{font-size:20px}.permission-buckets{grid-template-columns:1fr;gap:9px}.bucket{min-height:75px;padding:14px}.bucket:has(input:checked){padding:13px}.bucket-label{gap:3px}.bucket-label>span{font-size:12px}.bucket-check{display:block!important}.bucket-label strong{font-size:15px}.access-list li{grid-template-columns:1fr;gap:4px;padding:12px 15px}.finish-banner{flex-wrap:wrap}.finish-banner>div{flex:1;min-width:190px}.finish-banner .button{margin-left:0}.setup-screenshot a{padding:3px}.setup-screenshot figcaption{font-size:10px;padding:10px 12px}.full-reference>summary{padding:17px;font-size:12px}.full-reference>article,.full-reference>.source-bar,.full-reference>.callout{margin-left:15px;margin-right:15px}} diff --git a/site/public/styles.css b/site/public/styles.css new file mode 100644 index 0000000..2732892 --- /dev/null +++ b/site/public/styles.css @@ -0,0 +1,15 @@ +:root{--ink:#232831;--muted:#68717c;--line:#e2e6eb;--paper:#fff;--wash:#f7f8fa;--purple:#6b42b8;--violet:#efe8fb;--mint:#17785d;--mint-light:#e7f5ef;--nav:248px;--header:80px;--radius:18px;color-scheme:light} +*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:110px}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}a{color:var(--purple);text-decoration:none}a:hover{text-decoration:underline;text-underline-offset:4px}button,input,select{font:inherit}button,a,input,select,summary{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.7}:focus-visible{outline:3px solid #9770d4;outline-offset:4px}::selection{background:#e4d5fa}h1,h2,h3,p{margin-top:0}h1,h2,h3{line-height:1.16;letter-spacing:-.035em}h1{font-weight:660}h2{font-weight:650}h3{font-weight:650}p{margin-bottom:1em}svg{display:block}code,kbd{font: .88em/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}code{overflow-wrap:anywhere}.small{font-size:13px}.muted{color:var(--muted)}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.skip-link{position:fixed;top:-100px;left:20px;z-index:100;background:var(--ink);color:white;padding:12px 18px;border-radius:9px}.skip-link:focus{top:10px} +.topbar{height:var(--header);position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;padding:0 32px;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);backdrop-filter:blur(14px)}.brand{display:flex;align-items:center;gap:11px;color:#2b2138;font-weight:750;font-size:22px;letter-spacing:-.045em;line-height:1.1}.brand:hover{text-decoration:none}.brand svg{width:47px;height:30px;fill:none;stroke:#8c4bba;stroke-width:2.5}.brand-sub{display:block;font-size:10px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);margin-top:6px}.topbar nav{display:flex;align-items:center;gap:26px}.trust-link{font-size:12px;color:var(--muted);display:flex;gap:8px;align-items:center}.status-dot{display:inline-block;flex-shrink:0;width:7px;height:7px;background:var(--mint);border-radius:50%}.search-button{display:flex;gap:26px;align-items:center;border:1px solid var(--line);padding:9px 12px;border-radius:9px;background:var(--wash);color:var(--muted);font-size:13px}.search-button kbd{color:#8a9099;border:1px solid var(--line);background:white;border-radius:4px;padding:1px 5px}.menu-button{display:none;border:1px solid var(--line);background:white;border-radius:8px;padding:8px 12px;color:var(--ink)} +.sidebar{position:fixed;top:var(--header);bottom:0;width:var(--nav);overflow-y:auto;padding:26px 20px 28px;border-right:1px solid var(--line);background:#fbfcfd;z-index:15}.nav-group{margin-bottom:24px}.nav-group p{font-size:10px;letter-spacing:.11em;text-transform:uppercase;font-weight:750;color:#8a919b;padding:0 12px;margin-bottom:8px}.nav-group a{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:#5c6470;padding:7px 12px;margin:2px 0;border-radius:7px}.nav-group a:hover{background:#f0edf6;text-decoration:none;color:var(--purple)}.nav-group a[aria-current]{background:var(--violet);color:var(--purple);font-weight:650}.nav-group a span{font-size:7px}.sidebar-note{padding:18px 12px 0;border-top:1px solid var(--line);font-size:11px;color:var(--mint)}.sidebar-note .status-dot{margin-right:4px;width:5px;height:5px}.sidebar-note p{color:#8a919b;font-size:11px;line-height:1.5;margin:6px 0 0}.page-wrap{margin-left:var(--nav);display:flex;justify-content:center;gap:44px;padding:27px 48px 0}main{min-width:0;max-width:1140px;width:100%}.breadcrumb{display:flex;gap:10px;align-items:center;color:#8c929b;font-size:11px;margin-bottom:38px}.breadcrumb a{color:#68717c}.eyebrow{font-size:10px;font-weight:750;letter-spacing:.13em;line-height:1.5;text-transform:uppercase;color:var(--muted)}.eyebrow .status-dot{margin-right:8px;width:6px;height:6px}.button{display:inline-flex;align-items:center;justify-content:center;gap:24px;border:1px solid #d7dce3;background:white;color:var(--ink);padding:12px 17px;border-radius:8px;font-size:13px;line-height:1.4;font-weight:650;transition:transform .15s,background .15s;min-height:44px}.button:hover{text-decoration:none;background:#f7f4fc;border-color:#bda5e1;transform:translateY(-1px)}.button.primary{background:#6a41ad;color:white;border-color:#6a41ad;box-shadow:0 4px 10px #4f2b7e18}.button.primary:hover{background:#56338f}.button.subtle{box-shadow:none;background:transparent;font-weight:500}.text-link{font-size:13px;font-weight:650}.hero{display:grid;grid-template-columns:1.1fr .9fr;gap:44px;padding:10px 0 56px;align-items:center}.hero h1{font-size:clamp(40px,3.6vw,64px);line-height:1.08;margin:20px 0 24px;letter-spacing:-.055em}.hero h1 em{font-family:Georgia,serif;font-weight:500;color:var(--purple);font-size:1.05em}.hero-description{max-width:520px;font-size:16px;line-height:1.8;color:var(--muted);margin-bottom:26px}.hero-actions{display:flex;gap:20px;align-items:center;flex-wrap:wrap}.hero-footnote{font-size:11px;color:#8a919b;margin:16px 0 0}.connection-map{border:1px solid #e3dced;background:radial-gradient(ellipse at top right,#ede4f9 0,transparent 65%),#fcfaff;padding:25px 24px 18px;border-radius:22px;box-shadow:0 18px 45px #5b447c08}.map-label{font-size:10px;color:#81718f;display:flex;align-items:center;gap:7px}.map-clouds{display:flex;justify-content:center;gap:38px;margin-top:28px}.map-clouds>div{display:grid;justify-items:center;min-width:85px}.map-clouds svg{width:37px;height:37px;stroke-width:1.5;stroke:var(--purple);fill:none;margin-bottom:6px}.map-clouds>div:first-child svg{stroke:#bb791f}.map-clouds strong{font-size:14px}.map-clouds small{font-size:10px;color:var(--muted)}.map-line{height:30px;width:1px;background:repeating-linear-gradient(to bottom,#c7b5dc 0 4px,transparent 4px 7px);margin:0 auto}.map-gate{background:white;border:1px solid #dacded;border-radius:10px;padding:12px;display:flex;align-items:center;gap:11px;box-shadow:0 6px 20px #6b42b807}.map-gate>span:first-child{color:var(--purple);font-size:23px}.map-gate>span:last-child{margin-left:auto;color:var(--mint);border:1px solid #c9e5d9;border-radius:50%;width:20px;height:20px;text-align:center;font-size:12px;line-height:18px}.map-gate strong{display:block;font-size:12px;letter-spacing:-.02em}.map-gate small{font-size:9px;color:var(--muted)}.map-platform{padding:17px 12px;text-align:center;background:white;border:1px solid var(--line);border-radius:12px}.map-platform .brand{justify-content:center;font-size:20px}.map-platform .brand svg{width:40px}.map-platform .brand-sub{display:none}.map-platform>span{display:block;font-size:10px;color:var(--muted);margin-top:9px}.map-note{text-align:center;font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:#9b8bad;margin-top:17px}.home-section{padding:35px 0;border-top:1px solid var(--line)}.section-heading{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:24px}.section-heading h2,.journey-section h2,.help-panel h2{font-size:30px;margin:9px 0 0}.section-heading>p{font-size:12px;color:var(--muted);max-width:230px;margin-bottom:0}.path-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:24px 0 34px}.path-card{border:1px solid var(--line);padding:24px;border-radius:var(--radius);color:var(--ink);background:white;transition:transform .2s,box-shadow .2s,border-color .2s;display:flex;flex-direction:column}.path-card:hover{text-decoration:none;transform:translateY(-3px);box-shadow:0 10px 30px #46365f0a;border-color:#b8a0d8}.card-top{display:flex;align-items:center;gap:10px;margin-bottom:25px}.card-top svg{width:32px;height:32px;stroke:var(--purple);fill:none;stroke-width:1.6}.card-top>span:last-child{margin-left:auto;font-size:20px;color:#9b8caf}.path-card h3{font-size:25px;margin-bottom:10px}.path-card p{font-size:13px;color:var(--muted);line-height:1.75;max-width:370px}.card-cta{font-size:12px;font-weight:650;color:var(--purple);margin-top:auto;padding-top:15px;display:flex;justify-content:space-between}.journey-section{padding:30px 0 42px}.journey{display:grid;grid-template-columns:repeat(4,1fr);gap:22px;margin-top:30px}.journey a{color:var(--ink);border-top:1px solid var(--line);padding-top:17px}.journey a:hover{text-decoration:none}.step-number{display:inline-flex;color:var(--purple);background:var(--violet);border-radius:6px;padding:4px 7px;font:11px ui-monospace,monospace}.journey h3{font-size:16px;margin:18px 0 9px;letter-spacing:-.02em}.journey p{font-size:12px;color:var(--muted);line-height:1.8}.journey a>span:last-child{color:var(--purple)}.help-panel{background:#f5f2f9;border:1px solid #e9e1f1;border-radius:var(--radius);padding:28px 30px;display:grid;grid-template-columns:1fr 1fr;gap:32px}.help-panel h2{font-size:25px;max-width:280px}.help-panel>div:last-child{display:grid;align-content:center}.help-panel a{display:flex;justify-content:space-between;padding:10px 0;font-size:12px;border-bottom:1px solid #e1d7ed}.help-panel a:last-child{border:0}footer{margin-top:64px;border-top:1px solid var(--line);padding:28px 0 32px;display:flex;gap:25px;justify-content:space-between;align-items:start;color:var(--muted);font-size:11px}footer strong{font-size:12px;font-weight:600;color:#555d68}footer p{margin:5px 0}footer>div:last-child{display:grid;text-align:right;gap:5px}footer a{color:var(--muted)} +.doc-page{max-width:840px}.doc-page .breadcrumb{margin-bottom:28px}.page-heading{margin-bottom:30px}.page-heading h1{font-size:clamp(34px,3.5vw,48px);max-width:760px;line-height:1.1;margin:15px 0 20px;letter-spacing:-.045em}.page-heading>p{font-size:16px;line-height:1.75;color:var(--muted);max-width:700px;margin-bottom:0}.source-bar{display:flex;justify-content:space-between;gap:15px;align-items:center;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 0;margin-bottom:24px;font-size:11px;color:var(--muted)}.source-bar>span:before{content:'◈';color:var(--purple);margin-right:7px}.toc{position:sticky;top:117px;align-self:flex-start;width:180px;flex:0 0 180px;border-left:1px solid var(--line);padding-left:20px;margin-top:112px;max-height:calc(100vh - 150px);overflow:auto}.toc p{font-size:9px;margin-bottom:16px}.toc a{display:block;font-size:11px;line-height:1.6;color:#818792;margin-bottom:12px}.toc a:hover,.toc a[aria-current]{color:var(--purple)}.toc .toc-top{border-top:1px solid var(--line);padding-top:16px;margin-top:20px}.prose{font-size:14px;line-height:1.95}.prose p{color:#56606c}.prose h2{font-size:26px;margin:44px 0 18px;scroll-margin-top:110px;position:relative}.prose h3{font-size:19px;line-height:1.4;letter-spacing:-.02em;margin:28px 0 12px}.prose h4{font-size:16px;margin:24px 0 12px}.prose li{margin-bottom:9px;color:#56606c}.prose li::marker{color:#9376b7}.prose ul,.prose ol{padding-left:23px}.prose strong{color:var(--ink);font-weight:650}.prose blockquote{margin:22px 0;padding:12px 20px;background:#f5f2fa;border-left:3px solid #a27acb;font-size:13px}.prose blockquote p:last-child{margin-bottom:0}.prose code:not(pre code){background:#f0edf5;border:1px solid #e7e1ef;padding:2px 5px;border-radius:4px;color:#6b4592;font-size:.86em}.anchor{opacity:0;margin-left:8px;font-size:16px;color:#9e83c1}.prose h2:hover .anchor,.anchor:focus{opacity:1}.table-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:10px;margin:22px 0;max-width:100%}table{border-collapse:collapse;width:100%;font-size:12px;line-height:1.7;text-align:left}th{background:#f5f6f8;color:#626d78;font-size:10px;letter-spacing:.035em;font-weight:650;padding:13px 16px;border-bottom:1px solid var(--line)}td{padding:15px 16px;vertical-align:top;border-bottom:1px solid var(--line);min-width:140px}tr:last-child td{border-bottom:0}tr:nth-child(even){background:#fcfcfd}pre{position:relative;margin:20px 0;background:#f6f5f9;border:1px solid #e4dfeb;border-radius:10px;overflow:auto;padding:42px 20px 20px;font-size:12px;line-height:1.8;color:#473a59;max-height:510px;tab-size:2}pre code{font-size:12px;overflow-wrap:normal;white-space:pre}.copy-code{position:absolute;right:10px;top:8px;background:white;color:#6b567f;border:1px solid #ded5e8;border-radius:5px;padding:4px 9px;font-size:10px}.screenshot-note{font-size:11px;background:#fafbfc;padding:10px 13px;border:1px dashed var(--line);border-radius:6px;color:var(--muted)!important}.callout{background:#f7f4fb;border:1px solid #e9e0f5;border-left:3px solid #9e7acb;padding:16px 18px;border-radius:8px;font-size:12px;color:#6b5d7d;line-height:1.8;margin:22px 0}.callout strong{display:block;color:#514263;font-size:12px;margin-bottom:3px}.callout p:last-child{margin-bottom:0}.callout.success{background:var(--mint-light);border-color:#c6e8da;color:#386453}.callout.success strong{color:var(--mint)}.next-step{margin-top:45px;border:1px solid var(--line);border-radius:12px;padding:24px;display:flex;gap:20px;align-items:center;justify-content:space-between}.next-step h2{font-size:20px;margin:8px 0 0;max-width:340px}.next-step .button{flex-shrink:0;font-size:11px} +.interactive{background:#faf9fd;border:1px solid #e5dced;border-radius:16px;padding:28px;margin:24px 0 36px}.widget-heading{margin-bottom:22px}.step-tag{display:block;font-size:9px;font-weight:700;letter-spacing:.11em;text-transform:uppercase;color:var(--purple);margin-bottom:9px}.widget-heading h2{font-size:24px;margin-bottom:12px}.widget-heading p{font-size:12px;color:var(--muted);line-height:1.8;margin-bottom:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.form-grid label,.check-toolbar label,.filter-bar label{font-size:11px;font-weight:600;color:#636977;display:grid;gap:7px}input:not([type=checkbox]),select{width:100%;min-width:0;min-height:44px;border:1px solid #d9dce5;border-radius:7px;padding:10px 12px;font-size:12px;background:white;color:#3e4550;outline-offset:3px}input::placeholder{color:#9b9da7}select{padding-right:28px}.plan-result{background:white;border:1px solid #e5dcec;border-radius:10px;padding:20px;margin:20px 0 14px}.plan-result h3{font-size:19px;margin:7px 0 12px}.plan-result p,.plan-result li{font-size:12px;color:var(--muted)}.plan-result ol{padding-left:18px}.plan-result .button{margin-top:8px}.check-row{display:flex;gap:12px;align-items:flex-start;font-size:12px;color:#596471;line-height:1.8;padding:13px 0;cursor:pointer}.check-row input{width:17px;height:17px;flex-shrink:0;margin:3px 0 0;accent-color:var(--purple)}#request-result{margin-top:22px}.check-toolbar{display:flex;gap:20px;align-items:end;justify-content:space-between;margin-bottom:16px}.check-toolbar label{flex:1;max-width:240px}.progress-track{height:5px;border-radius:5px;background:#e5ddef;overflow:hidden;margin:20px 0 10px}.progress-track span{display:block;background:var(--mint);height:100%;width:0;transition:width .2s}.stat-strip{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid var(--line);border-radius:12px;margin:28px 0}.stat-strip>div{padding:18px 22px;border-right:1px solid var(--line);display:grid}.stat-strip>div:last-child{border:0}.stat-strip strong{font-size:29px;line-height:1.2;letter-spacing:-.04em}.stat-strip span{font-size:10px;color:var(--muted);margin-top:6px}.filter-bar{display:grid;grid-template-columns:2fr 1fr 1.5fr;gap:14px;margin-bottom:16px}.permission-table td:first-child{min-width:210px}.permission-table td:first-child strong{display:block;font:11px/1.7 ui-monospace,monospace;overflow-wrap:anywhere;margin-top:7px}.permission-table .eyebrow{font-size:8px;line-height:1.5}.boundary{display:block;font-size:10px;color:#89909a;margin-top:8px}.permission-table td{font-size:11px;min-width:140px}.permission-widget .table-scroll{max-height:670px;overflow:auto}.permission-widget thead{position:sticky;top:0;z-index:1}.problem-list{margin:25px 0}.problem-list details{border:1px solid var(--line);border-radius:9px;margin:10px 0;background:white}.problem-list summary{list-style:none;padding:18px;display:flex;align-items:center;gap:12px;font-size:13px;font-weight:600;cursor:pointer;line-height:1.6}.problem-list summary::-webkit-details-marker{display:none}.problem-list summary>span:last-child{margin-left:auto;color:var(--purple);font-size:18px}.problem-list details[open] summary{border-bottom:1px solid var(--line)}.problem-list details[open] summary>span:last-child{transform:rotate(45deg)}.problem-list details>div{padding:18px;font-size:13px;color:var(--muted)}.problem-list details p{line-height:1.9}.tag{font-size:9px;padding:2px 6px;border-radius:4px;color:var(--purple);background:var(--violet);white-space:nowrap}.download-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:30px 0 14px}.download-card{padding:23px;border:1px solid var(--line);border-radius:12px}.download-card h2{font-size:21px;margin:15px 0 10px}.download-card p{font-size:11px;color:var(--muted)}.download-card .button{font-size:11px;gap:10px}.download-card details{margin-top:20px;font-size:10px;color:var(--muted)}.download-card summary{cursor:pointer}.fingerprint{display:block;word-break:break-all;font-size:10px;margin-top:12px;line-height:1.8} +dialog{padding:25px;border:1px solid #e1d7ec;border-radius:16px;width:min(640px,92vw);max-height:82vh;box-shadow:0 25px 100px #20153144;color:var(--ink)}dialog::backdrop{background:#23143255;backdrop-filter:blur(4px)}.dialog-top{display:flex;justify-content:space-between;align-items:center;gap:20px}.dialog-top h2{font-size:23px;margin:0 0 20px}.dialog-top button{border:0;background:#f0edf4;color:#71598a;border-radius:7px;padding:6px 11px;margin-bottom:20px}#site-search{font-size:14px;padding:14px}#search-results{margin:14px 0;max-height:45vh;overflow:auto}#search-results a{display:block;border-radius:8px;padding:12px;color:var(--ink)}#search-results a:hover{background:#f5f0fa;text-decoration:none}#search-results strong{font-size:13px;display:block}#search-results span{display:block;font-size:11px;color:var(--muted);margin-top:4px}#search-results .empty{padding:18px 12px;font-size:13px;color:var(--muted)}body:has(dialog[open]){overflow:hidden}[hidden]{display:none!important} +@media(min-width:1700px){:root{--nav:275px}.sidebar{padding-left:28px;padding-right:28px}.page-wrap{padding-left:60px;padding-right:60px;gap:60px}.hero h1{font-size:65px}} +@media(max-width:1350px){.toc{display:none}.page-wrap{padding-left:38px;padding-right:38px}.hero{gap:28px}.hero-actions{gap:16px}.hero h1{font-size:48px}} +@media(max-width:1100px){:root{--nav:220px}.sidebar{padding:25px 12px}.topbar{padding:0 24px}.trust-link{display:none}.page-wrap{padding-left:30px;padding-right:30px}.hero{gap:25px;grid-template-columns:1fr}.connection-map{display:none}.hero h1{font-size:57px}.hero-description{max-width:630px}.hero{padding-bottom:42px}.hero-actions{flex-wrap:wrap}.journey{gap:17px}.journey h3{font-size:14px}.path-card{padding:22px}.card-top{gap:7px}.card-top .eyebrow{font-size:9px}.help-panel{padding:25px}.section-heading>p{max-width:200px}.next-step{flex-wrap:wrap}.interactive{padding:23px}.filter-bar{grid-template-columns:1fr 1fr}.filter-bar .search-label{grid-column:1/-1}} +@media(max-width:800px){:root{--header:72px}.topbar{padding:0 20px}.brand{font-size:21px}.brand svg{width:41px}.topbar nav{gap:10px}.search-button{padding:8px 10px;min-height:40px}.search-button kbd{display:none}.menu-button{display:block}.sidebar{transform:translateX(-100%);transition:transform .2s;width:275px;box-shadow:12px 0 30px #1f142316}.sidebar.is-open{transform:translateX(0)}.page-wrap{margin-left:0;padding:24px 26px 0}.hero{grid-template-columns:1.1fr .9fr;gap:26px}.hero h1{font-size:46px}.connection-map{display:block;padding:20px 17px}.map-clouds{gap:18px;margin-top:22px}.map-gate{gap:8px;padding:10px}.map-gate strong{font-size:10px}.map-gate small{font-size:8px}.hero-description{font-size:14px}.hero-actions .button{font-size:12px;gap:14px}.hero-footnote{font-size:10px}.section-heading h2,.journey-section h2{font-size:27px}.doc-page{max-width:760px}.page-heading h1{font-size:40px}.prose{font-size:14px}} +@media(max-width:600px){.topbar{padding:0 16px}.brand{font-size:19px;gap:8px}.brand-sub{font-size:8px}.brand svg{width:36px}.search-button{font-size:0;width:40px;justify-content:center;padding:0}.search-button:before{content:'⌕';font-size:25px;line-height:1}.menu-button{font-size:12px;padding:8px 10px;min-height:40px}.page-wrap{padding:20px 20px 0}.breadcrumb{margin-bottom:28px;font-size:10px}.hero{grid-template-columns:1fr;padding-top:0;padding-bottom:34px;gap:28px}.hero h1{font-size:48px;margin-top:20px}.hero-description{font-size:15px}.connection-map{display:block;max-width:none;padding:20px 22px}.map-clouds{margin-top:20px;gap:45px}.map-gate strong{font-size:12px}.map-gate small{font-size:9px}.map-line{height:20px}.map-clouds svg{width:30px;height:30px}.map-platform{padding:12px}.hero-actions{display:grid;gap:18px;justify-items:start}.section-heading{display:block}.section-heading>p{max-width:none;margin-top:12px}.path-grid{grid-template-columns:1fr;gap:14px;margin-bottom:20px}.path-card{padding:23px}.card-top{margin-bottom:20px}.path-card p{font-size:13px}.journey{grid-template-columns:1fr 1fr;gap:24px}.journey h3{font-size:16px}.journey p{font-size:12px}.help-panel{grid-template-columns:1fr;gap:18px;padding:24px}.help-panel h2{font-size:25px;max-width:none}.help-panel a{font-size:13px;padding:13px 0}footer{display:grid;margin-top:42px;padding-top:24px;gap:15px}footer>div:last-child{text-align:left}.page-heading h1{font-size:37px}.page-heading>p{font-size:15px}.eyebrow{font-size:9px}.source-bar{align-items:start;flex-wrap:wrap;font-size:10px}.prose h2{font-size:25px;margin-top:36px}.prose h3{font-size:19px}.table-scroll{margin-left:0;margin-right:0}td{min-width:160px;padding:13px}.form-grid{grid-template-columns:1fr;gap:15px}.interactive{padding:21px 18px;border-radius:12px;margin-top:24px}.widget-heading h2{font-size:24px}.check-toolbar{align-items:stretch;flex-direction:column;gap:12px}.check-toolbar label{max-width:none}.check-toolbar .button{align-self:start;font-size:11px;min-height:36px;padding:8px 10px}.stat-strip>div{padding:15px 11px}.stat-strip strong{font-size:27px}.stat-strip span{font-size:9px;line-height:1.6}.filter-bar{gap:12px}.permission-table td{min-width:170px}.permission-table td:first-child{min-width:205px}.download-grid{grid-template-columns:1fr}.download-card{padding:23px}.next-step{padding:22px;gap:20px}.next-step h2{font-size:23px}.next-step .button{font-size:12px;max-width:100%;white-space:normal}.problem-list summary{padding:16px 13px;gap:9px;font-size:12px}pre{font-size:11px;padding-left:15px;padding-right:15px}.callout{font-size:12px}.hero-footnote{line-height:1.7}} +@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{transition:none!important;animation:none!important}} +@media(max-width:800px){.sidebar{visibility:hidden}.sidebar.is-open{visibility:visible}} +@media print{.topbar,.sidebar,.toc,dialog,.hero-actions,.copy-code,.next-step,.interactive button,.source-bar{display:none!important}.page-wrap{margin:0;padding:0}.breadcrumb{margin-bottom:15px}.prose{font-size:11px}.page-heading h1{font-size:28px}.table-scroll{overflow:visible}pre{white-space:pre-wrap;max-height:none}pre code{white-space:pre-wrap}.anchor{display:none}.connection-map{box-shadow:none}.hero{display:block}.connection-map{display:none}footer{margin-top:25px}.interactive{break-inside:avoid}a{color:inherit}h2,h3{break-after:avoid}thead{display:table-header-group}} diff --git a/site/screenshots.json b/site/screenshots.json new file mode 100644 index 0000000..68b8db1 --- /dev/null +++ b/site/screenshots.json @@ -0,0 +1,16 @@ +{ + "reviewed": "2026-10-16", + "policy": "Publish only the explicitly reviewed navigation screenshots in guides.mjs. Never copy the full source assets folder. Client-secret, subscription-ID, trust-policy and existing-role inventory views are deliberately excluded.", + "repositoryScreenshots": { + "source": "https://github.com/transilienceai/docs/tree/079477426ae1df1a94f9ff43472826ba16e281c9/assets", + "publishedPath": "/screenshots/", + "transforms": "None; byte-for-byte copies. Captions clarify navigation-only use." + }, + "azureCloudShellToolbar": { + "file": "public/screenshots/azure-cloud-shell.png", + "source": "https://learn.microsoft.com/en-us/azure/cloud-shell/get-started/media/new-storage/shell-icon.png", + "reference": "https://learn.microsoft.com/en-us/azure/cloud-shell/get-started/new-storage", + "transforms": "None", + "review": "Public Microsoft Learn toolbar image; no credentials, tenant identity or customer data." + } +} diff --git a/site/serve.mjs b/site/serve.mjs new file mode 100644 index 0000000..960ab15 --- /dev/null +++ b/site/serve.mjs @@ -0,0 +1,16 @@ +import http from 'node:http'; +import fs from 'node:fs'; +import path from 'node:path'; +const base=path.resolve('dist'); +const types={'.html':'text/html; charset=utf-8','.css':'text/css; charset=utf-8','.js':'text/javascript; charset=utf-8','.json':'application/json','.svg':'image/svg+xml','.png':'image/png','.xml':'application/xml','.txt':'text/plain','.sh':'text/plain','.yaml':'text/plain'}; +http.createServer((req,res)=>{ + const pathname=decodeURIComponent(new URL(req.url,'http://localhost').pathname); + if(pathname==='/__responsive-preview/'){res.writeHead(200,{'Content-Type':'text/html; charset=utf-8'});res.end(fs.readFileSync('test/responsive-preview.html'));return;} + const requested=path.resolve(base,'.'+pathname); + if(!requested.startsWith(base+path.sep)&&requested!==base){res.writeHead(403);res.end();return;} + let file=requested; + if(fs.existsSync(file)&&fs.statSync(file).isDirectory())file=path.join(file,'index.html'); + let status=200;if(!fs.existsSync(file)){file=path.join(base,'404.html');status=404;} + res.writeHead(status,{'Content-Type':types[path.extname(file)]||'application/octet-stream'}); + fs.createReadStream(file).pipe(res); +}).listen(4790,'127.0.0.1',()=>console.log('Onboarding preview: http://127.0.0.1:4790')); diff --git a/site/test/portal.test.mjs b/site/test/portal.test.mjs new file mode 100644 index 0000000..a92c50a --- /dev/null +++ b/site/test/portal.test.mjs @@ -0,0 +1,41 @@ +import {test} from 'node:test'; +import assert from 'node:assert/strict'; +import fs from 'node:fs'; +import path from 'node:path'; +import crypto from 'node:crypto'; +import {execFileSync} from 'node:child_process'; +const base=path.resolve('dist'); +function files(dir){return fs.readdirSync(dir,{withFileTypes:true}).flatMap(f=>f.isDirectory()?files(path.join(dir,f.name)):[path.join(dir,f.name)]);} +const htmlFiles=files(base).filter(f=>f.endsWith('.html')); +const read=f=>fs.readFileSync(f,'utf8'); +const html=(route)=>read(path.join(base,route,'index.html')); +test('all 15 public guide pages and a real 404 are built',()=>{assert.equal(htmlFiles.length,16);assert.match(html('/'),/Connect your cloud/);assert.match(read(path.join(base,'404.html')),/404 — Guide not found/);}); +test('all local links, scripts, styles, downloads and anchor targets resolve',()=>{ + for(const f of htmlFiles){const text=read(f);for(const [,attr,url] of text.matchAll(/\b(href|src)="([^"]+)"/g)){ + if(!url.startsWith('/')&&!url.startsWith('#'))continue; + const parsed=new URL(url,'https://local/'+path.relative(base,f)); + let target=path.join(base,decodeURIComponent(parsed.pathname));if(fs.existsSync(target)&&fs.statSync(target).isDirectory())target=path.join(target,'index.html'); + assert.ok(fs.existsSync(target),`${f}: missing ${attr} ${url}`); + if(parsed.hash){assert.ok(read(target).includes(`id="${decodeURIComponent(parsed.hash.slice(1))}"`),`${f}: missing anchor ${url}`);} + }} +}); +test('permissions match source guide exactly: 12 RBAC, 43 Graph, 6 Defender',()=>{ + const data=JSON.parse(read(path.join(base,'permissions.json')));assert.equal(data.rbacCount,12);assert.equal(data.graphCount,43);assert.equal(data.mdeCount,6);assert.equal(data.permissions.length,64); + const source=read('../install/azure.md');for(const p of data.permissions.filter(p=>p.provider==='Azure'))assert.ok(source.includes(p.name)); + assert.equal(new Set(data.permissions.map(p=>p.plane+':'+p.name)).size,64); + assert.match(html('/permissions/'),/Graph permissions/);assert.match(html('/permissions/'),/App Configuration Data Reader/); +}); +test('downloaded artifacts match published fingerprints',()=>{const manifest=JSON.parse(read(path.join(base,'downloads/manifest.json')));for(const a of manifest.artifacts){const bytes=fs.readFileSync(path.join(base,'downloads',a.name));assert.equal(crypto.createHash('sha256').update(bytes).digest('hex'),a.sha256);assert.equal(bytes.length,a.bytes);assert.equal(Buffer.compare(bytes,fs.readFileSync(path.join('artifacts',a.name))),0);}}); +test('downloaded script parses but is never executed in tests',()=>{execFileSync('bash',['-n','artifacts/azure-compliance.sh']);}); +test('base AWS template keeps OIDC conditions, read audit policy and one CE operation',()=>{const yaml=read('artifacts/transilience-security-audit.yaml');assert.match(yaml,/sts:AssumeRoleWithWebIdentity/);assert.match(yaml,/oidc\.modal\.com:aud/);assert.match(yaml,/oidc\.modal\.com:sub/);assert.match(yaml,/SecurityAudit/);assert.match(yaml,/ce:GetCostAndUsage/);assert.doesNotMatch(yaml,/AWS::IAM::User|AWS::IAM::AccessKey|AdministratorAccess|AmazonEC2ContainerRegistryReadOnly/);}); +test('public pages embed only privacy-reviewed screenshots and never inline executable content',()=>{ + const allowed=new Set(['azure-cloud-shell.png','aws-manual-onboarding/03-iam-identity-providers.png','aws-manual-onboarding/05-configure-oidc-provider.png','aws-manual-onboarding/08-web-identity.png','aws-manual-onboarding/09-security-audit-policy.png','azure-manual-onboarding/10-reader-role.png','azure-manual-onboarding/12-sentinel-reader.png','azure-manual-onboarding/13-log-analytics-reader.png','azure-manual-onboarding/21-policy-read-all.png']); + for(const f of htmlFiles){const text=read(f);for(const [,src]of text.matchAll(/]+src="([^"]+)"/g))assert.ok(src.startsWith('/screenshots/')&&allowed.has(src.slice(13)),src);assert.doesNotMatch(text,/]*src=)[^>]*>/);assert.doesNotMatch(text,/\son(?:click|submit|load)=/i);assert.doesNotMatch(text,/type="password"/);assert.match(text,/Skip to content/);assert.match(text,/lang="en"/);} + assert.equal(files(path.join(base,'screenshots')).filter(f=>f.endsWith('.png')).length,9); +}); +test('human access is separate and download is a draft, not an email submission',()=>{const text=html('/aws/user-access/');assert.match(text,/SecurityAudit · recommended/);assert.match(text,/ViewOnlyAccess/);assert.match(text,/ReadOnlyAccess/);assert.match(text,/IAM console-only user/);assert.match(text,/not sent/);assert.doesNotMatch(text,/]+action=/);assert.doesNotMatch(text,/mailto:/);const app=read('public/app.js');assert.match(app,/DRAFT — NOT SENT — NO ACCESS GRANTED/);assert.match(app,/createAccessKeys:false/);assert.match(app,/mfaRequired:true/);}); +test('only the public search index is fetched and no input data is persisted',()=>{const app=read('public/app.js');assert.deepEqual([...app.matchAll(/fetch\('([^']+)'/g)].map(m=>m[1]),['/search-index.json']);assert.doesNotMatch(app,/XMLHttpRequest|sendBeacon|WebSocket|setInterval/);assert.match(app,/localStorage\.setItem\('transilience-onboarding-checks-'\+cloud,JSON\.stringify\(values\)\)/);}); +test('headers prevent credential form submissions, framing, external scripts and referrer leakage',()=>{const headers=read('public/_headers');for(const value of ["form-action 'none'","frame-ancestors 'none'","script-src 'self'","connect-src 'self'",'Referrer-Policy: no-referrer','X-Content-Type-Options: nosniff','Content-Disposition: attachment'])assert.ok(headers.includes(value));}); +test('search covers the real guides and every route has a canonical URL',()=>{const index=JSON.parse(read(path.join(base,'search-index.json')));assert.equal(index.length,15);assert.ok(index.find(p=>p.url==='/azure/manual/').text.includes('Directory.Read.All'));for(const f of htmlFiles)assert.match(read(f),/m[1]);assert.equal(ids.length,new Set(ids).size,f);for(const [,tag] of text.matchAll(/<(button\b[^>]*)>/g))assert.match(tag,/type="(?:button|submit)"/);}}); +test('mobile-hidden navigation is not focusable and search preserves real link semantics',()=>{assert.match(read('public/styles.css'),/\.sidebar\{visibility:hidden\}\.sidebar\.is-open\{visibility:visible\}/);const app=read('public/app.js');assert.doesNotMatch(app,/a\.setAttribute\('role','listitem'\)/);assert.match(app,/row\.setAttribute\('role','listitem'\)/);assert.match(app,/ArrowDown/);assert.match(app,/ArrowUp/);}); diff --git a/site/test/responsive-preview.html b/site/test/responsive-preview.html new file mode 100644 index 0000000..35c4ca9 --- /dev/null +++ b/site/test/responsive-preview.html @@ -0,0 +1 @@ +Local responsive QA · not published

Responsive QA · 390 px × 844 px

Local-only same-origin frames exercise real CSS breakpoints. This fixture is not part of the deployed site.

Home & navigation

Permission explorer

AWS engineer access

diff --git a/site/test/simple-setup.test.mjs b/site/test/simple-setup.test.mjs new file mode 100644 index 0000000..e45660c --- /dev/null +++ b/site/test/simple-setup.test.mjs @@ -0,0 +1,52 @@ +import {test} from 'node:test'; +import assert from 'node:assert/strict'; +import fs from 'node:fs'; +import {setupRoutes,screenshotAssets} from '../guides.mjs'; +const read=route=>fs.readFileSync(`dist${route}index.html`,'utf8'); +test('each cloud/method begins with Permissions, Install, Verify and an Audit default',()=>{ + for(const route of Object.keys(setupRoutes)){ + const html=read(route);assert.match(html,/data-setup-guide/); + for(const step of ['permissions','install','verify'])assert.match(html,new RegExp(`id="${step}"`)); + assert.match(html,//); + assert.match(html,//); + assert.match(html,//); + assert.match(html,/
/); + assert.ok(html.includes('{ + const html=read('/');assert.match(html,/Connect your cloud\./); + for(const route of Object.keys(setupRoutes))assert.ok(html.includes(`href="${route}"`)); + assert.doesNotMatch(html,/Build my onboarding plan|class="connection-map"|class="journey"/); + assert.match(html,/Cloud · AWS/);assert.match(html,/Cloud · Azure/); +}); +test('logs-only is never silently mapped to broader automated install permissions',()=>{ + assert.match(read('/aws/cloudformation/'),/standard audit stack always includes SecurityAudit/); + assert.match(read('/aws/cloudformation/'),/\/aws\/manual\/\?permissions=logs#install/); + assert.match(read('/azure/cloud-shell/'),/--tier logs also grants Reader and Security Reader/); + assert.match(read('/azure/cloud-shell/'),/\/azure\/manual\/\?permissions=logs#install/); + assert.match(read('/aws/manual/'),/Do not attach SecurityAudit for Logs only/); + assert.match(read('/azure/manual/'),/Do not add subscription-wide audit roles for a logs-only approval/); +}); +test('Azure starts with narrow subscription flags, dry run and no implicit tenant consent',()=>{ + const html=read('/azure/cloud-shell/'); + assert.match(html,/--tier posture --no-entra/);assert.match(html,/--tier logs --no-entra/); + assert.match(html,/--subscriptions '|--subscriptions '<APPROVED_SUBSCRIPTION_IDS>'/); + assert.match(html,/--dry-run/);assert.match(html,/--workspace-ids/); + assert.doesNotMatch(html,/\n\+ --scope/); + assert.doesNotMatch(html,/bash[^<]*--all-subscriptions/); +}); +test('bucket selection is URL-local and does not invent a provider API or persist identity',()=>{ + const app=fs.readFileSync('public/app.js','utf8'); + assert.match(app,/allowed=\['audit','logs','both'\]/);assert.match(app,/history\.replaceState/); + assert.match(app,/popstate/);assert.match(app,/panel\.hidden=panel\.dataset\.permissionPanel!==bucket/); + assert.doesNotMatch(app,/localStorage.*permissions|fetch\([^)]*permissions/); +}); +test('technical reference cannot be mistaken for the selected minimal bucket',()=>{ + for(const route of Object.keys(setupRoutes))assert.match(read(route),/Do not grant every role or API permission in this reference/); +}); +test('reviewed source screenshots are byte-for-byte copies, with secret/identity views excluded',()=>{ + for(const asset of screenshotAssets)assert.equal(Buffer.compare(fs.readFileSync(`../assets/${asset}`),fs.readFileSync(`dist/screenshots/${asset}`)),0); + assert.ok(!screenshotAssets.some(x=>/secret|registered-application|trust-policy|subscription-id/.test(x))); +}); diff --git a/site/wrangler.toml b/site/wrangler.toml new file mode 100644 index 0000000..b1537fa --- /dev/null +++ b/site/wrangler.toml @@ -0,0 +1,3 @@ +name = "transilience-cloud-onboarding" +pages_build_output_dir = "./dist" +compatibility_date = "2026-10-14"