Skip to content

Commit 9d66f7c

Browse files
committed
MB-46113: Restrict sync gateway architect role
Removed access to certain permissions for the sync_gateway_configurator role as well as move the sync gateway dev_ops permission to the top level cluster-wide permission instead of being located under collections like the rest of the permissions. Change-Id: I475b03191a5466c2625a27cc3892e0ff94c99e45 Reviewed-on: http://review.couchbase.org/c/ns_server/+/158962 Tested-by: Bryan McCoid <[email protected]> Tested-by: Build Bot <[email protected]> Well-Formed: Build Bot <[email protected]> Reviewed-by: Steve Watanabe <[email protected]>
1 parent d712f1a commit 9d66f7c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/menelaus_roles.erl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,10 @@ sync_gateway_roles(true) ->
593593
{desc, <<"Can manage Sync Gateway databases and users, "
594594
"and access Sync Gateway's /metrics endpoint. "
595595
"This user cannot read application data.">>}],
596-
[{[{collection, ?RBAC_COLLECTION_PARAMS}, sgw], all}]},
596+
[{[{collection, [any, any, any]}, sgw, appdata], none},
597+
{[{collection, [any, any, any]}, sgw, principal_appdata], none},
598+
{[{collection, [any, any, any]}, sgw, replications], none},
599+
{[{collection, ?RBAC_COLLECTION_PARAMS}, sgw], all}]},
597600
{sync_gateway_app, ?RBAC_COLLECTION_PARAMS,
598601
[{name, <<"Sync Gateway Application">>},
599602
{folder, mobile},
@@ -624,7 +627,7 @@ sync_gateway_roles(true) ->
624627
{desc, <<"Can manage Sync Gateway node-level configuration, "
625628
"and access Sync Gateway's /metrics endpoint "
626629
"for Prometheus integration.">>}],
627-
[{[{collection, [any, any, any]}, sgw, dev_ops], all},
630+
[{[sgw, dev_ops], all},
628631
{[admin, stats_export], [read]}]}];
629632
sync_gateway_roles(false) ->
630633
[].

0 commit comments

Comments
 (0)