Ceph如何使用STS服务?

问题描述 投票:0回答:1

我想使用STS服务来生成供第三方客户端使用的临时凭据。

我基于documentation配置了STS lite。

这是我的配置文件:

[global]
fsid = 42a7cae1-84d1-423e-93f4-04b0736c14aa
mon_initial_members = admin, node1, node2, node3
mon_host = 192.168.199.81,192.168.199.82,192.168.199.83,192.168.199.84
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx

osd pool default size = 2

[client.rgw.admin]
rgw sts key = "1234567890"
rgw s3 auth use sts = true

当我执行getSessionToken方法时,返回405错误:

<Error>
    <Code>MethodNotAllowed</Code>
    <RequestId>tx000000000000000000003-005c73aed8-5e48-default</RequestId>
    <HostId>5e48-default-default</HostId>
</Error>

这是我的测试代码:

import os
import sys
import traceback

import boto3
from boto.s3.connection import S3Connection
from boto.sts import STSConnection

try:
    host = 'http://192.168.199.81:7480'
    access_key = '2324YFZ7QDEOSRL18QHR'
    secret_key = 'rL9FabxCOw5LDbrHtmykiGSCjzpKLmEs9WPiNjVJ'

    client = boto3.client('sts',
                          aws_access_key_id = access_key,
                          aws_secret_access_key = secret_key,
                          endpoint_url = host)
    response = client.get_session_token(DurationSeconds=999)
    print response
except:
    print traceback.format_exc()

有人可以告诉我我的配置是否错误,或者我测试的版本不提供STS服务吗?

这些是我测试过的版本:

Ceph version 12.2.11 (26dc3775efc7bb286a1d6d66faee0ba30ea23eee) luminous (stable)
Ceph version 13.2.2 (02899bfda814146b021136e9d8e80eba494e1126) mimic (stable)
ceph radosgw
1个回答
0
投票

nautilus (14.2.x)起已实现STS功能。

有关更多信息:https://docs.ceph.com/docs/master/releases/nautilus/

© www.soinside.com 2019 - 2024. All rights reserved.