Documentation
¶
Index ¶
- func BadPeerSvidResponse(cid string, w http.ResponseWriter, spiffeid string, j data.JournalEntry)
- func BadSvidResponse(cid string, w http.ResponseWriter, spiffeid string, j data.JournalEntry)
- func NoSecretResponse(cid string, w http.ResponseWriter, j data.JournalEntry)
- func SuccessResponse(cid string, w http.ResponseWriter, j data.JournalEntry, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadPeerSvidResponse ¶
func BadPeerSvidResponse( cid string, w http.ResponseWriter, spiffeid string, j data.JournalEntry, )
BadPeerSvidResponse logs an event for a bad peer SPIFFE ID and sends an HTTP 400 Bad Request response. This function is used when the peer SPIFFE ID in a mutual TLS session is found to be invalid or unacceptable.
Parameters:
- cid (string): Correlation ID for operation tracing and logging.
- w (http.ResponseWriter): The HTTP response writer to send back the response.
- spiffeid (string): The peer's SPIFFE ID that was found to be invalid. - j (audit.JournalEntry): An audit journal entry for recording the event.
func BadSvidResponse ¶
func BadSvidResponse( cid string, w http.ResponseWriter, spiffeid string, j data.JournalEntry, )
BadSvidResponse logs an event for a bad SPIFFE ID and sends an HTTP 400 Bad Request response. This function is typically invoked when the SPIFFE ID provided in a request is invalid or malformed.
Parameters:
- cid (string): Correlation ID for operation tracing and logging.
- w (http.ResponseWriter): The HTTP response writer to send back the response.
- spiffeid (string): The SPIFFE ID that was determined to be invalid.
- j (audit.JournalEntry): An audit journal entry for recording the event.
func NoSecretResponse ¶
func NoSecretResponse( cid string, w http.ResponseWriter, j data.JournalEntry, )
NoSecretResponse logs an event indicating that no secret was found and sends an HTTP 404 Not Found response. This function is invoked when a request for a secret results in no matching secret being available.
Parameters:
- cid (string): Correlation ID for operation tracing and logging.
- w (http.ResponseWriter): The HTTP response writer to send back the response.
- j (audit.JournalEntry): An audit journal entry for recording the event.
func SuccessResponse ¶
func SuccessResponse(cid string, w http.ResponseWriter, j data.JournalEntry, sfr reqres.SecretFetchResponse)
SuccessResponse logs a successful operation event and sends a structured success response back to the client. It marshals and sends a secret fetch response, indicating the successful retrieval of a secret.
Parameters:
- cid (string): Correlation ID for operation tracing and logging.
- w (http.ResponseWriter): The HTTP response writer to send back the response.
- j (audit.JournalEntry): An audit journal entry for recording the event.
- sfr (reqres.SecretFetchResponse): The secret fetch response payload to be marshaled and sent.
Types ¶
This section is empty.