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
/* eslint-disable @typescript-eslint/no-explicit-any */ | |
export function redactSpecifiedProperties(target: any, fields: string[], redactedMessage = 'REDACTED'): any { | |
// Return if target is not a redactable datatype or no redactable fields were provided | |
if (!target || typeof target !== 'object' || fields?.length === 0) { | |
return target; | |
} | |
// Iterate through all items in an array | |
if (Array.isArray(target)) { | |
return target.map(item => redactSpecifiedProperties(item, fields, redactedMessage)); |
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
#!/bin/bash | |
# SSL certificates should have a validity period of less than 398 days | |
# * https://chromium.googlesource.com/chromium/src/+/master/net/docs/certificate_lifetimes.md | |
# * https://support.apple.com/en-us/102028 | |
# Create Private Key | |
openssl genrsa -out key.pem 2048 | |
# Create Certificate Signing Request |