Update CLAUDE.md with detailed info about pulp-service#955
Open
Update CLAUDE.md with detailed info about pulp-service#955
Conversation
Contributor
Reviewer's GuideExpands and restructures CLAUDE.md to provide a richer, task-oriented reference for the pulp-service plugin, including architecture, middleware, auth, context vars, environment and development workflows, while adding deployment and style/checklist guidance. Sequence diagram for request flow through pulp-service middleware and viewsetssequenceDiagram
actor Client
participant LoadBalancer
participant Gunicorn as Gunicorn_WSGI
participant UserExtraction as UserExtractionMiddleware
participant DjangoMW as DjangoMiddlewareStack
participant ViewSet as DRF_ViewSet
Client->>LoadBalancer: HTTP request
LoadBalancer->>Gunicorn: Forward request
Note over LoadBalancer,Gunicorn: Sets X_Forwarded_For and X_RH_IDENTITY
Gunicorn->>UserExtraction: Call WSGI app
UserExtraction->>UserExtraction: Decode base64 X_RH_IDENTITY
UserExtraction->>UserExtraction: Set REMOTE_USER and ORG_ID
UserExtraction->>DjangoMW: Pass request to Django
DjangoMW->>DjangoMW: ProfilerMiddleware (optional)
DjangoMW->>DjangoMW: RhEdgeHostMiddleware
DjangoMW->>DjangoMW: RHSamlAuthHeaderMiddleware (pulp_mgmt paths)
DjangoMW->>DjangoMW: RequestPathMiddleware (set request_path_var)
DjangoMW->>DjangoMW: ActiveConnectionsMetricMiddleware
DjangoMW->>ViewSet: Dispatch to DRF ViewSet
ViewSet->>ViewSet: Authentication using X_RH_IDENTITY
ViewSet->>ViewSet: Authorization with DomainOrg and ContextVars
ViewSet-->>Client: HTTP response
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
dkliban
reviewed
Mar 3, 2026
| | **Authentication** | `pulp_service/app/authentication.py` | X.509 cert, SAML, registry auth backends | | ||
| | **Authorization** | `pulp_service/app/authorization.py` | Domain-based RBAC permissions | | ||
| | **Middleware** | `pulp_service/app/middleware.py` | Profiler, edge host, SAML, OTEL metrics | | ||
| | **Storage** | `pulp_service/app/storage.py` | AIPCCStorageBackend, OCIStorageBackend | |
Member
There was a problem hiding this comment.
i don't think we have an AIPCCStorageBackend
dkliban
reviewed
Mar 3, 2026
| **Three-service model:** | ||
| 1. **pulp-api** — Gunicorn WSGI serving Django REST API (port 24817 local, 8000 prod) | ||
| 2. **pulp-content** — Gunicorn + aiohttp async content delivery (port 24816 local, 8000 prod) | ||
| 3. **pulp-worker** — Celery workers for background tasks (Redis broker) |
Member
There was a problem hiding this comment.
Celery is not used. We use a RedisWorker that is in this repository. Though I am working on contributing it upstream.
dkliban
reviewed
Mar 3, 2026
| - **Authentication**: `X-RH-IDENTITY` header (base64-encoded JSON) → custom auth classes in `app/authentication.py` | ||
| - **Multi-tenancy**: `DomainOrg` model maps org_id → Pulp domain; domain-based routing for content APIs | ||
| - **Context variables**: `ContextVar` instances in `app/middleware.py` carry request-scoped data (org_id, user_id, request_path) across layers | ||
| - **Storage backends**: `AIPCCStorageBackend` (S3) and `OCIStorageBackend` (OCI/ORAS) in `app/storage.py` |
Member
There was a problem hiding this comment.
There is no AIPCCStorageBackend.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Improve and expand the CLAUDE.md contributor guide with detailed architecture, component index, and operational reference for the pulp-service plugin.
Documentation: