User Requests Overview
This section describes the functionalities available for authenticated users to manage their own certificate requests and view their issued certificates within the system. It provides a personalized dashboard for individual PKI activities.
Key Functionalities
List User Requests and Certificates
- Endpoint:
GET /my-requests - Description: Displays a consolidated view of the authenticated user's pending certificate requests and their issued certificates.
- Pagination: Both pending requests and issued certificates are paginated for easier navigation.
- API Support: The endpoint can return data in JSON format if requested by an API client, making it suitable for integration with external applications.
Show Request Details
- Endpoint:
GET /my-requests/{request} - Description: Provides detailed information for a specific
PendingCertificateRequest. - Access Control: Strictly enforces ownership, ensuring that a user can only view the details of requests they have submitted.
Cancel Pending Request
- Endpoint:
POST /my-requests/{request}/cancel - Description: Allows an authenticated user to cancel a
PendingCertificateRequestthey have previously submitted. - Precondition: Only requests with a
pendingstatus can be cancelled. Attempts to cancel requests in other statuses will be rejected. - Process: Updates the request's status to
rejected, records therejected_attimestamp, and notesCancelled by requesteras therejection_reason.
Get User Statistics
- Endpoint:
GET /my-requests/stats - Description: Provides a summary of the authenticated user's PKI activities.
- Statistics Included:
- Count of
pendingcertificate requests. - Count of
approvedcertificate requests. - Count of
rejectedcertificate requests. - Count of
activecertificates issued to the user. - A summary of
recent_activity(last 30 days).
- Count of
Get Recent Activity
- Description: A private helper method that fetches the 10 most recent pending requests and 10 most recent issued certificates for the authenticated user within the last 30 days.
- Data Points: Includes
id,common_name,status, and relevant timestamps (requested_at,approved_at,rejected_atfor requests;created_at,valid_untilfor certificates).
Inferred Specifications
- User Self-Service Portal: The system provides a dedicated portal for users to independently track and manage their own certificate requests and issued certificates.
- Strict Ownership Enforcement: All operations within
MyRequestsControllerare subject to strict ownership checks, ensuring that users can only interact with their own PKI assets, preventing unauthorized access or manipulation. - Request Lifecycle Management: Users have the ability to cancel their pending requests, providing control over their submissions before approval.
- Personalized PKI Dashboard: The
indexandgetMyStatsendpoints collectively form a personalized dashboard, offering users a clear overview of their current PKI status and recent activities. - API-First Design: The controller supports both traditional web views and JSON API responses, indicating a design that facilitates integration with various client applications.
- Metadata-Driven User Association: The system relies on metadata (e.g.,
requester_email,uploaded_by) stored withinCertificateandPendingCertificateRequestmodels to associate PKI assets with specific users.
Vous n'avez pas envie de la manager ?
Découvrir notre offre PKI As A Service