If protected custom settings or metadata are not compatible with your integration tools or architecture, here are the recommended secure alternatives for storing secrets and API keys:
1. **Named Credentials**: Securely store authentication data like client IDs and secrets for callouts. However, note that administrators can view these credentials, so they are best for locally generated or per-org secrets.
2. **Protected Custom Metadata API Fields**: This is a preferred method for securely storing secrets in managed packages. It ensures sensitive data is not accessible or modifiable by unauthorized users or packages. However, ensure the metadata is not accessible through the License Management Application (LMA) if that's a concern.
3. **Encrypted Custom Objects**: Store encrypted secrets in custom objects, and keep the encryption key separately in a protected custom setting or a hidden custom metadata API field. Use Apex Crypto calls to handle encryption and decryption securely.
Make sure to configure permissions properly for fields containing encrypted secrets to maintain security. Each method has specific use cases, so choose based on your application's security, performance, and accessibility needs.