This module generates authorization policies and context-based restriction (CBR) rules to enable access and restrictions between a source service and a target service.
module "service_auth_cbr_rules" {
source = "terraform-ibm-modules/s2s-auth/ibm"
version = "X.X.X" # Replace "X.X.X" with a release version to lock into a specific release
service_map = [
{
"description"= "This is a test auth policy",
"enforcement_mode"= "report",
"roles"= [
"Reader"
],
"source_resource_instance_id"= "<source_resource_instance_guid>",
"source_service_name"= "cloud-object-storage",
"target_resource_instance_id"= "<target_resource_instance_guid>",
"target_service_name"= "kms"
},
{
"description"= "This is a test auth policy",
"enforcement_mode"= "report",
"roles"= [
"Reader"
],
"source_rg"= "<source_rg>",
"source_service_name"= "containers-kubernetes",
"target_rg"= "<target_rg>",
"target_service_name"= "kms"
}
]
}
You need the following permissions to run this module.
- You must have access to the target service to create an authorization between services. You can grant only the level of access that you have as a user of the target service. For example, if you have viewer access on the target service, you can assign only the viewer role for the authorization.
Name | Version |
---|---|
terraform | >= 1.3.0 |
ibm | >= 1.70.0, <2.0.0 |
Name | Source | Version |
---|---|---|
cbr_rules | terraform-ibm-modules/cbr/ibm//modules/cbr-service-profile | 1.29.0 |
Name | Type |
---|---|
ibm_iam_authorization_policy.auth_policies | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cbr_target_service_details | Details of the target service for which the rule has to be created. | list(object({ |
[] |
no |
prefix | Prefix for new CBR zones and rules. | string |
null |
no |
service_map | Map of source service and the corresponding target service details. | list(object({ |
[] |
no |
zone_service_ref_list | Service reference for the zone creation. | map(object({ |
{} |
no |
zone_vpc_crn_list | CRN of the VPC for the zones. | list(string) |
[] |
no |
Name | Description |
---|---|
auth_policies | Authorizations created |
cbr_rules | CBR Rules created |
You can report issues and request features for this module in GitHub issues in the module repo. See Report an issue or request a feature.
To set up your local development environment, see Local development setup in the project documentation.