来自 Pivotal 的高级现场工程师。
您可以通过使用 OpsMgr 或部署清单中的凭据连接到 postgres UAAdb 来恢复管理员帐户的组成员身份。以下是您可以与所需组一起使用的示例脚本。不要担心重复行,因为 PK 约束会阻止它们。更新组后,使用 BOSH 滚动重启您的 UAA 服务器。这需要清除 UAA 的内存缓存......不幸的是,没有更优雅的方法。希望这可以帮助。
--client.write
insert into group_membership values ((select id from groups where displayname='clients.write'), (select id from users where username='admin'), 'USER', 'MEMBER', '2015-01-05', 'uaa');
--clients.admin
insert into group_membership values ((select id from groups where displayname='clients.admin'), (select id from users where username='admin'), 'USER', 'MEMBER', '2015-01-05', 'uaa');
--scim.read
insert into group_membership values ((select id from groups where displayname='scim.read'), (select id from users where username='admin'), 'USER', 'MEMBER', '2015-01-05', 'uaa');
--scim.write
insert into group_membership values ((select id from groups where displayname='scim.write'), (select id from users where username='admin'), 'USER', 'MEMBER', '2015-01-05', 'uaa');
--password.write
insert into group_membership values ((select id from groups where displayname='password.write'), (select id from users where username='admin'), 'USER', 'MEMBER', '2015-01-05', 'uaa');
--clients.read
insert into group_membership values ((select id from groups where displayname='clients.read'), (select id from users where username='admin'), 'USER', 'MEMBER', '2015-01-05', 'uaa');
--uaa.admin
insert into group_membership values ((select id from groups where displayname='uaa.admin'), (select id from users where username='admin'), 'USER', 'MEMBER', '2015-01-05', 'uaa');