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 PendingCertificateRequest they have previously submitted.
  • Precondition: Only requests with a pending status can be cancelled. Attempts to cancel requests in other statuses will be rejected.
  • Process: Updates the request's status to rejected, records the rejected_at timestamp, and notes Cancelled by requester as the rejection_reason.

Get User Statistics

  • Endpoint: GET /my-requests/stats
  • Description: Provides a summary of the authenticated user's PKI activities.
  • Statistics Included:
    • Count of pending certificate requests.
    • Count of approved certificate requests.
    • Count of rejected certificate requests.
    • Count of active certificates issued to the user.
    • A summary of recent_activity (last 30 days).

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_at for requests; created_at, valid_until for 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 MyRequestsController are 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 index and getMyStats endpoints 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 within Certificate and PendingCertificateRequest models to associate PKI assets with specific users.

Vous n'avez pas envie de la manager ?

Découvrir notre offre PKI As A Service