Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ tags:
description: APIs for taking and retrieving webpage screenshots, specifically for consent banner analysis
- name: llmo
description: LLMO (Large Language Model Optimizer) operations
- name: cdn-logs-infrastructure
description: APIs for CDN logs infrastructure management

paths:
/audits/latest/{auditType}:
Expand Down Expand Up @@ -235,6 +237,8 @@ paths:
$ref: './llmo-api.yaml#/llmo-customer-intent-item'
/sites/{siteId}/llmo/cdn-logs-filter:
$ref: './llmo-api.yaml#/llmo-cdn-logs-filter'
/cdn-logs-infrastructure/provision:
$ref: './tools-api.yaml#/cdn-logs-infrastructure-provision'

components:
securitySchemes:
Expand Down
39 changes: 39 additions & 0 deletions docs/openapi/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3506,3 +3506,42 @@ LlmoConfig:
description: The CDN logs filter configuration for filtering log entries
$ref: '#/LlmoCdnLogsFilter'
additionalProperties: false

# CDN Logs Infrastructure Schemas
CdnLogsInfrastructureProvisionRequest:
type: object
required:
- orgId
properties:
orgId:
type: string
description: Organization identifier (alphanumeric, optionally ending with @AdobeOrg)
example: "adobe123"
orgName:
type: string
description: Organization name (optional)
example: "Adobe Inc"

CdnLogsInfrastructureProvisionResponse:
type: object
properties:
message:
type: string
description: Success message describing what was created/retrieved
example: "Bucket 'cdn-logs-adobe123' created successfully with new credentials"
bucketName:
type: string
description: The S3 bucket name
example: "cdn-logs-adobe"
accessKey:
type: string
description: AWS access key for the bucket
example: "AKIAIOSFODNN7EXAMPLE"
secretKey:
type: string
description: AWS secret key for the bucket
example: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
region:
type: string
description: AWS region where the bucket was created
example: "us-east-1"
46 changes: 46 additions & 0 deletions docs/openapi/tools-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,49 @@ file-download:
$ref: './responses.yaml#/500'
security:
- scoped_api_key: [ ]

cdn-logs-infrastructure-provision:
put:
tags:
- cdn-logs-infrastructure
summary: Provision CDN logs infrastructure
description: |
Provisions S3 bucket and IAM credentials for CDN logs storage.
This endpoint follows an idempotent pattern:

**If resources do NOT exist:** Creates a new S3 bucket with proper encryption,
access controls, IAM policy, IAM user, and stores credentials in AWS Secrets Manager.

**If resources already exist:** Retrieves the existing bucket and credentials
without creating duplicates.

This ensures that calling the endpoint multiple times with the same organization ID
will not create duplicate resources, making it safe for automated provisioning workflows.

**AWS resources provisioned:**
- S3 bucket with AES256 encryption and public access blocked
- IAM policy for bucket access (write-only to /raw folder)
- IAM user with access keys
- Credentials stored in AWS Secrets Manager with proper tagging
operationId: provisionCdnLogsInfrastructure
requestBody:
required: true
content:
application/json:
schema:
$ref: './schemas.yaml#/CdnLogsInfrastructureProvisionRequest'
responses:
'200':
description: Infrastructure provisioned successfully
content:
application/json:
schema:
$ref: './schemas.yaml#/CdnLogsInfrastructureProvisionResponse'
'400':
description: Bad request - missing or invalid parameters
'403':
description: Forbidden - admin access required
'500':
description: Internal server error
security:
- admin_key: []
Loading