Erişim kontrolü
DataHub, erişim kontrolü için Resource Access Management (RAM) hizmetini kullanır. Yalnızca gerekli izinler verilmiş RAM kullanıcıları DataHub kaynaklarına erişebilir. Bir Alibaba Cloud hesabı, kendi kapsamındaki tüm kaynaklar üzerinde tam yetkiye sahiptir. Varsayılan olarak, oluşturulan bir RAM kullanıcısının DataHub kaynaklarına erişim izni bulunmaz. RAM kullanıcısının DataHub kaynaklarına erişebilmesi için önce ilgili erişim izinlerini içeren bir ilke atamanız gerekir. RAM kullanıcısı oluşturma ve ilke atama hakkında daha fazla bilgi için bkz. Bir Alibaba Cloud hesabına MFA cihazı bağlama. Bu konu, DataHub için erişim kontrolünü uygulamak üzere RAM'in nasıl kullanılacağını açıklar.
RAM kullanıcılarına izin verme
RAM kullanıcılarının erişebileceği DataHub kaynak türleri
RAM kullanıcıları DataHub'daki projelere, konulara ve aboneliklere erişebilir. DataHub; projeler, konular ve abonelikler için RAM kimlik doğrulamasını destekler. Ancak parça verilerine erişmek için RAM kimlik doğrulaması kullanılamaz. Abonelik, belirli bir projenin konularındaki kayıtları okumak ve işlemek üzere bir uygulama belirttiğiniz eylemdir.
|
|
|
|
|
|
|
|
|
|
|
|
DataHub API işlemleri ve karşılık gelen RAM ilkeleri
Proje
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Konu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Abonelik
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Bağlayıcı
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parça
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PubSub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DataHub RAM ilkelerine uygulanabilen koşullar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sistem ilkeleri
DataHub, RAM kullanıcılarına atanabilecek sistem ilkeleri sağlar. İhtiyaçlarınıza göre sistem ilkelerini seçebilirsiniz.
AliyunDataHubFullAccess
Bu ilke, RAM kullanıcılarına DataHub üzerinde tüm izinleri verir. Çoğu durumda bu ilke, DataHub'daki kaynakları yönetmek için kullanılır.
AliyunDataHubReadOnlyAccess
Bu ilke, RAM kullanıcılarına DataHub üzerinde salt okunur izinler verir; böylece kullanıcılar DataHub'daki tüm kaynakların bilgilerini sorgulayabilir. Örneğin bu ilkeyle bir proje hakkında bilgi sorgulayabilir, proje listesini görüntüleyebilir veya veri okuyabilirsiniz. Ancak bu ilkeyle veri güncelleyemez, oluşturamaz veya yazamazsınız.
AliyunDataHubSubscribeAccess
Bu ilke, RAM kullanıcılarına DataHub'daki verilere abone olma izni verir. Bu ilkeyle yalnızca GetTopic, ListShard, GetRecords ve abonelikler ile ofsetlerle ilgili tüm işlemler dahil olmak üzere veri okumayı içeren API işlemlerini çağırabilirsiniz.
AliyunDataHubPublishAccess
Bu ilke, RAM kullanıcılarına DataHub'a veri yayınlama izni verir. Bu ilkeyle yalnızca GetTopic, ListShard ve PutRecords dahil olmak üzere veri yazmayı içeren API işlemlerini çağırabilirsiniz.
Özel ilkeler
DataHub tarafından sağlanan sistem ilkeleri gereksinimlerinizi karşılamıyorsa özel ilkeler oluşturabilirsiniz. Özel ilke oluşturmak için aşağıdaki adımları uygulayın: Bir Alibaba Cloud hesabıyla RAM konsolunda oturum açın. Sol gezinme bölmesinde İzinler > İlkeler seçeneğini belirleyin. İlkeler sayfasında İlke Oluştur öğesini tıklayın. Örnek özel ilkeler:
DataHub konsolunda erişilebilir projeleri görüntüleme
// To allow a RAM user to view the projects that the RAM user has the permissions to access in the DataHub console, add the following configurations to the statement block.
// To display the accessible projects in the DataHub console, the permissions to call the ListProject and GetProject operations are required.
{
"Action": ["dhs:ListProject","dhs:GetProject"],
"Resource": "acs:dhs:*:*:projects/*",
"Effect": "Allow"
}
DataHub konsolunda konu oluşturma
// To display the topics of a project in the DataHub console, the permissions to call the ListTopic and GetTopic operations are required.
// To grant a RAM user the permissions to create a topic in the project named "test" in the DataHub console, use the following configurations.
{
"Version": "1",
"Statement": [
{
"Action": ["dhs:ListProject", "dhs:GetProject"],
"Resource": "acs:dhs:*:*:projects/*",
"Effect": "Allow"
},
{
"Action": ["dhs:ListTopic", "dhs:GetTopic", "dhs:CreateTopic"],
"Resource": "acs:dhs:*:*:projects/test/topics/*",
"Effect": "Allow"
}
]
}
Diğer özel ilkeler
// Sample custom policy that grants a RAM user the permissions to query the information about topics in a specified project.
{
"Version": "1",
"Statement": [
{
"Action": ["dhs:ListTopic", "dhs:GetTopic"],
"Resource": "acs:dhs:cn-hangzhou:12121312:projects/foo/topics/*",
"Effect": "Allow"
}
]
}
// Sample custom policy that grants a RAM user all the permissions on subscriptions to topics in the project named "foo".
{
"Version": "1",
"Statement": [
{
"Action": ["dhs:*Subscription"],
"Resource": "acs:dhs:cn-hangzhou:*:projects/foo/topics/*/subscriptions/*",
"Effect": "Allow"
}
]
}
// Sample custom policy that grants a RAM user the permissions to query the information about subscriptions to topics in the project named "foo".
{
"Version": "1",
"Statement": [
{
"Action": ["dhs:ListSubscription"],
"Resource": "acs:dhs:cn-hangzhou:*:projects/foo/topics/*/subscriptions/*",
"Effect": "Allow"
}
]
}
// Sample custom policy that grants a RAM user the permissions to commit offsets for the subscription with the ID "14985645198374IoCK" to topic t1 in the project named "foo".
{
"Version": "1",
"Statement": [
{
"Action": ["dhs:GetSubscription"],
"Resource": "acs:dhs:cn-hangzhou:*:projects/foo/topics/t1/subscriptions/14985645198374IoCK",
"Effect": "Allow"
}
]
}
// Sample custom policy that grants a RAM user the permissions to split or merge shards for a specified topic. The available operations are ListShard, SplitShard, and MergeShard.
{
"Version": "1",
"Statement": [
{
"Action": ["dhs:*Shard"],
"Resource": "acs:dhs:cn-hangzhou:12121312:projects/foo/topics/bar",
"Effect": "Allow"
}
]
}