Skip to content

Commit 6a3560b

Browse files
committed
MB-47612: New RBAC roles and privileges for Sync Gateway
Added sync gateway roles to main list of roles; upgraded from only being available in developer preview. Change-Id: I58b9b6e7e98bf66182a5843acdb958e48cc8a9d0 Reviewed-on: http://review.couchbase.org/c/ns_server/+/158761 Well-Formed: Build Bot <[email protected]> Tested-by: Build Bot <[email protected]> Reviewed-by: Artem Stemkovski <[email protected]>
1 parent 0504c09 commit 6a3560b

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

src/menelaus_roles.erl

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,45 @@ roles() ->
560560
{[admin, memcached, idle], [write]},
561561
{[settings, autocompaction], [read]},
562562
{[pools], [read]}]},
563+
{sync_gateway_configurator, ?RBAC_COLLECTION_PARAMS,
564+
[{name, <<"Sync Gateway Architect">>},
565+
{folder, mobile},
566+
{desc, <<"Can manage Sync Gateway databases and users, "
567+
"and access Sync Gateway's /metrics endpoint. "
568+
"This user cannot read application data.">>}],
569+
[{[{collection, ?RBAC_COLLECTION_PARAMS}, sgw], all}]},
570+
{sync_gateway_app, ?RBAC_COLLECTION_PARAMS,
571+
[{name, <<"Sync Gateway Application">>},
572+
{folder, mobile},
573+
{desc, <<"Can manage Sync Gateway users and roles, and "
574+
"read and write application data through Sync "
575+
"Gateway.">>}],
576+
[{[{collection, ?RBAC_COLLECTION_PARAMS}, sgw, auth], [configure]},
577+
{[{collection, ?RBAC_COLLECTION_PARAMS}, sgw, principal], [read, write]},
578+
{[{collection, ?RBAC_COLLECTION_PARAMS}, sgw, appdata], [read, write]},
579+
{[{collection, ?RBAC_COLLECTION_PARAMS}, sgw, principal_appdata], [read]}]},
580+
{sync_gateway_app_ro, ?RBAC_COLLECTION_PARAMS,
581+
[{name, <<"Sync Gateway Application Read Only">>},
582+
{folder, mobile},
583+
{desc, <<"Can read Sync Gateway users and roles, and "
584+
"read application data through Sync Gateway.">>}],
585+
[{[{collection, ?RBAC_COLLECTION_PARAMS}, sgw, appdata], [read]},
586+
{[{collection, ?RBAC_COLLECTION_PARAMS}, sgw, principal], [read]},
587+
{[{collection, ?RBAC_COLLECTION_PARAMS}, sgw, principal_appdata], [read]}]},
588+
{sync_gateway_replicator, ?RBAC_COLLECTION_PARAMS,
589+
[{name, <<"Sync Gateway Replicator">>},
590+
{folder, mobile},
591+
{desc, <<"Can manage Inter-Sync Gateway Replications. "
592+
"This user cannot read application data.">>}],
593+
[{[{collection, ?RBAC_COLLECTION_PARAMS}, sgw, replications], all}]},
594+
{sync_gateway_dev_ops, [],
595+
[{name, <<"Sync Gateway Dev Ops">>},
596+
{folder, mobile},
597+
{desc, <<"Can manage Sync Gateway node-level configuration, "
598+
"and access Sync Gateway's /metrics endpoint "
599+
"for Prometheus integration.">>}],
600+
[{[{collection, ?RBAC_COLLECTION_PARAMS}, sgw, dev_ops], all},
601+
{[admin, stats_export], [read]}]},
563602
{external_stats_reader, [],
564603
[{name, <<"External Stats Reader">>},
565604
{folder, admin},

0 commit comments

Comments
 (0)