Skip to content

Commit 60342c0

Browse files
committed
updated policies for EBS
1 parent d599b4e commit 60342c0

File tree

3 files changed

+11
-31
lines changed

3 files changed

+11
-31
lines changed

cloud-foundation/modules/cloud-foundation-library/identity/module/application.tf

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -75,47 +75,23 @@ locals {
7575
"manage ons-family", "manage alarms", "manage metrics", "manage logs", "manage cloudevents-rules",
7676
# Resource manager
7777
"manage orm-stacks", "manage orm-jobs", "manage orm-config-source-providers",
78+
#File Storage Service
79+
"manage file-systems", "manage export-sets",
7880

7981
# read
8082
"read all-resources", "read audit-events", "read work-requests", "read instance-agent-plugins"
8183
] ),
8284

8385
var.application_type == "ebs" #adds additional database policy grants needed for ebs admins
8486
? formatlist ("allow group %%s to %s in compartment %%s",[
85-
"manage database-family", "manage autonomous-database-family",
87+
"manage database-family", "manage autonomous-database-family", "manage load-balancers", "manage tag-namespaces"
8688
])
8789
: []
8890

89-
) # TODO: make clear seperation of Landing Zone statements and CM statements
90-
91-
92-
93-
# TODO: clean up documentation
94-
95-
# taken from EBS demo stack -- https://docs.oracle.com/cd/E26401_01/doc.122/f35809/T679330T679339.htm#T679469
96-
ebscm_statements = concat (
97-
local.app_statements,
98-
formatlist("allow group %%s to %s in compartment %%s",[
99-
"manage load-balancers", "manage tag-namespaces",
100-
"manage database-family" # not in docs but I think is necessary to create an ebs environment
101-
]),
102-
var.with_identity_domains ? ["allow group %%s to use domains in compartment %%s"] : [] #docs say scope to tenancy
10391
)
10492

105-
/*
106-
#tenancy
107-
formatlist( "allow group ${oci_identity_group.application[0].name} to %s in tenancy", [
108-
"manage buckets", "manage objects", "manage app-catalog-listing", "inspect compartments",
109-
"inspect users", "inspect groups", "use tag-namespaces"
110-
]),
111-
formatlist( "allow group ${oci_identity_group.application[0].name} to %s in compartment ${oci_identity_compartment.application[0].name}", [
112-
"manage database-family", "manage instance-family", "manage load-balancers",
113-
"manage tag-namespaces", "manage virtual-network-family", "manage volume-family"
114-
]),
115-
*/
116-
11793

118-
applied_statement = local.app_statements #TODO add support for ebs application type
94+
applied_statement = local.app_statements
11995

12096
}
12197

cloud-foundation/modules/cloud-foundation-library/identity/module/general.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ resource "oci_identity_policy" "general" {
2727
description = "general policy applying to any user"
2828
name = "general"
2929
statements = concat(formatlist("allow any-user to %s in tenancy", [
30-
"read app-catalog-listing", "read instance-images", "read repos", "inspect users", "inspect groups", "inspect dynamic-groups"
31-
]))
30+
"inspect buckets", "inspect compartments", "read app-catalog-listing", "read instance-images", "read repos", "inspect users", "inspect groups", "inspect dynamic-groups"
31+
]),
32+
"allow any-user to use tag-namespaces in tenancy where target.tag-namespace.name='Oracle-Tags'"
33+
)
3234
}

cloud-foundation/modules/cloud-foundation-library/identity/module/network.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ resource "oci_identity_policy" "network" {
7676
]),
7777
# network users in network compartment
7878
formatlist("allow group ${oci_identity_group.network_service[0].name} to %s in compartment ${oci_identity_compartment.network[0].name}", [
79-
"read virtual-network-family", "use subnets", "use network-security-groups", "use vnics", "use load-balancers"
79+
"use virtual-network-family",
80+
# File Storage Service
81+
"manage export-sets", "use mount-targets", "use file-systems"
8082
]),
8183
)
8284
}

0 commit comments

Comments
 (0)