overrides:
+ ceph:
+ conf:
+ client:
+ rgw crypt s3 kms backend: barbican
+ rgw keystone barbican tenant: rgwcrypt
+ rgw keystone barbican user: rgwcrypt-user
+ rgw keystone barbican password: rgwcrypt-pass
rgw:
client.0:
use-keystone-role: client.0
(cclient, cconfig) = config.items()[0]
rgw_user = cconfig['rgw_user']
- ctx.barbican.token[cclient] = {
- "username": rgw_user["username"],
- "password": rgw_user["password"],
- "tenant": rgw_user["tenantName"]
- }
keystone_role = cconfig.get('use-keystone-role', None)
keystone_host, keystone_port = ctx.keystone.public_endpoints[keystone_role]
ctx.barbican = argparse.Namespace()
ctx.barbican.endpoints = assign_ports(ctx, config, 9311)
- ctx.barbican.token = {}
ctx.barbican.keys = {}
with contextutil.nested(
'http://{bhost}:{bport}'.format(bhost=barbican_host,
bport=barbican_port),
])
-
- log.info("Barbican access data: %s",ctx.barbican.token[barbican_role])
- access_data = ctx.barbican.token[barbican_role]
- rgw_cmd.extend([
- '--rgw_crypt_s3_kms_backend', 'barbican',
- '--rgw_keystone_barbican_user', access_data['username'],
- '--rgw_keystone_barbican_password', access_data['password'],
- '--rgw_keystone_barbican_tenant', access_data['tenant'],
- ])
elif vault_role is not None:
if not ctx.vault.root_token:
raise ConfigError('vault: no "root_token" specified')