Use Case:
In this section, we will demonstrate how to create a secret in Oracle Cloud Infrastructure (OCI) Vault for securely storing your keys. Additionally, we will outline the process for retrieving secret keys using the Secret OCI ID from the OCI Vault through Oracle Integration Cloud.
- In Oracle Cloud Infrastructure (OCI) Vault, a "secret" refers to confidential and sensitive information securely stored within the vault. This can include database passwords, SSH keys, SSL certificates, API keys, and other credentials that require protection from unauthorized access.
- OCI Vault enables effective management and control over these secrets within your Oracle Cloud environment. The service provides robust security features such as encryption at rest and in transit, access controls, auditing capabilities, and seamless integration with other OCI services.
Part1: Create secret in OCI Vault to store your keys.
Implementation steps:
- Create vault
- Create key
- Create secret
Part2: Get the keys from vault using OIC integrations.
Implementation steps:
- Create a Rest connection for the OCI vault using vault secret retrieval API, tenancy OCID, User OCID, Private Key with finger print and optional passphrase. Security policy as OCI Signature Version 1. Check this blog- how to get all the details: https://soalicious.blogspot.com/2022/09/oci-how-to-get-tenancy-ocid-user-ocid.html
- Create a rest trigger to get the secret key
- Resource url: /mydata/{secretId}
- Get method
- Query param: versionNumber
- Json response as {"Name":"","Value":""}
- Configure vault rest api invoke as below
- Resource uri: /20190301/secretbundles/{secretId}
- GET method
- Add versionNumber Query param
- Add json as response
- Map the trigger secrect id and version number.
- Map the content response to integration response. Use decodeBase64() function to decode the content.
Step1: create a Vault Rest connection:
Step2: Create application integration to configure trigger
Reference:
https://medium.com/@bimands/create-secret-to-store-your-keys-and-access-from-oic-e23bf2613792
No comments:
Post a Comment