Prepare Your Oracle Cloud Infrastructure Environment
Your environment should have a certain structure and set of permissions. This will allow you to isolate the blockchain event system from the rest of your projects in the tenancy.
You control access to compartments by creating groups of users and assigning policies that specify what actions the group members can take on the resources in those compartments.
Create a Compartment
Create a compartment that is used solely for containing the artifacts, configuration, and other resources that are related to the events that come from the blockchain.
- Log in to the Oracle Cloud Infrastructure Console as a user that has Administrator privileges.
- In the Console navigation menu, select Identity then click Compartment.
- Click Create Compartment.
- Enter OBP_Events as the name of the new compartment, enter a suitable description, and make sure that Parent Compartment is your root compartment.
- Click Create Compartment.
- After the compartment is created, make a record of its OCID. You will need the OCID later when you create a Dynamic Group and when you modify the
terraform.tfvars
file.
Create Groups
You need to create two groups. One is a regular Group that will have a list of users. The other is a Dynamic Group
- Create a Group.
- In the Console navigation menu, select Identity and click Groups.
- Click Create Group.
- Enter OBP_Events_Group as the name of the Group, enter a suitable description, and then click Create.
- Add your user to the group. Click OBP_Events_Group and then click Add User to Group and select your user from the list.
- Create a Dynamic Group.
Configure Policies
A Policy is a set of statements that specify access controls to Oracle Cloud Infrastructure resources in your tenancy.
The Policy that you create will grant access and permissions to the Group and the Dynamic Group that you created earlier. It will also allow the Functions service to access the network and repository.
Generate an Auth Token
Generate a token to use when pushing your Functions code to Oracle Cloud Infrastructure Registry.
- In the Console navigation menu, select Identity and click Users.
- Select the user that you want to generate a token for.
- In the Resources section, click Auth Tokens then click Generate Token.
- In the window that opens, enter a suitable description and click Generate Token.
- Copy the token and save it so that you can retrieve it later. The token is only displayed once.
- Click Close.